webdevops / azure-metrics-exporter

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

Unable to fetch metrics which doesn't have dimension #45

Closed logamanig closed 1 year ago

logamanig commented 1 year ago

Hi,

Following config using helm chart is not working for me. It seems like metrics without dimensions is not working, I tried another configurationf for storage account only metrics with dimensions are exporteed and others ignored. Can you please help me on this?

Thank you!

metricProbes:
      params:
        template: ["{name}_{metric}_{aggregation}_{unit}"]
        subscription:
          - xxx-xx-xx
      probes:
        - name: azuresql
          metrics_path: /probe/metrics/list
          interval: 30s
          params:
            name: ["az_sql"]
            filter: ["resourceType eq 'Microsoft.Sql/servers/databases'"]
            metric:
              - active_queries
              - allocated_data_storage
              - blocked_by_firewall
              - cache_hit_percent
              - cache_used_percent
              - cpu_limit
              - cpu_percent
              - cpu_used
              - app_memory_percent
              - app_cpu_percent
              - memory_usage_percent
            interval: ["PT30S"]
            timespan: ["PT30S"]
            aggregation:
              - average
              - total
              - maximum
mblaschke commented 1 year ago

What error do you get or do you just get nothing? Which version are you using? Have you tried the query page for testing (http://azure-metrics-exporter:8080/query)? Are you sure these metrics are avilable in 30 second interval? Azure is not exporting everything with these short intervals, some metrics are only available as PT15M or PT1H.

mblaschke commented 1 year ago

Latest version uses AutoAdjustTimegrain from Azure Monitor API so it will adjust intervals automatically.

Feel free to reopen if issue still exists.