webdevops / azure-metrics-exporter

Azure Monitor metrics exporter for Prometheus with dimension support, template engine and ServiceDiscovery
MIT License
126 stars 27 forks source link

Support to export all the dimensions of azure metrics #99

Open ajithkumar25b opened 2 months ago

ajithkumar25b commented 2 months ago

Hello @mblaschke ,

Is there a way to get all the dimensions of the azure metrics?

Let's take the example of load balancer. image 2024-09-20 at 2 51 47 PM

https://learn.microsoft.com/en-ca/azure/load-balancer/monitor-load-balancer-reference

My scrape config is given below ; `- job_name: webdevops-azure-metrics-loadbalancer scrape_interval: 1m metrics_path: /probe/metrics/list params: name: ["azure_metricloadbalancers"] template: ["{name}{metric}{aggregation}{unit}"] subscription:

Scraped Metric for SnatConnectionCount ; azure_metric_loadbalancers_snatconnectioncount_average_count{instance="***", interval="PT15M", job="webdevops-azure-metrics-loadbalancer", resourceGroup="****", resourceID="**", resourceName="***", subscriptionID="***", subscriptionName="***", timespan="PT15M"}

In the above metric, you can see that the FrontendIPAddress, BackendIPAddress, and ConnectionState fields are missing !!!

I have tried using the metricFilter parameter in the scrape job, and I got an additional field in the metric->dimension with value as IP address. metricFilter: ["FrontendIPAddress eq '*'"]

I tried adding all the dimensions in the metricFilter parameter, and I got the same result as above. This issue is similar to https://github.com/webdevops/azure-metrics-exporter/issues/58

Is there a way to get all the dimensions in the single configuration?

Thanks in advance!!!

mblaschke commented 1 month ago

The exporter is using the Azure Monitor REST API and is so limited to whatever Azure can provide.

This is actually not a limitation of the exporter but a limitation of Azure.