Slide 5 of 12

Azure metrics: serverless

How it works

Azure metrics serverless architecture: Grafana Cloud pulls from Azure Monitor API

Complexity: Simple | Infrastructure: None | Latency: Minutes

This is the serverless collection method: Grafana Cloud collects Azure metrics through the Azure Monitor API, with no collector or agent to deploy. Collecting with Grafana Alloy is a separate, agent-based method.

Create a service principal in Microsoft Entra ID with read access to Azure Monitor and provide those credentials to Grafana Cloud. Grafana Cloud queries the Azure Monitor API, discovers your resources automatically, and pulls metrics in, converting them to Prometheus format so you can query them with PromQL.

Considerations

  • Managed by Grafana Cloud, with no Azure infrastructure to deploy
  • Simple service principal authentication
  • Automatic resource discovery
  • Metrics in Prometheus format for PromQL
  • Minute-level latency
  • API rate limits at scale
  • Per-subscription credentials, so multiple subscriptions need multiple configurations

When to use

  • Getting started with Azure metrics
  • Single subscription
  • Minimal infrastructure preference

Documentation

View the Collect Azure metrics with the serverless solution documentation.

Learning path

Configure this approach step by step.

Azure metrics: serverless

Script

Azure has the serverless method, and it works much like AWS scrape jobs, with no collector or agent to deploy.

You create a service principal in Microsoft Entra ID with read access to Azure Monitor, provide those credentials to Grafana Cloud, and you’re off. Grafana Cloud queries the Azure Monitor API, discovers your resources automatically, and pulls metrics in.

Just like with AWS, the metrics get converted to Prometheus format so you can query with PromQL.

A few things to know: Grafana Cloud collects every two minutes, so metrics arrive with a couple of minutes of latency, and high-cardinality resources like hundreds of App Service instances can hit API rate limits.

But for a typical single-subscription environment, the serverless method gets you monitoring quickly with zero Azure infrastructure to deploy. If you’re just starting your Azure observability journey, this is the way to go.