From 15cbc93fd4bf1be7122a51fa873c916456987aea Mon Sep 17 00:00:00 2001 From: Lior Franko Date: Tue, 19 Jul 2022 12:31:41 +0300 Subject: [PATCH] Add kafka.streams metrics --- files/configs/kafka-client.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/files/configs/kafka-client.yaml b/files/configs/kafka-client.yaml index 989078a..dd213d9 100644 --- a/files/configs/kafka-client.yaml +++ b/files/configs/kafka-client.yaml @@ -5,12 +5,42 @@ cacheRules: true whitelistObjectNames: - "kafka.consumer:*" - "kafka.producer:*" + - "kafka.streams:*" blacklistObjectNames: + - "kafka.streams:type=kafka-metrics-count" - "kafka.admin.client:*" - "kafka.consumer:type=*,id=*" - "kafka.producer:type=*,id=*" - "kafka.*:type=kafka-metrics-count,*" rules: + - pattern: "kafka.streams<>(.+):" + name: kafka_streams_$1_$6 + type: GAUGE + labels: + thread_id: "$2" + task_id: "$3" + $4: "$5" + # kafka.streams:type=stream-task-metrics,task-id=*,thread-id=* + - pattern: "kafka.streams<>(.+):" + name: kafka_streams_$1_$4 + type: GAUGE + labels: + thread_id: "$2" + task_id: "$3" + # kafka.streams:type=stream-metrics,client-id=* + - pattern: "kafka.streams<>(state|alive-stream-threads|commit-id|version|application-id): (.+)" + name: kafka_streams_stream_metrics + value: 1 + type: UNTYPED + labels: + $1: "$2" + $3: "$4" + # kafka.streams:type=stream-thread-metrics,thread-id=* + - pattern: "kafka.streams<>([^:]+)" + name: kafka_streams_$1_$4 + type: GAUGE + labels: + $2: "$3" # "kafka.consumer:type=app-info,client-id=*" # "kafka.producer:type=app-info,client-id=*" - pattern: "kafka.(.+)<>(.+): (.+)"