Custom log table is accessiable from the VM and not from the log analytics workspace in Azure

72 views Asked by At

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

1

There are 1 answers

3
Jahnavi On

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.

enter image description here

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.

enter image description here

Now I checked whether the logs from Virtual machine are properly coming from the VM and was worked as expected.

enter image description here

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.

enter image description here

After all the above steps, now go to Logs under workspace and you can be able to view the metrics as shown.

InsightMetrics

enter image description here

enter image description here

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

enter image description here

Refer Microsoft tech discusssion for more related queries.