Metrics in Azure Monitor - Azure Monitor (2024)

  • Article

Azure Monitor Metrics is a feature of Azure Monitor that collects numeric data from monitored resources into a time-series database. Metrics are numerical values that are collected at regular intervals and describe some aspect of a system at a particular time.

Note

Azure Monitor Metrics is one half of the data platform that supports Azure Monitor. The other half is Azure Monitor Logs, which collects and organizes log and performance data. You can analyze that data by using a rich query language.

Types of metrics

There are multiple types of metrics supported by Azure Monitor Metrics:

  • Native metrics use tools in Azure Monitor for analysis and alerting.
    • Platform metrics are collected from Azure resources. They require no configuration and have no cost.
    • Custom metrics are collected from different sources that you configure including applications and agents running on virtual machines.
  • Prometheus metrics are collected from Kubernetes clusters including Azure Kubernetes service (AKS) and use industry standard tools for analyzing and alerting such as PromQL and Grafana.

The differences between each of the metrics are summarized in the following table.

CategoryNative platform metricsNative custom metricsPrometheus metrics
SourcesAzure resourcesAzure Monitor agent
Application insights
REST API
Azure Kubernetes service (AKS) cluster
Any Kubernetes cluster through remote-write
ConfigurationNoneVaries by sourceEnable Azure Monitor managed service for Prometheus
StoredSubscriptionSubscriptionAzure Monitor workspace
CostNoYesYes (free during preview)
Aggregationpre-aggregatedpre-aggregatedraw data
AnalyzeMetrics ExplorerMetrics ExplorerPromQL
Grafana dashboards
Alertmetrics alert rulemetrics alert rulePrometheus alert rule
VisualizeWorkbooks
Azure dashboards
Grafana
Workbooks
Azure dashboards
Grafana
Grafana
RetrieveAzure CLI
Azure PowerShell cmdlets
REST API or client library
.NET
Go
Java
JavaScript
Python
Azure CLI
Azure PowerShell cmdlets
REST API or client library
.NET
Go
Java
JavaScript
Python
Grafana

Data collection

Azure Monitor collects metrics from the following sources. After these metrics are collected in the Azure Monitor metric database, they can be evaluated together regardless of their source:

  • Azure resources: Platform metrics are created by Azure resources and give you visibility into their health and performance. Each type of resource creates a distinct set of metrics without any configuration required. Platform metrics are collected from Azure resources at one-minute frequency unless specified otherwise in the metric's definition.
  • Applications: Application Insights creates metrics for your monitored applications to help you detect performance issues and track trends in how your application is being used. Values include Server response time and Browser exceptions.
  • Virtual machine agents: Metrics are collected from the guest operating system of a virtual machine. You can enable guest OS metrics for Windows virtual machines by using the Azure Monitor Agent. Azure Monitor Agent replaces the legacy agents - Windows diagnostic extension and the InfluxData Telegraf agent for Linux virtual machines.
  • Custom metrics: You can define metrics in addition to the standard metrics that are automatically available. You can define custom metrics in your application that's monitored by Application Insights. You can also create custom metrics for an Azure service by using the custom metrics API.
  • Kubernetes clusters: Kubernetes clusters typically send metric data to a local Prometheus server that you must maintain. Azure Monitor managed service for Prometheus provides a managed service that collects metrics from Kubernetes clusters and store them in Azure Monitor Metrics.

Note

Metrics collected from different sources and by different methods may be aggregated differently. For example, platform metrics are pre-aggregated and stored in a time-series database, while Prometheus metrics are stored as raw data.Resource metrics may also have a different latency than other metrics. This can lead to differences in metric values for a specific sample time. Over time when latency ceases to be an issue, and when analyzing the metrics at the same time granularity, these differences disappear.

REST API

Azure Monitor provides REST APIs that allow you to get data in and out of Azure Monitor Metrics.

  • Custom metrics API - Custom metrics allow you to load your own metrics into the Azure Monitor Metrics database. Those metrics can then be used by the same analysis tools that process Azure Monitor platform metrics.
  • Azure Monitor Metrics REST API - Allows you to access Azure Monitor platform metrics definitions and values. For more information, see Azure Monitor REST API. For information on how to use the API, see the Azure monitoring REST API walkthrough.
  • Azure Monitor Metrics Batch REST API - Azure Monitor Metrics Batch API is a high-volume API designed for customers with large volume metrics queries. It's similar to the existing standard Azure Monitor Metrics REST API, but provides the capability to retrieve metric data for up to 50 resource IDs in the same subscription and region in a single batch API call. This improves query throughput and reduces the risk of throttling.

Security

All communication between connected systems and the Azure Monitor service is encrypted using the TLS 1.2 (HTTPS) protocol. The Microsoft SDL process is followed to ensure all Azure services are up-to-date with the most recent advances in cryptographic protocols.

Secure connection is established between the agent and the Azure Monitor service using certificate-based authentication and TLS with port 443. Azure Monitor uses a secret store to generate and maintain keys. Private keys are rotated every 90 days and are stored in Azure and are managed by the Azure operations who follow strict regulatory and compliance practices. For more information on security, see Encryption of data in transit, Encryption of data at rest, and Azure Monitor Logs data security

Metrics Explorer

Use Metrics Explorer to interactively analyze the data in your metric database and chart the values of multiple metrics over time. You can pin the charts to a dashboard to view them with other visualizations. You can also retrieve metrics by using the Azure monitoring REST API.

For more information, see Analyze metrics with Azure Monitor metrics explorer.

Data structure

Data that Azure Monitor Metrics collects, is stored in a time-series database that's optimized for analyzing time-stamped data. Each set of metric values is a time series with the following properties:

  • The time when the value was collected.
  • The resource that the value is associated with.
  • A namespace that acts like a category for the metric.
  • A metric name.
  • The value itself.
  • Multiple dimensions when they're present. Custom metrics are limited to 10 dimensions.

Multi-dimensional metrics

One of the challenges to metric data is that it often has limited information to provide context for collected values. Azure Monitor addresses this challenge with multi-dimensional metrics.

Metric dimensions are name/value pairs that carry more data to describe the metric value. For example, a metric called Available disk space might have a dimension called Drive with values C: and D:. That dimension would allow viewing available disk space across all drives or for each drive individually.

See Apply dimension filters and splitting for details on viewing metric dimensions in metrics explorer.

Nondimensional metric

The following table shows sample data from a nondimensional metric, network throughput. It can only answer a basic question like "What was my network throughput at a given time?"

TimestampMetric value
8/9/2017 8:141,331.8 Kbps
8/9/2017 8:151,141.4 Kbps
8/9/2017 8:161,110.2 Kbps

Network throughput and two dimensions ("IP" and "Direction")

The following table shows sample data from a multidimensional metric, network throughput with two dimensions called IP and Direction. It can answer questions such as "What was the network throughput for each IP address?" and "How much data was sent versus received?"

TimestampDimension "IP"Dimension "Direction"Metric value
8/9/2017 8:14IP="192.168.5.2"Direction="Send"646.5 Kbps
8/9/2017 8:14IP="192.168.5.2"Direction="Receive"420.1 Kbps
8/9/2017 8:14IP="10.24.2.15"Direction="Send"150.0 Kbps
8/9/2017 8:14IP="10.24.2.15"Direction="Receive"115.2 Kbps
8/9/2017 8:15IP="192.168.5.2"Direction="Send"515.2 Kbps
8/9/2017 8:15IP="192.168.5.2"Direction="Receive"371.1 Kbps
8/9/2017 8:15IP="10.24.2.15"Direction="Send"155.0 Kbps
8/9/2017 8:15IP="10.24.2.15"Direction="Receive"100.1 Kbps

Note

Dimension names and dimension values are case-insenstive.

Retention of metrics

Platform and custom metrics

Platform and custom metrics are stored for 93 days with the following exceptions:

  • Classic guest OS metrics: These performance counters are collected by the Windows diagnostic extension or the Linux diagnostic extension and routed to an Azure Storage account. Retention for these metrics is guaranteed to be at least 14 days, although no expiration date is written to the storage account.

    For performance reasons, the portal limits how much data it displays based on volume. So, the actual number of days that the portal retrieves can be longer than 14 days if the volume of data being written isn't large.

  • Guest OS metrics sent to Azure Monitor Metrics: These performance counters are collected by the Windows diagnostic extension and sent to the Azure Monitor data sink, or the InfluxData Telegraf agent on Linux machines, or the newer Azure Monitor agent via data-collection rules. Retention for these metrics is 93 days.

  • Guest OS metrics collected by the Log Analytics agent: These performance counters are collected by the Log Analytics agent and sent to a Log Analytics workspace. Retention for these metrics is 31 days and can be extended up to 2 years.

  • Application Insights log-based metrics: Behind the scenes, log-based metrics translate into log queries. Their retention is variable and matches the retention of events in underlying logs, which is 31 days to 2 years. For Application Insights resources, logs are stored for 90 days.

Note

You can send platform metrics for Azure Monitor resources to a Log Analytics workspace for long-term trending.

While platform and custom metrics are stored for 93 days, you can only query (in the Metrics tile) for a maximum of 30 days' worth of data on any single chart. This limitation doesn't apply to log-based metrics. If you see a blank chart or your chart displays only part of metric data, verify that the difference between start and end dates in the time picker doesn't exceed the 30-day interval. After you've selected a 30-day interval, you can pan the chart to view the full retention window.

Note

Moving or renaming an Azure Resource may result in a lost of metric history for that resource.

Prometheus metrics

Prometheus metrics are stored for 18 months, but a PromQL query can only span a maximum of 32 days.

Next steps

  • Learn more about the Azure Monitor data platform.
  • Learn about log data in Azure Monitor.
  • Learn about the monitoring data available for various resources in Azure.
Metrics in Azure Monitor - Azure Monitor (2024)

FAQs

What are metrics in Azure monitor? ›

Azure Monitor Metrics is a feature of Azure Monitor that collects numeric data from monitored resources into a time-series database. Metrics are numerical values that are collected at regular intervals and describe some aspect of a system at a particular time.

How is monitoring VM metrics accomplished in Azure monitor? ›

To monitor VM guest data, you need to install Azure Monitor Agent on the VM and set up a data collection rule (DCR). The VM Insights feature automatically installs Azure Monitor Agent on your VM and sets up a default data collection rule for quick and easy onboarding.

What is the interval of metrics in Azure monitor? ›

The infrastructure monitoring of Azure services provides metrics from Azure Monitor and infrastructure data available via public Azure API. The data is collected in five-minute intervals.

What is the granularity of metrics in Azure monitor? ›

Granularity. The minimum time granularity is 1 minute, but the underlying system may capture data faster depending on the metric. For example, CPU percentage for an Azure VM is captured at a time interval of 15 seconds.

What is metrics in cloud monitoring? ›

Cloud metrics are the logs of data that a cloud infrastructure or application generates. Using the data, organizations can detect, monitor, and respond to various changes in costs, security, and performance of their cloud environments.

What is the difference between Azure metrics and logs? ›

Azure Monitor Metrics can only store numeric data in a particular structure, whereas Azure Monitor Logs can store a variety of data types that have their own structures. You can also perform complex analysis on Azure Monitor Logs data by using log queries, which can't be used for analysis of Azure Monitor Metrics data.

What are the three main functions of Azure monitor? ›

Azure Monitor's core consumption methods include tools to provide insights, visualize, and analyze data. The visualization tools build on the analysis tools and the insights build on top of both the visualization and analysis tools.

What data does Azure Monitor collect? ›

Azure Monitor agent (AMA) is used to collect data from Azure virtual machines, Virtual Machine scale sets, and Arc-enabled servers. Data collection rules (DCR) define the data to collect from the agent and where that data should be sent.

What is the difference between host and guest metrics in Azure? ›

Host metrics do not require additional setup because they are collected by the host VM, whereas guest metrics require you to install the Windows Azure Diagnostics extension or the Linux Azure Diagnostics extension in the guest VM.

What is metrics in monitoring? ›

A good monitoring system involves data collection, storage, aggregation, visualization, and alerting to identify issues and trends in your systems. Metrics are raw data collected from various sources like hardware, applications, or websites, providing information about resource usage, performance, or user behavior.

How to create a metric in Azure? ›

Browse your custom metrics via the Azure portal
  1. Go to the Azure portal.
  2. Select the Monitor pane.
  3. Select Metrics.
  4. Select a resource that you've emitted custom metrics against.
  5. Select the metrics namespace for your custom metric.
  6. Select the custom metric.
Jan 8, 2024

What is the timeout for Azure monitor? ›

The default timeout is 3 minutes. The maximum timeout is 10 minutes.

What is the difference between count and sum in Azure monitor? ›

Sum: The sum of all values captured during the aggregation interval. The sum aggregation is sometimes called the total aggregation. Count: The number of measurements captured during the aggregation interval.

What is the frequency of data collection in Azure monitor? ›

The polling frequency/interval for data collection is five minutes (with a data point collected every minute). Resource discovery happens once every 30 minutes. If you have event logs enabled, the frequency for collecting logs is five minutes.

What is the frequency of metric alerts in Azure? ›

Alert frequency of less than 5 minutes: While the condition continues to be met, a notification is sent somewhere between one and six minutes. Alert frequency of more than 5 minutes: While the condition continues to be met, a notification is sent between the configured frequency and doubles the value of the frequency.

What is a metric in monitoring? ›

A good monitoring system involves data collection, storage, aggregation, visualization, and alerting to identify issues and trends in your systems. Metrics are raw data collected from various sources like hardware, applications, or websites, providing information about resource usage, performance, or user behavior.

What are metrics in telemetry? ›

A measurement captured at runtime. A metric is a measurement of a service captured at runtime. The moment of capturing a measurements is known as a metric event, which consists not only of the measurement itself, but also the time at which it was captured and associated metadata.

What are metric alerts in Azure? ›

Metric alerts offer a near real-time monitoring capability. They fork data from the log source to ensure this capability. Metric alerts are stateful. They notify you once when an alert is fired and once when the alert is resolved.

What is MDM metrics? ›

An MDM dashboard provides key measures about the master data such as: Metrics and trends of how the master data is changing. Metrics and trends of quality issues, issue resolution and issue backlogs. Insights into the composition of the master data.

Top Articles
Positive Competition Vs. Negative Competition: What’s the Difference?
Client Id vs Client Secret
Skigebiet Portillo - Skiurlaub - Skifahren - Testberichte
Friskies Tender And Crunchy Recall
Craftsman M230 Lawn Mower Oil Change
Robinhood Turbotax Discount 2023
Horned Stone Skull Cozy Grove
Space Engineers Projector Orientation
Sport Clip Hours
Trini Sandwich Crossword Clue
Bowie Tx Craigslist
Cashtapp Atm Near Me
Simpsons Tapped Out Road To Riches
111 Cubic Inch To Cc
No Hard Feelings - Stream: Jetzt Film online anschauen
Swgoh Blind Characters
Music Go Round Music Store
Ein Blutbad wie kein anderes: Evil Dead Rise ist der Horrorfilm des Jahres
Best Mechanics Near You - Brake Masters Auto Repair Shops
Kringloopwinkel Second Sale Roosendaal - Leemstraat 4e
Johnnie Walker Double Black Costco
Dragonvale Valor Dragon
Makemv Splunk
Snohomish Hairmasters
Generator Supercenter Heartland
Log in to your MyChart account
Die wichtigsten E-Nummern
My Dog Ate A 5Mg Flexeril
Nurtsug
Basil Martusevich
Home Auctions - Real Estate Auctions
6465319333
Emiri's Adventures
The Venus Flytrap: A Complete Care Guide
Microsoftlicentiespecialist.nl - Microcenter - ICT voor het MKB
One Credit Songs On Touchtunes 2022
Diana Lolalytics
Timothy Kremchek Net Worth
20+ Best Things To Do In Oceanside California
Craigslist Pets Huntsville Alabama
Bones And All Showtimes Near Johnstown Movieplex
T&Cs | Hollywood Bowl
Post A Bid Monticello Mn
Toomics - Die unendliche Welt der Comics online
Walmart 24 Hrs Pharmacy
Marcal Paper Products - Nassau Paper Company Ltd. -
Avance Primary Care Morrisville
Gli italiani buttano sempre più cibo, quasi 7 etti a settimana (a testa)
Sara Carter Fox News Photos
Phone Store On 91St Brown Deer
Affidea ExpressCare - Affidea Ireland
Latest Posts
Article information

Author: Wyatt Volkman LLD

Last Updated:

Views: 5354

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Wyatt Volkman LLD

Birthday: 1992-02-16

Address: Suite 851 78549 Lubowitz Well, Wardside, TX 98080-8615

Phone: +67618977178100

Job: Manufacturing Director

Hobby: Running, Mountaineering, Inline skating, Writing, Baton twirling, Computer programming, Stone skipping

Introduction: My name is Wyatt Volkman LLD, I am a handsome, rich, comfortable, lively, zealous, graceful, gifted person who loves writing and wants to share my knowledge and understanding with you.