Forum Discussion

Ahmed Atef's avatar
Ahmed Atef
Brass Contributor
Mar 21, 2018
Solved

Heartbeat Azure Monitor OMS VMs

Hi all, i am trying to create an Alert for heartbeats if VM is didn't heartbeat in the last 15 min... here what i did and unfortunately it didnt fire alert.    so i created a new alert rule in Az...
  • Hi

    Your query is correct. Probably you should remove

    | where TimeGenerated > ago(1d)

    because when the query is used in alert the timespan/timeframe is defined in the alert itself. In the heartbeat alert you would want your the evaluation time to be longer than 15 minutes. Make it at least one hour but probably 24 hours would be better as that was the time span in your query. With that setting you should get alert in 15 minutes after the vm goes down. Keep in mind that you want the VM to be down for 15 minutes at least. If it goes down only for 5 minutes you will probably not be alerted because heartbeat events will start to be send again so the alert will never trigger that the last heartbeat event was 15 minutes ago.

    Let me know if you have further questions.

Resources