Last active
February 22, 2021 07:48
-
-
Save mostafa-asg/a0d36d41c6167ed1b25f0ce8a505037b to your computer and use it in GitHub Desktop.
Kafka Prometheous JMX exporter config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export KAFKA_OPTS="-javaagent:{PATH}/jmx_prometheus_javaagent-0.14.0.jar=9090:{PATH}/prom-jmx-agent-config.yml" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/prometheus/jmx_exporter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lowercaseOutputName: true | |
rules: | |
- pattern : kafka.cluster<type=(.+), name=(.+), topic=(.+), partition=(.+)><>Value | |
name: kafka_cluster_$1_$2 | |
labels: | |
topic: "$3" | |
partition: "$4" | |
- pattern : kafka.log<type=Log, name=(.+), topic=(.+), partition=(.+)><>Value | |
name: kafka_log_$1 | |
labels: | |
topic: "$2" | |
partition: "$3" | |
- pattern : kafka.controller<type=(.+), name=(.+)><>(Count|Value) | |
name: kafka_controller_$1_$2 | |
- pattern : kafka.network<type=(.+), name=(.+)><>Value | |
name: kafka_network_$1_$2 | |
- pattern : kafka.network<type=(.+), name=(.+)PerSec, request=(.+)><>Count | |
name: kafka_network_$1_$2_total | |
labels: | |
request: "$3" | |
- pattern : kafka.network<type=(.+), name=(\w+), networkProcessor=(.+)><>Count | |
name: kafka_network_$1_$2 | |
labels: | |
request: "$3" | |
type: COUNTER | |
- pattern : kafka.network<type=(.+), name=(\w+), request=(\w+)><>Count | |
name: kafka_network_$1_$2 | |
labels: | |
request: "$3" | |
- pattern : kafka.network<type=(.+), name=(\w+)><>Count | |
name: kafka_network_$1_$2 | |
- pattern : kafka.server<type=(.+), name=(.+)PerSec\w*, topic=(.+)><>Count | |
name: kafka_server_$1_$2_total | |
labels: | |
topic: "$3" | |
- pattern : kafka.server<type=(.+), name=(.+)PerSec\w*><>Count | |
name: kafka_server_$1_$2_total | |
type: COUNTER | |
- pattern : kafka.server<type=(.+), name=(.+), clientId=(.+), topic=(.+), partition=(.*)><>(Count|Value) | |
name: kafka_server_$1_$2 | |
labels: | |
clientId: "$3" | |
topic: "$4" | |
partition: "$5" | |
- pattern : kafka.server<type=(.+), name=(.+), topic=(.+), partition=(.*)><>(Count|Value) | |
name: kafka_server_$1_$2 | |
labels: | |
topic: "$3" | |
partition: "$4" | |
- pattern : kafka.server<type=(.+), name=(.+), topic=(.+)><>(Count|Value) | |
name: kafka_server_$1_$2 | |
labels: | |
topic: "$3" | |
type: COUNTER | |
- pattern : kafka.server<type=(.+), name=(.+), clientId=(.+), brokerHost=(.+), brokerPort=(.+)><>(Count|Value) | |
name: kafka_server_$1_$2 | |
labels: | |
clientId: "$3" | |
broker: "$4:$5" | |
- pattern : kafka.server<type=(.+), name=(.+), clientId=(.+)><>(Count|Value) | |
name: kafka_server_$1_$2 | |
labels: | |
clientId: "$3" | |
- pattern : kafka.server<type=(.+), name=(.+)><>(Count|Value) | |
name: kafka_server_$1_$2 | |
- pattern : kafka.(\w+)<type=(.+), name=(.+)PerSec\w*><>Count | |
name: kafka_$1_$2_$3_total | |
- pattern : kafka.(\w+)<type=(.+), name=(.+)PerSec\w*, topic=(.+)><>Count | |
name: kafka_$1_$2_$3_total | |
labels: | |
topic: "$4" | |
type: COUNTER | |
- pattern : kafka.(\w+)<type=(.+), name=(.+)PerSec\w*, topic=(.+), partition=(.+)><>Count | |
name: kafka_$1_$2_$3_total | |
labels: | |
topic: "$4" | |
partition: "$5" | |
type: COUNTER | |
- pattern : kafka.(\w+)<type=(.+), name=(.+)><>(Count|Value) | |
name: kafka_$1_$2_$3_$4 | |
type: COUNTER | |
- pattern : kafka.(\w+)<type=(.+), name=(.+), (\w+)=(.+)><>(Count|Value) | |
name: kafka_$1_$2_$3_$6 | |
labels: | |
"$4": "$5" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment