Azure Monitoring Documentation

Introduction to Azure Monitoring

Azure Monitoring provides a comprehensive solution for collecting, analyzing, and acting on telemetry from your cloud and on-premises environments. It helps you understand the performance and availability of your applications and resources, detect anomalies, and diagnose issues.

With Azure Monitoring, you can gain deep insights into your system's health, identify bottlenecks, and ensure optimal resource utilization. This documentation guides you through the key services and features available for monitoring your Azure resources.

Key Monitoring Services

Azure offers a suite of integrated services for monitoring. Understanding these services is crucial for building a robust monitoring strategy:

Azure Monitor

Azure Monitor is the primary service for collecting and analyzing telemetry data from your Azure and on-premises environments. It aggregates logs and metrics from a wide range of sources, including:

Data collected by Azure Monitor can be used for various purposes:

Metrics are numerical values collected at regular intervals, providing insights into performance. Logs are event-based data that record operational details.

Note: Azure Monitor is the central hub for all monitoring data in Azure.

Log Analytics

Log Analytics is a tool within Azure Monitor used for interactive analysis of log data. It allows you to run queries against your logs using the Kusto Query Language (KQL) to extract valuable information about your applications and infrastructure.

Key capabilities of Log Analytics include:

// Example KQL query to find errors in the last hour
AppExceptions
| where timestamp > ago(1h)
| where severityLevel > 1
| summarize count() by type

Application Insights

Application Insights is a powerful Application Performance Management (APM) service that provides rich instrumentation for your live applications. It helps you detect issues, understand how users interact with your app, and identify performance bottlenecks.

Application Insights collects telemetry such as:

It supports a wide range of languages and platforms, including .NET, Java, Node.js, Python, and more.

Tip: Integrate Application Insights early in your development lifecycle to gain immediate insights into application behavior.

Azure Alerts

Azure Alerts proactively notify you when critical conditions are detected in your subscription. Alerts are based on metrics, logs, or activity logs, and can trigger various actions, such as sending an email, running a webhook, or creating a ticket.

You can configure alert rules to monitor:

Alerts help you respond quickly to potential issues before they impact your users.

Dashboards

Azure Dashboards provide a centralized, customizable view of your Azure resources. You can pin charts, metrics, logs, and alerts to a dashboard to get a quick overview of your system's health and performance.

Key features of Azure Dashboards:

API References

Explore the APIs available for programmatic access to Azure Monitoring data and management.

Metrics API

The Azure Monitor Metrics API allows you to programmatically retrieve performance metrics for Azure resources. You can fetch time-series data for a wide range of metrics.

Endpoint Description Method
/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metrics Retrieve metrics for a given resource or resource group. GET

Log Analytics Query API

The Log Analytics Query API enables you to run KQL queries against your Log Analytics workspaces from your applications or scripts.

Endpoint Description Method
/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/query Execute a KQL query. POST

Alerts Management API

Manage alert rules and retrieve alert history using the Alerts Management API.

Endpoint Description Method
/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts List alerts. GET
/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertRules Manage alert rules. GET/POST/PUT/DELETE

For detailed API specifications, please refer to the official Azure Monitor REST API documentation.