SOLVED

how can I use this result to alert me

Copper Contributor

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 ??

2 Replies
best response confirmed by JACK_LAI_1117 (Copper Contributor)
Solution

@JACK_LAI_1117 

 

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

 

 

Thank you much for your replya

 

@CliveWatson :stareyes:

1 best response

Accepted Solutions
best response confirmed by JACK_LAI_1117 (Copper Contributor)
Solution

@JACK_LAI_1117 

 

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

 

 

View solution in original post