Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kafka client example config #305

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add kafka client example config
Signed-off-by: Mahmoud Saada <mahmoudsaada@gmail.com>
  • Loading branch information
saada committed Aug 11, 2018
commit 92a6eb106e84cd441ba9b6123132395738d6acd6
93 changes: 93 additions & 0 deletions example_configs/kafka-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
lowercaseOutputName: true
lowercaseOutputLabelNames: true
rules:
### Metrics with Attributes
#kafka.admin.client:type=admin-client-metrics,client-id=moody-test_client-admin
#kafka.consumer:type=consumer-coordinator-metrics,client-id=moody-test_client-StreamThread-1-consumer
#kafka.consumer:type=consumer-fetch-manager-metrics,client-id=moody-test_client-StreamThread-1-consumer
#kafka.consumer:type=consumer-metrics,client-id=moody-test_client-StreamThread-1-consumer
#kafka.producer:type=producer-metrics,client-id=moody-test_client-StreamThread-1-producer
#kafka.streams:type=stream-metrics,client-id=moody-test_client-StreamThread-1
- pattern: "kafka.(.*)<type=(.*)-metrics, client-id=(.*)><>"
name: kafka_$1_$2
labels:
client_id: "$3"
help: "Kafka client JMX metric $1 $2"
type: GAUGE

#kafka.admin.client:type=admin-client-node-metrics,client-id=moody-test_client-admin,node-id=node--1
#kafka.consumer:type=consumer-node-metrics,client-id=moody-test_client-StreamThread-2-consumer,node-id=node--1
#kafka.producer:type=producer-node-metrics,client-id=moody-test_client-StreamThread-1-producer,node-id=node--1
- pattern: "kafka.(.*)<type=(.*)-metrics, client-id=(.*), node-id=(.*)><>"
name: kafka_$1_$2
labels:
client_id: "$3"
node_id: "$4"
help: "Kafka client JMX metric $1 $2"
type: GAUGE

#kafka.consumer:type=consumer-fetch-manager-metrics,client-id=moody-test_client-StreamThread-1-consumer,topic=realtime-clustered-documents,partition=92
- pattern: "kafka.(.*)<type=(.*)-metrics, client-id=(.*), topic=(.*), partition=(.*)><>"
name: kafka_$1_$2
labels:
client_id: "$3"
topic: "$4"
partition: "$5"
help: "Kafka client JMX metric $1 $2"
type: GAUGE

#kafka.streams:type=stream-task-metrics,client-id=moody-test_client-StreamThread-1,task-id=0_92
- pattern: "kafka.(.*)<type=(.*)-metrics, client-id=(.*), task-id=(.*)><>"
name: kafka_$1_$2
labels:
client_id: "$3"
task_id: "$4"
help: "Kafka client JMX metric $1 $2"
type: GAUGE

#kafka.streams:type=stream-processor-node-metrics,client-id=moody-test_client-StreamThread-1,task-id=0_100,processor-node-id=KSTREAM-PROCESSOR-0000000001
- pattern: "kafka.(.*)<type=(.*)-metrics, client-id=(.*), task-id=(.*), processor-node-id=(.*)><>"
name: kafka_$1_$2
labels:
client_id: "$3"
task_id: "$4"
processor_node_id: "$5"
help: "Kafka client JMX metric $1 $2"
type: GAUGE

### Metrics with Labels
#kafka.admin.client:type=app-info,client-id=moody-test_client-admin
#kafka.consumer:type=app-info,client-id=moody-test_client-StreamThread-1-consumer
#kafka.producer:type=app-info,client-id=moody-test_client-StreamThread-1-producer
- pattern: "kafka.(.*)<type=(app-info), client-id=(.*)><>commit-id:(.*)"
name: kafka_$1_$2
value: 1
labels:
client_id: "$3"
commit_id: "$4"
help: "Kafka client JMX metric $1 $2"
- pattern: "kafka.(.*)<type=(app-info), client-id=(.*)><>version:(.*)"
name: kafka_$1_$2
value: 1
labels:
client_id: "$3"
version: "$4"
help: "Kafka client JMX metric $1 $2"

### Metrics with count values
#kafka.admin.client:type=kafka-metrics-count,client-id=moody-test_client-admin
#kafka.consumer:type=kafka-metrics-count,client-id=moody-test_client-StreamThread-1-consumer
#kafka.producer:type=kafka-metrics-count,client-id=moody-test_client-StreamThread-1-producer
- pattern: "kafka.(.*)<type=(.*)-metrics-count, client-id=(.*)><>"
name: kafka_$1_$2
labels:
client_id: "$3"
help: "Kafka client JMX metric $1 $2"
type: COUNTER
#kafka.streams:type=kafka-metrics-count
- pattern: "kafka.(.*)<type=(.*)-metrics-count, client-id=(.*)><>"
name: kafka_$1_$2
labels:
client_id: "$3"
help: "Kafka client JMX metric $1 $2"
type: COUNTER
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Counters should end in _total