cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom Prometheus ActiveGate plugin

Bouke
Frequent Guest

I created a custom Prometheus ActiveGate plugin where we currently do a call to an endpoint to get a list of metrics. This is currently working and we now want to change it to do a call to the prometheus endpoint api based on a query.

 

In the extensions.yaml file you define the specific metrics you want to capture based on the list of metrics you get from calling the API or an endpoint. For testing purposes we did define two static metrics we wanted to capture to see if the integration did work:

 

 

 

 dimensions:
      - key: go
        value: const:go
        metrics:
          - key: custom.extension.prometheus-go.global.go_threads
            value: metric:go_threads
            type: count
          - key: custom.extension.prometheus-go.global.go_memstats_sys_bytes
            value: metric:go_memstats_sys_bytes
            type: count

 

 

 

But now we want to scrape specific metrics or all metrics (since there are more than 300+) which are returned when executing the specific query call to the Prometheus API. Is there some way to dynamically do this and if so how?

1 REPLY 1

pahofmann
DynaMight Guru
DynaMight Guru

No unfortunately not, as the metrics have to be defined during extension creation/setup.

You can only dynamically create dimensions for a metric, but even there the dimension has to be setup during extension creating and you can only add more instances of a dimension dynamically.

Dynatrace Certified Master - Dynatrace Partner - 360Performance.net

Featured Posts