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....
sparkislife
Oct 27, 2022Copper Contributor
After migration to AMA, this query doesn't work for my dashboard anymore
Perf
| where TimeGenerated > ago(15minutes)
| where ObjectName == "Logical Disk" or ObjectName == "LogicalDisk"
| where CounterName == "% Free Space"
| where InstanceName <> "_Total" and InstanceName !contains "HarddiskVolume"
| summarize AggregatedValue = avg(CounterValue) by Computer, InstanceName
| where AggregatedValue <= 22
//| top 10 by AggregatedValue
| order by AggregatedValue asc
any clue(s)?
Do i need to add anything to my perf count on DCR or diag the vms
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_Mejia1245Nov 11, 2022Copper ContributorAny 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?- 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