Forum Discussion
kasunth
Mar 15, 2021Copper Contributor
I want see an alert when my disk space less than 5Gb in virtual machine.
I want see an alert when my disk space less than 5Gb in virtual machine. Please provide the steps that need to be configured. I want to get the email notification when my VM disk space less than 5GB....
Eric_Keown
Nov 02, 2022Copper Contributor
The AMA writes to the insightmetrics or at least mine is.
This is what my query looks like for disk space
let availpercent = 10;
InsightsMetrics
| where Origin == "vm.azm.ms"
and Namespace == "LogicalDisk" and Name == "FreeSpacePercentage"
| extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"])
| summarize Disk_Free_Space = avg(Val) by Computer, Disk, _ResourceId
| project Computer, Disk, Disk_Free_Space
| where Disk_Free_Space < availpercent
You might want to try that.
This is what my query looks like for disk space
let availpercent = 10;
InsightsMetrics
| where Origin == "vm.azm.ms"
and Namespace == "LogicalDisk" and Name == "FreeSpacePercentage"
| extend Disk=tostring(todynamic(Tags)["vm.azm.ms/mountId"])
| summarize Disk_Free_Space = avg(Val) by Computer, Disk, _ResourceId
| project Computer, Disk, Disk_Free_Space
| where Disk_Free_Space < availpercent
You might want to try that.
Daniel_Mejia1245
Nov 11, 2022Copper Contributor
Any of you guys why when I run these same queries I get zero results. Its suggests to expand the date time which I have to max and still get zero results.
What else required to get these logs?
What else required to get these logs?
- Eric_KeownNov 11, 2022Copper ContributorIf you are looking for the VM data, ensure that you have the agent extension on your VM check that AzureMonitorWindowsAgent (if its a windows box) is on the host as an extension.
Second ensure that you have created a Data Collection Rule and it has your VMs listed as a source and the Data Source is performance counters and is pointed to your Log Analytic Workspace