promitor icon indicating copy to clipboard operation
promitor copied to clipboard

Provide capability to use multiple metric dimensions

Open tomkerkhove opened this issue 3 years ago • 9 comments

Proposal

Provide capability to use multiple metric dimensions instead of just one.

Our current metric declaration looks as following:

- name: azure_service_bus_active_messages
    description: "The number of active messages on a service bus queue."
    resourceType: ServiceBusNamespace
    labels:
      app: promitor
      tier: messaging
    scraping:
      # Every 2 minutes
      schedule: "0 */2 * ? * *"
    azureMetricConfiguration:
      metricName: ActiveMessages
      limit: 5
      dimension:
        name: <dimension-name>
      aggregation:
        type: Total
        interval: 00:15:00
    resources: # Optional, required when no resource discovery is configured
      - namespace: promitor-messaging
        queueName: orders

This will change to:

- name: azure_service_bus_active_messages
    description: "The number of active messages on a service bus queue."
    resourceType: ServiceBusNamespace
    labels:
      app: promitor
      tier: messaging
    scraping:
      # Every 2 minutes
      schedule: "0 */2 * ? * *"
    azureMetricConfiguration:
      metricName: ActiveMessages
      limit: 5
      dimension: # Deprecated, use dimensions instead
        name: <dimension-name>
+     dimensions:
+     - name: <dimension-name-1>
+     - name: <dimension-name-2>
      aggregation:
        type: Total
        interval: 00:15:00
    resources: # Optional, required when no resource discovery is configured
      - namespace: promitor-messaging
        queueName: orders

Relates to #809

Component

Scraper

Contact Details

No response

tomkerkhove avatar Oct 23 '21 12:10 tomkerkhove

@locmai volunteered to contribute this, thank you! I have added the config spec above

tomkerkhove avatar Oct 23 '21 12:10 tomkerkhove

Hello @tomkerkhove , On which scraper version we can expect this?.. I am using 2.6.1 promitor scraper, but when i used above config i got below error-

Warning 25:5: Unknown field 'dimensions'. Did you mean 'dimension'? Warning 37:5: Unknown field 'dimensions'. Did you mean 'dimension'? [12:13:52 WRN] No metric information found for metric Data Disk Read Operations/Sec with dimension null. Details: No time series was found [12:13:52 WRN] No metric information found for metric Data Disk Write Operations/Sec with dimension null. Details: No time series was found

My azureMetricConfiguration -

- name: azure_virtual_machine_scalesets_disk_read_op
  description: "Average Disk Read Operations Per seconds"
  resourceType: VirtualMachineScaleSet
  azureMetricConfiguration:
    metricName: Data Disk Read Operations/Sec
    dimensions:
    - name: LUN
    - name: VMName
    aggregation:
      type: Average
  resourceDiscoveryGroups:
  - name: azure-rony-use2-resources

ronyrv13 avatar Apr 21 '22 12:04 ronyrv13

Sorry we don't have this yet. I was working on this one then got side-tracked with the other works from my daily job :'(

locmai avatar Apr 21 '22 12:04 locmai

Thanks mate for the update, will for this functionality.

ronyrv13 avatar Apr 21 '22 13:04 ronyrv13

Hi all, I am also very interested in being able to specify multiple dimensions in a metric definition. Is there any kind of roadmap for this feature?

Patrick-Eichhorn avatar Jun 22 '22 13:06 Patrick-Eichhorn

It's not being worked on at the moment but open to contributions!

tomkerkhove avatar Jun 22 '22 13:06 tomkerkhove

@Patrick-Eichhorn and me are looking into this now, a PR will hopefully follow soon :)

aaronweissler avatar Aug 06 '22 08:08 aaronweissler

@Patrick-Eichhorn and me are looking into this now, a PR will hopefully follow soon :)

aaronweissler avatar Aug 06 '22 08:08 aaronweissler

Thanks a ton! I'm currently working to get OTEL closed first so appreciate the help!

tomkerkhove avatar Aug 06 '22 12:08 tomkerkhove