Add prometheus labels and metric name suffix
mhofsche opened this issue · comments
What: Would like to add labels to prometheus metrics. Similar to influxDB extension tags they can be optionally configured in the configuration.
Example:
labels:host=--NODE-NAME--
How: Support for labels was added to supporting library with version 0.6.0 client_java.
--> [FEATURE] Allow mapping DropWizard metrics with Prometheus labels (#435)
The library is already updated to version 0.9.0 for the extension and therefore supports labels with the SampleBuilder.
Result: Metrics are exported with optional labels.
Example:
com_hivemq_jvm_buffer_pool_direct_used{host="host123",} 16385.0
At the same time it would be good to support the possibility for a metric name suffix as well:
Example (with cluster1 as suffix):
com_hivemq_jvm_buffer_pool_direct_used_cluster1.
Work: Have a branch ready if issue is approved.
How would the config look for this or are alle labels hard coded?
The config would look like the tags in the hivemq-influxdb-extension:
labels:host=nodename1
Yes the labels would be hardcoded or rather scripted.
Closed with #16