Skip to content

Commit

Permalink
add Kafka metric support for 3 labels (#778)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucian Ilie <[email protected]>
  • Loading branch information
ctrlaltluc and ctrlaltluc authored Mar 22, 2022
1 parent e8c44e1 commit fbce6a0
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion api/assets/kafka/jmx-exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ rules:
# Emulate Prometheus 'Summary' metrics for the exported 'Histogram's.
#
# Note that these are missing the '_sum' metric!
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+), (.+)=(.+)><>Count
name: kafka_$1_$2_$3_count
cache: true
type: COUNTER
labels:
"$4": "$5"
"$6": "$7"
"$8": "$9"
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+)><>Count
name: kafka_$1_$2_$3_count
cache: true
Expand Down Expand Up @@ -194,7 +202,16 @@ rules:
type: GAUGE
labels:
quantile: "0.$4"
# Catch all other GAUGES with other types with 0-2 key-value pairs
# Catch all other GAUGES with other types with 0-3 key-value pairs
- pattern : kafka.(\w+)<type=([A-Za-z-]+), (.+)=(.+), (.+)=(.+), (.+)=(.+)><>([A-Za-z-]+)
name: kafka_$1_$2_$9
type: GAUGE
cache: true
labels:
"$3": "$4"
"$5": "$6"
"$7": "$8"
# Catch all other GAUGES with other types with 0-2 key-value pairs
- pattern : kafka.(\w+)<type=([A-Za-z-]+), (.+)=(.+), (.+)=(.+)><>([A-Za-z-]+)
name: kafka_$1_$2_$7
type: GAUGE
Expand Down

0 comments on commit fbce6a0

Please sign in to comment.