Debug Azure Load Balancer Alerts
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 7
- Forks
- 2
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 3
Description
Context
The Azure Load Balancer alert rules (azure_lb_health_probe_down, azure_lb_data_path_down, azure_lb_snat_port_exhaustion) in azure_loadbalancer.yaml have been temporarily removed because the underlying metrics never appear in Grafana. The alerts were permanently firing in NoData state.
The Alloy prometheus.exporter.azure component successfully discovers load balancer resources via Azure Resource Graph, but silently fails to fetch metrics from Azure Monitor — it makes zero API calls for Microsoft.Network/loadBalancers while other resource types (NetApp, PostgreSQL, Storage) work correctly with identical configuration patterns.
Investigation summary
Two debugging sessions confirmed:
- Resource discovery works: Alloy finds the load balancers and reports 1 scrape target
- Metrics exist in Azure:
az monitor metrics listreturns data forUsedSnatPorts,AllocatedSnatPorts, andSnatConnectionCount - No Azure Monitor API calls: Alloy's
azurerm_api_request_countshows 0 requests formicrosoft.network, vs 125+ formicrosoft.netapp - No errors logged: The exporter fails silently with no warnings or errors
- Same identity/permissions: All Azure exporters use the same managed identity and subscription
Configuration variations tested without success: case-insensitive resource group filters (==, =~, tolower()), removing included_dimensions, adding explicit metric_aggregations, removing metrics that had no data (DipAvailability, VipAvailability).
What needs to be done
- Diagnose the Alloy exporter failure — likely candidates:
- Alloy bug specific to
Microsoft.Network/loadBalancersresource type - Load balancer metrics requiring a
metric_namespaceparameter or explicit dimension filters - Silent validation failure during metric collection setup
- Alloy bug specific to
- Re-enable alerts once metrics flow into Grafana — restore alert definitions from git history and remove the
deleteRulesblock inazure_loadbalancer.yaml
Suggested next steps
- Try adding
metric_namespace = "Microsoft.Network/loadBalancers"to the Alloy exporter config - Enable Alloy debug logging (
logging { level = "debug" }) to capture internal exporter behavior - Filter to a single load balancer (
name == 'kubernetes') to isolate multi-resource issues - If none of the above work, file a bug against grafana/alloy
Related files
python-pulumi/src/ptd/grafana_alerts/azure_loadbalancer.yaml— currently containsdeleteRulesto clean up the alertspython-pulumi/src/ptd/pulumi_resources/grafana_alloy.py— Alloy exporter configuration
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with python-pulumi/src/ptd/pulumi_resources/grafana_alloy.py and python-pulumi/src/ptd/grafana_alerts/azure_loadbalancer.yaml; enable Alloy debug logging and test a single load balancer using the suggested metric namespace and filters. Compare Azure API request counts and Grafana metrics with working exporters. Done means the load-balancer metrics flow and the alert definitions are restored without NoData firing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, grafana
- Domain
- cloud, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100