使用 jmx_exporter 将自定义标签添加到 jvm 相关指标
Adding custom labels to jvm related metrics using jmx_exporter
我想在使用 prometheus_jmx_exporter with kafka. I couldn't figure out the rules/patterns to be used for the same. Logged Github comment as well on a similar issue 时为 jvm.*
或 process.*
相关指标添加自定义标签 "key:my-app"
,但没有响应。
以下不会将标签 "services="my-app"
添加到生成的指标中:
rules:
- pattern : process.cpu.seconds.total
name: kafka_process_cpu_seconds_total
labels:
services: "my-app"
在 Prometheus 中,此类标签称为目标标签,并应用于 Prometheus 端。通常这是根据服务发现的元数据使用 relabel_configs
完成的。
我想在使用 prometheus_jmx_exporter with kafka. I couldn't figure out the rules/patterns to be used for the same. Logged Github comment as well on a similar issue 时为 jvm.*
或 process.*
相关指标添加自定义标签 "key:my-app"
,但没有响应。
以下不会将标签 "services="my-app"
添加到生成的指标中:
rules:
- pattern : process.cpu.seconds.total
name: kafka_process_cpu_seconds_total
labels:
services: "my-app"
在 Prometheus 中,此类标签称为目标标签,并应用于 Prometheus 端。通常这是根据服务发现的元数据使用 relabel_configs
完成的。