prometheus / jmx_exporter

A process for exposing JMX Beans via HTTP for Prometheus consumption
Apache License 2.0
3.01k stars 1.2k forks source link

Is it possible to add custom k8s attributes as labels for Kafka connect JMX metrics #893

Open sappusaketh opened 9 months ago

sappusaketh commented 9 months ago

I want to see if I can add annotations from Kafkaconnector crd to connect specific metrics? I know this issue is not directly linked to jmx_exporter wondering if there is a way to add custom k8s attributes as labels I m using strimzi as my kafka cluster operator and here is my metrics config map

dhoard commented 9 months ago

You should be able to add static labels in your exporter YAM. If the labels are POD specific you would have to preprocess the exporter YAML before starting.

sappusaketh commented 9 months ago

The labels are specific to KafkaConnector CRD I m not sure if i have to build some map and add any custom logic? Wondering if I can do this via JMX rules?