question

bombbe avatar image
0 Votes"
bombbe asked bombbe commented

Disable alerting if vm is not running

Hi,
I has looking for solution that would help us stop alerting receiving alerts from vms that are not running. I found out that you could do something like this with alert processing rules but unfortunately there were no option for stopped vms (https://docs.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-action-rules?tabs=azure-cli#which-fired-alerts-are-affected-by-this-rule). Are the another alternative solutions that I could maybe look out for?

azure-virtual-machinesazure-monitor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

karishmatiwari-msft avatar image
0 Votes"
karishmatiwari-msft answered bombbe commented

You can achieve it by using Azure Automation via PowerShell as explained in detail in this Stack Overflow thread.

https://stackoverflow.com/questions/57372231/disable-enable-azure-monitor-alert-rules-by-azure-automation-powershell/57601335#57601335

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hmm kinda not sure if that helps (or if I understood that right). OP tried to disable whole rule but I need to suppress alerts from single vm.

0 Votes 0 ·