I have an Azure Monitor log analytics workspace. I have the MMA agent installed on an Exchange server on-premises and it's uploading event and perf data to Azure. I can chart the monitor I'm interested in, based on this query:
Perf
| where CounterName == "Free Megabytes" and InstanceName == "D:"
| where TimeGenerated > ago(7d)
| where Computer == "EXCH13.xxx.local"
I need to create an alert when available disk space goes below 20 GB but in trying to create a log based alert it's just alerting based on the number of times the query has run in a given time. And when I try to create a metrics based alert is says the query must include 'AggregatedValue' and 'bin(TimeGenerated, [roundTo])'. I just need it to look at the log data and let me know when it goes below 20 GB. Any ideas?