// Not reporting VMs
// VMs that have not reported a heartbeat in the last 5 minutes.
// To create an alert for this query, click '+ New alert rule'
Heartbeat
| where TimeGenerated > ago(24h)
| summarize LastCall = max(TimeGenerated) by Computer
| where LastCall < ago(5m)
Best way to alert on Heart Beat Alert in Azure
Hello,
We wish to start using Log Analytics to alert us when a VM is not reachable for over 5min.
We have several subscription . I have been looking into this and there are so many ways to achieve this.
Setting up an Alert rule
Setting up Logic Apps
Setting up Workbook.
In the example I have seen there is a simple query
Heartbeat
| summarize max(TimeGenerated) by Computer
| where max_TimeGenerated > ago(5m)
But when I run the query over and set it for the past 30min I get over 400 Vm's. Which is wrong.
We are trying to do is, so to alert us when a vm has not heartbeat or maybe no network connectivity for over 5min.
This is so easy to do in SCOM . Why is it so complicated in Azure ?
We are able to set up alert rule when a vm has high CPU 90% for longer than 5min. This works great.
Any ideas
4 answers
Sort by: Most helpful
-
Clive Watson - MSFT 106 Reputation points
2020-11-10T16:40:22.96+00:00 -
Khurram Rahim 1,841 Reputation points
2020-11-10T17:14:14.997+00:00 http://contoso.se/blog/?p=4532
Please find answer hope you will find step by step guide hope answer the question
If issue resolve don't forget to accept answer and upvote.
-
Goce Dimitroski 41 Reputation points
2020-11-10T21:45:39.3+00:00 With all of these it is not in real time ? Azure needs to read the logs ?
-
Onur Pekdağ 11 Reputation points
2021-08-25T09:18:17.537+00:00 another an option to be create resource health alert for virtual machines without cost and log analytics workspace