You can use OpenTelemetry Collector to ingest metrics from Azure Monitor. Once metrics are flowing into Cloud Observability, you can use prebuilt dashboards to view them.
AZURE_CLIENT_IDAZURE_CLIENT_SECRETAZURE_SUBSCRIPTION_IDAZURE_TENANT_IDIn the OpenTelemetry Collector configuration file, add azuremonitor as a receiver and set the following:
subscription_idtenant_idclient_idclient_secret1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
receivers:
azuremonitor:
subscription_id: "${AZURE_SUBSCRIPTION_ID}"
tenant_id: "${AZURE_TENANT_ID}"
client_id: "${AZURE_CLIENT_ID}"
client_secret: "${AZURE_CLIENT_SECRET}"
resource_groups:
- "example-resources"
services:
- "microsoft.compute/disks"
- "Microsoft.Network/networkInterfaces"
- "Microsoft.Compute/virtualMachines"
collection_interval: 60s
exporters:
logging:
loglevel: debug
otlp/public:
endpoint: ingest.lightstep.com:443 # US data center
# endpoint: ingest.eu.lightstep.com:443 # EU data center
headers:
"lightstep-access-token": "${LS_ACCESS_TOKEN}"
processors:
batch:
service:
pipelines:
metrics/azuremonitor:
receivers: [azuremonitor]
processors: [batch]
exporters: [logging, otlp/public]
View optional settings and descriptions.
Once the Azure receiver is configured, enable it by adding it to one or more pipelines as described in the Collector configuration documentation.
Follow these instructions to create pre-built dashboards for the Azure metrics.
See Azure documentation for a complete list of emitted metrics.
For a more complete example that’s ready to run, see the Azure integrations in Cloud Observability OpenTelemetry Examples.
Ingest metrics using the Collector
Updated Sep 5, 2023