Skip to content

Azure Monitor metrics in Osuite

Osuite ingests Azure Monitor metrics through the OpenTelemetry Collector. The azure_monitor receiver scrapes the Azure Monitor API on an interval, converts each metric to OTLP, and forwards it through the otlp/osuite exporter, where it correlates with the rest of your telemetry.

The receiver runs anywhere the Collector runs and pulls metrics for one or more subscriptions. By default it scrapes every service and every metric in each configured subscription; narrow that with resource_groups, services, and metrics filters.

  • An OpenTelemetry Collector from the Contrib distribution (otelcol-contrib) that includes the azure_monitor receiver.
  • Your Osuite ingest endpoint and token.
  • An Azure AD app registration (service principal) for the Collector to authenticate as:
    1. In Azure AD, register an application and record its Directory (tenant) ID and Application (client) ID.
    2. Create a client secret for the application and record its value.
    3. Assign the app the Monitoring Reader role on each subscription you want to scrape (Subscription → Access control (IAM) → Add role assignment).
  • The client secret provided to the Collector as the AZURE_CLIENT_SECRET environment variable so it stays out of the config file.

This configuration scrapes one subscription with service principal credentials and forwards metrics to Osuite. Replace the subscription, tenant, and client identifiers.

receivers:
azure_monitor:
subscription_ids:
- <your-subscription-id>
tenant_id: <your-tenant-id>
client_id: <your-client-id>
client_secret: ${env:AZURE_CLIENT_SECRET}
collection_interval: 60s
processors:
batch:
exporters:
otlp/osuite:
endpoint: ingest.<region>.osuite.io:443
tls:
insecure: false
headers:
x-osuite-ingest-token: <your-ingest-token>
service:
pipelines:
metrics:
receivers: [azure_monitor]
processors: [batch]
exporters: [otlp/osuite]

To limit scraping to specific services and metrics, add resource_groups, services, and metrics filters:

azure_monitor:
subscription_ids:
- <your-subscription-id>
tenant_id: <your-tenant-id>
client_id: <your-client-id>
client_secret: ${env:AZURE_CLIENT_SECRET}
collection_interval: 60s
services:
- Microsoft.Compute/virtualMachines
- Microsoft.Storage/storageAccounts
metrics:
"microsoft.compute/virtualmachines":
"Percentage CPU": [Average]

Start the Collector and confirm it logs no authentication (401/403) or throttling errors against the Azure Monitor API. Then check Osuite.

What you should see

Azure Monitor metrics appear in Dashboards → Explore metrics within a few minutes, named after their Azure metric (for example Percentage CPU under Microsoft.Compute/virtualMachines), with the resource ID and resource group attached as attributes.

Metrics keep their Azure metric name and are tagged with the resource type namespace, resource ID, and resource group; enabling append_tags_as_attributes adds selected Azure resource tags as attributes. Metric dimensions are split out unless you disable dimensions.enabled.

Common namespaces:

NamespaceCovers
Microsoft.Compute/virtualMachinesVM CPU, disk, network
Microsoft.Storage/storageAccountsTransactions, capacity, latency, availability
Microsoft.Sql/servers/databasesDTU/vCore usage, connections, deadlocks
Microsoft.Web/sitesApp Service requests, response time, HTTP 5xx
Microsoft.Network/loadBalancersData path availability, byte and packet counts
Microsoft.ContainerService/managedClustersAKS node and pod resource metrics

An empty result set almost always means the service principal lacks the Monitoring Reader role on the subscription, or the wrong tenant/client identifiers are set. Confirm the role assignment, confirm AZURE_CLIENT_SECRET is exported to the Collector process, and remember that a metrics block silently drops any metric you did not list for that namespace. If you scrape many resources and hit rate limits, set use_batch_api: true.

No data in Osuite after a few minutes? Work through these checks.

  • Endpoint — confirm the exporter targets exactly ingest.<region>.osuite.io:443 for your region, over TLS.
  • Token — confirm the ingest header carries a valid <your-ingest-token> and has not been rotated.
  • Pipeline — confirm the signal you expect (traces, logs, or metrics) is wired into an active pipeline with the otlp/osuite exporter attached.
  • Export errors — check the application or Collector logs for OTLP export failures (auth, DNS, TLS, connection refused).
  • Network — confirm the host has outbound access to the ingest endpoint on port 443.
  • Timing — allow up to a minute for the first data to appear before assuming a failure.

Still stuck? Ask the Investigation Agent or contact support.

  • Dashboards — build views over your Azure Monitor metrics.
  • Alerts — alert on Azure thresholds with PromQL.