I'm currently monitoring an Azure Windows VM using the Available Memory Bytes metric with specific settings. However, I've encountered a problem where Azure Monitor reports a value of 0 for this metric when the VM is either deallocated or starting up. Consequently, this triggers false-positive alerts since the available memory goes below my set threshold even though it's not genuinely low on memory. I'm eager to know how I can avoid or suppress these false-positive alerts for VMs that are stopped, deallocated, or in the process of booting. Are there best practices for handling metrics that return 0 when the resource is offline?
2 Answers
One way to tackle this issue is to add a condition that checks if the VM has been up for more than 300 seconds and if its status is 'running' before the alert is triggered. This should help filter out those false alerts when the VM isn't active.
Using a Function App or Logic App might seem like a solution, but honestly, it feels like overkill for something as straightforward as this. Although Alert Processing Rules can suppress alerts on a schedule, they fall short for larger fleets of VMs that are automatically powered on or off during scaling. It’s a bit frustrating trying to manage this with such limitations.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures