Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
esierrapena opened this issue Apr 23, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@esierrapena
Copy link

esierrapena commented Apr 23, 2021

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

@esierrapena esierrapena added the bug Something isn't working label Apr 23, 2021
@tomkerkhove tomkerkhove added this to the Scraper - v2.3.0 milestone Apr 24, 2021
@tomkerkhove
Copy link
Owner

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)?

@tomkerkhove
Copy link
Owner

Using 1 minute as an aggregation is also not ideal since Azure Monitor has a lag, so I'm not sure if this is related but better alignt the Azure Portal metrics with the Promitor configuration and verify.

Relates to #1290 & #1563

@esierrapena
Copy link
Author

hi! seems to work with the recommended configuration, closing this issue..

@tomkerkhove
Copy link
Owner

Huh so it was just a difference in the aggregation then? Thanks for letting me know!

@esierrapena
Copy link
Author

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

Repository owner locked and limited conversation to collaborators Apr 27, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants