Azure Monitor metrics in Osuite
Overview
Section titled “Overview”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.
Prerequisites
Section titled “Prerequisites”- An OpenTelemetry Collector from the Contrib distribution (
otelcol-contrib) that includes theazure_monitorreceiver. - Your Osuite ingest endpoint and token.
- An Azure AD app registration (service principal) for the Collector to authenticate as:
- In Azure AD, register an application and record its Directory (tenant) ID and Application (client) ID.
- Create a client secret for the application and record its value.
- 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_SECRETenvironment variable so it stays out of the config file.
Collector config
Section titled “Collector config”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]Validate
Section titled “Validate”Start the Collector and confirm it logs no authentication (401/403) or throttling errors against the Azure Monitor API. Then check Osuite.
Verify in Osuite
Section titled “Verify in 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.
Data collected
Section titled “Data collected”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:
| Namespace | Covers |
|---|---|
Microsoft.Compute/virtualMachines | VM CPU, disk, network |
Microsoft.Storage/storageAccounts | Transactions, capacity, latency, availability |
Microsoft.Sql/servers/databases | DTU/vCore usage, connections, deadlocks |
Microsoft.Web/sites | App Service requests, response time, HTTP 5xx |
Microsoft.Network/loadBalancers | Data path availability, byte and packet counts |
Microsoft.ContainerService/managedClusters | AKS node and pod resource metrics |
Troubleshooting
Section titled “Troubleshooting”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:443for 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/osuiteexporter 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.
Next steps
Section titled “Next steps”- Dashboards — build views over your Azure Monitor metrics.
- Alerts — alert on Azure thresholds with PromQL.