8_Monitoring and Metrics & Alert Setup - Nirvan-Pandey/Azure_DOC GitHub Wiki

8_1: Introduction

This document explains how to enable monitoring, view metrics, and set up alerts on an Azure Virtual Machine (VM). Monitoring allows administrators to

analyze system performance, while alerts help proactively identify and respond to critical issues.

8_2: Enabling Monitoring (Insights)

Navigate to the Virtual Machine in the Azure portal.

In the left menu, under Monitoring, click on Insights.

Click Enable.

image

In the Monitor Configuration window, click Configure to enable required diagnostics and data collection.

image

After enabling, go back to Insights, and click on Analyze Data to view the performance metrics like CPU, Memory, Disk, and Network usage.

image

8_3: Viewing Metrics

Inside the VM, go to the Monitoring section.

Click on Metrics.

Use the dropdowns to select the metric namespace, metric name, aggregation type, and time range.

Visualize the metrics in a chart format to understand VM performance trends.

image

image

8_4: Creating Alerts

In the VM, go to Monitoring → Alerts.

Click on + Create → Alert rule.

image

Under Condition, click Add condition, and choose a Signal name (e.g., CPU Percentage, Disk IOPS, etc.).

image

8_4_1: Alert Configuration Steps

Signal: Choose the metric or activity log signal for the alert.

Condition Logic: Define logic such as "CPU Percentage > 80% for 5 minutes".

image

Actions:

Add an action group.

Specify the action type (e.g., Email/SMS/Push/Voice).

Enter the email address for receiving the alert.

Alert Details:

Enter a name for the alert.

image

Select severity level (0 = Critical, 4 = Informational).

image

image

8_5: Finalizing Alert Rule

Click on Review + Create.

Validate the configuration, then click Create.

image

Once deployed, alerts will trigger based on your defined conditions and send notifications to the specified recipients.

image