Jun 15 2020 03:00 PM
In azure logs , I use this to get my linux server disk usage
Perf |where TimeGenerated > ago(3min)
| where ObjectName == "Logical Disk" // the object name used in Linux records
| where CounterName == "% Used Space" and InstanceName != "_Total"
| summarize by InstanceName,CounterValue
But when I use to result to became alert , it always show "Search Query should contain 'AggregatedValue' and 'bin(TimeGenerated, [roundTo])' for Metric alert type"
So how can I overcome it ??
Jun 16 2020 12:55 AM
Solution
Perf |where TimeGenerated > ago(3min)
| where ObjectName == "Logical Disk" // the object name used in Linux records
| where CounterName == "% Used Space" and InstanceName != "_Total"
| summarize by InstanceName,CounterValue, bin(TimeGenerated,1m)
| extend AggregatedValue = CounterValue
or see examples on this page:
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-unified-log