-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Bug: Metrics Not Emitted When Timeseries Has No Dimensions
Exporter Version:
v25.5.0
Azure Resource Type:
Microsoft.Network/virtualNetworkGateways
Example Metrics:
TunnelIngressPackets
TunnelEgressPackets
🐛 Problem
The exporter receives data from Azure Monitor (verified via az monitor metrics list
), but the response contains no metadatavalues
, i.e., no dimensions.
Despite valid data (non-zero totals), the exporter emits no Prometheus metrics — response is always 200 OK
with Content-Length: 0
.
✅ Repro Steps
-
Deployed
azure-metrics-exporter
with:args: - --server.bind=:9276 - --metrics.template={name}
-
Verified Azure CLI returns valid metric data:
az monitor metrics list \ --resource <resourceId> \ --metric TunnelIngressPackets \ --aggregation Total
-
Probed the exporter:
curl "http://localhost:9276/probe/metrics?aggregation=total&interval=PT5M&metric=TunnelIngressPackets&name=custom&resource=<full-resource-id>&resourceType=Microsoft.Network/virtualNetworkGateways&subscription=<subscription-id>×pan=PT1H"
-
Exporter logs show request handled with status 200, but Prometheus output is empty.
-
Also tested:
- Removing
config.yaml
- Using
name=custom
- Adding
--metrics.template={name}
- Removing
🤔 Expected Behavior
Exporter should emit flat Prometheus metrics even if Azure Monitor omits dimensions (metadatavalues[]
is empty).
❌ Actual Behavior
Exporter silently skips these metrics. Only metrics with dimensions are emitted.
📎 Azure CLI Response Sample
"timeseries": [
{
"data": [
{
"timeStamp": "2025-05-08T11:14:00Z",
"total": 64144.0
}
],
"metadatavalues": []
}
]