Skip to content

Commit

Permalink
Added type to Prometheus JMX exporter
Browse files Browse the repository at this point in the history
Otherwise metrics show up as `untyped`
Also added `kafka.producer` metrics since this is not going to be used with a `kafka.connect` container
  • Loading branch information
missingcharacter authored Jul 8, 2024
1 parent 0faa19f commit 8859b38
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions debezium-server-dist/src/main/resources/distro/conf/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,42 @@ ssl: false
lowercaseOutputName: false
lowercaseOutputLabelNames: false
rules:
- pattern : "kafka.connect<type=connect-worker-metrics>([^:]+):"
- pattern: "kafka.producer<type=producer-metrics, client-id=([^>]+)><>([^:]+)"
name: "kafka_producer_metrics_$2"
type: GAUGE
labels:
client: "$1"
- pattern: "kafka.producer<type=producer-node-metrics, client-id=([^>]+), node-id=([^>]+)><>([^:]+)"
name: "kafka_producer_node_metrics_$3"
type: GAUGE
labels:
client: "$1"
node: "$2"
- pattern: "kafka.producer<type=producer-node-metrics, client-id=([^>]+), topic=([^>]+)><>([^:]+)"
name: "kafka_producer_node_metrics_$3"
type: GAUGE
labels:
client: "$1"
topic: "$2"
- pattern: "kafka.connect<type=connect-worker-metrics>([^:]+):"
name: "kafka_connect_worker_metrics_$1"
- pattern : "kafka.connect<type=connect-metrics, client-id=([^:]+)><>([^:]+)"
type: GAUGE
- pattern: "kafka.connect<type=connect-metrics, client-id=([^:]+)><>([^:]+)"
name: "kafka_connect_metrics_$2"
type: GAUGE
labels:
client: "$1"
- pattern: "debezium.([^:]+)<type=connector-metrics, context=([^,]+), server=([^,]+), key=([^>]+)><>RowsScanned"
name: "debezium_metrics_RowsScanned"
type: GAUGE
labels:
plugin: "$1"
name: "$3"
context: "$2"
table: "$4"
- pattern: "debezium.([^:]+)<type=connector-metrics, server=([^,]+), task=([^,]+), context=([^,]+), database=([^>]+)>([^:]+)"
name: "debezium_metrics_$6"
type: GAUGE
labels:
plugin: "$1"
name: "$2"
Expand All @@ -26,13 +47,15 @@ rules:
database: "$5"
- pattern: "debezium.([^:]+)<type=connector-metrics, server=([^,]+), task=([^,]+), context=([^>]+)>([^:]+)"
name: "debezium_metrics_$5"
type: GAUGE
labels:
plugin: "$1"
name: "$2"
task: "$3"
context: "$4"
- pattern: "debezium.([^:]+)<type=connector-metrics, context=([^,]+), server=([^>]+)>([^:]+)"
name: "debezium_metrics_$4"
type: GAUGE
labels:
plugin: "$1"
name: "$3"
Expand Down

0 comments on commit 8859b38

Please sign in to comment.