Reputation: 722
I have created a log analytics workspace for our production environment and have connected the VMs to the analytics workspace. There are these azure tables like VMComputer, and InsightMetrics which I am able to query when I navigate to "Logs" inside the virtualmachines from the azure portal but not able to query it from the Log analytcs workspace.
How do i enable this table in the log analytics workspace
Upvotes: 0
Views: 172
Reputation: 7898
Custom log table is accessible from the VM and not from the log analytics workspace in Azure: -
I tried to achieve your requirement in my environment and was able to view the logs from log analytics workspace successfully.
Steps detailed below:
Firstly, I enabled Virtual machine insights while creating a new Virtual machine by connecting it to one of my log analytics workspaces, as shown.
Once the virtual machine is created, go to the below
Path: Virtual machine >> Monitoring >> Diagnostic settings
and you need to install the Diagnostics extension by linking it with one of the storage accounts to store custom logs collected from the VM.
Now I checked whether the logs from Virtual machine are properly coming from the VM and was worked as expected.
Now to resolve your issue, go to your VM connected Log analytics workspace and check the related diagnostic settings. It should show the default one as shown or if it is not already there, add one to capture all metrics from the VM.
After all the above steps, now go to Logs under workspace and you can be able to view the metrics as shown.
InsightMetrics
Alternatively,
If still the issue persists, you can also use Perf
counters to view the Virtual machine metric data. I've given a sample example below.
Perf
| where ObjectName == "Processor" and CounterName == "% Processor Time"
| project Computer, TimeGenerated
Refer Microsoft tech discusssion for more related queries.
Upvotes: 0