Azure alert setting for custom log search

Viktor Korokhov 130 Reputation points
2023-09-19T08:30:23.47+00:00

Hi all,

I am sorry, probably, I have stupid question but after my testing to implement alert rules I am confused. I try to configure some alerts for Azure VMs and Azure ARC (for heartbeat, CPU, Memory and so on)

I have found this article https://learn.microsoft.com/en-us/azure/azure-monitor/vm/monitor-virtual-machine-alerts#log-alert-rules-1 how to create a query and it shows me some outputs in Logs. But measurement and alert logic are confused me and I don't get any alerts.

If someone could show me what to set exactly in a next configuration it would be great!

User's image

I have implemented alerts of heartbeat for Azure VMs using this link https://learn.microsoft.com/en-us/azure/azure-monitor/vm/tutorial-monitor-vm-alert-availability and it works nice! My screenshots is for ARC machines (haven't found another solution for ARC heartbeating)

2nd question about CPU checking. I need to alert for 100% CPU using during 1h, what query should be and what alert settings?

I hope to get help with it and hope to understand logic of alerts

TIA,

Viktor

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,247 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 28,106 Reputation points Microsoft Employee
    2023-09-26T01:53:37.53+00:00

    To start, try using the following measurements with your customer alert rule.

    User's image

    Run the query first in Logs under your workspace to make sure you have records being returned. For Arc heartbeats, those machines connected to the workspace should be sending a heartbeat metric value roughly every minute. For an alert, set the Aggregation Type to Count and Threshold to match the evaluation granularity. An example query for metrics rules is, but honestly the query you have above should work for both.

    Heartbeat
    | where TimeGenerated > ago(5m)
    | summarize AggregatedValue = count() by Computer
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.