question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Promitor exports metric with name Size to Prometheus that does not match the one in Azure Monitor

See original GitHub issue

Report

I have deployed the promitor scraper in a k8s cluster but metric “Size” of Eventhub resource exported to Prometheus doesn’t match the one i can see in Azure Portal.

Expected Behavior

Same metric in Azure portal as in Prometheus

Actual Behavior

Different metric value

Steps to Reproduce the Problem

  1. Define configmap
apiVersion: v1
data:
  metrics-declaration.yaml: |-
    version: v1
    azureMetadata:
      tenantId: a5bXXXXXXXXXXXXXXXX4bf20
      subscriptionId: 8f17XXXXXXXXXXXXXX680e1e0
      resourceGroupName: test-northeurope
    metricDefaults:
      aggregation:
        interval: 00:01:00
      scraping:
        schedule: "* * * * *"
    metrics:
      - name: azure_eventhubs_size
        description: "Size of an EventHub in Bytes."
        resourceType: EventHubs
        azureMetricConfiguration:
          metricName: Size
          aggregation:
            type: Average
        resources:
          - namespace: test-eventhub-namespace-hgu
  1. Check metrics in Grafana with Azure Monitor as datasource (Figure 1) and Prometheus as datasource (Figure 2). Figure 3 metrics in Azure portal Figure 1 image Figure 2 image Figure 3 image

Component

Scraper

Version

2.0.0

Configuration

Configuration:

apiVersion: v1
data:
  metrics-declaration.yaml: |-
    version: v1
    azureMetadata:
      tenantId: a5bXXXXXXXXXXXXXXXX4bf20
      subscriptionId: 8f17XXXXXXXXXXXXXX680e1e0
      resourceGroupName: test-northeurope
    metricDefaults:
      aggregation:
        interval: 00:01:00
      scraping:
        schedule: "* * * * *"
    metrics:
      - name: azure_eventhubs_size
        description: "Size of an EventHub in Bytes."
        resourceType: EventHubs
        azureMetricConfiguration:
          metricName: Size
          aggregation:
            type: Average
        resources:
          - namespace: test-eventhub-namespace-hgu

Logs

No response

Platform

Microsoft Azure

Contact Details

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tomkerkhovecommented, Apr 24, 2021

Thanks for reporting, can you share the configuration of the graph in Azure Portal please? Does it also use the same aggregation as Promitor (00:01:00)?

0reactions
esierrapenacommented, Apr 26, 2021

Now, seems to work well with both configuration as you can see below:

  metrics-declaration.yaml: |-
    version: v1
    azureMetadata:
      tenantId: xxxxx
      subscriptionId: xxxxxxxxxx
      resourceGroupName: xxxxxxx
    metricDefaults:
      aggregation:
        interval: 00:01:00
      scraping:
        schedule: "* * * * *"
    metrics:
      - name: azure_eventhubs_size
        description: "Size of an EventHub in Bytes."
        resourceType: EventHubs
        azureMetricConfiguration:
          metricName: Size
          aggregation:
            type: Average
          dimension:
            name: EntityName
        resources:
          - namespace: test-eventhub-namespace-hgu
  runtime.yaml: |-
    server:
      httpPort: 88
    metricSinks:
      prometheusScrapingEndpoint:
        metricUnavailableValue: "NaN"
        enableMetricTimestamps: "true"
        baseUriPath: "/metrics"
    metricsConfiguration:
      absolutePath: /config/metrics-declaration.yaml
    telemetry:
      containerLogs:
        isEnabled: "true"
      defaultVerbosity: "Error"

Metrics in grafana

image

Metrics in Azure Portal

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Null values for metrics if interval is set to 1 minute #1290
I then started to play a bit with the azure metrics api and I think I have ... Promitor exports metric with name...
Read more >
Troubleshoot collection of Prometheus metrics in Azure ...
Follow the steps in this article to determine the cause of Prometheus metrics not being collected as expected in Azure Monitor.
Read more >
Use Azure Monitor Metrics in Kubernetes with Prometheus ...
The metrics for Service Bus queue size are all collected by Azure Monitor, ... Promitor is an Azure Monitor Scraper for Prometheus.
Read more >
Frequently Asked Questions
You can configure the dimension you are interested in via azureMetricConfiguration.dimension.Name , for more information see our 'Metric Configuration' page ...
Read more >
Monitor Azure Resources using Promitor | blog-posts
Promitor is a Prometheus Exporter that allows you to monitor your Azure ... a look at the Azure Monitor documentation, you won't find...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found