QuestionQ297

VerifiedMonitor and maintain Azure resources

You have an Azure virtual machine named VM1 that runs Windows Server 2016.

You need to create an alert in Azure when more than two error events are logged to the System event log on VM1 within an hour.

Solution: You create an Azure Log Analytics workspace. You install Azure Monitor Agent on VM1 and create a data collection rule (DCR) that collects Error events from the System event log on VM1 and sends them to the workspace. You create a log search alert rule in Azure Monitor and specify the Log Analytics workspace as the source.

Does this satisfy the goal?

Explanation

Azure Monitor Agent uses a data collection rule with a Windows Event Logs data source to collect System log events at the Error level from VM1 and send them to the Event table of the Log Analytics workspace. A log search alert rule scoped to that workspace can count the matching rows (Measure: Table rows) over a 1-hour window and fire when the count is greater than 2. This meets the goal. The legacy Log Analytics agent (Microsoft Monitoring Agent) was retired on August 31, 2024, and Azure Monitor Agent with data collection rules replaces it.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!