1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Kafka Lag Exporter Configuration
# Copy this file to config.toml and adjust as needed
[]
# How often to poll Kafka for offsets (default: 30s)
= "30s"
# HTTP server settings for Prometheus endpoint
= 8000
= "0.0.0.0"
# Metric granularity: "topic" (default) or "partition"
# "topic" aggregates per-topic, "partition" includes partition-level metrics
= "topic"
[]
# Enable time lag calculation via message timestamp fetching
= true
# Cache timestamp for this duration to avoid excessive Kafka reads
= "60s"
# Maximum concurrent timestamp fetch operations
= 10
[]
# Enable OpenTelemetry export (default: false)
= false
# OTLP endpoint (gRPC)
= "http://localhost:4317"
# How often to push metrics to OTLP
= "60s"
# Kafka cluster configuration
# You can define multiple [[clusters]] sections for multi-cluster monitoring
[[]]
# Unique name for this cluster (used in metric labels)
= "production"
# Kafka bootstrap servers (comma-separated)
= "kafka1:9092,kafka2:9092,kafka3:9092"
# Consumer group filters (regex patterns)
# Groups matching whitelist AND not matching blacklist will be monitored
= [".*"]
= []
# Topic filters (regex patterns)
= [".*"]
= ["^__.*"] # Exclude internal topics like __consumer_offsets
# Additional Kafka consumer properties
# Use ${ENV_VAR} syntax for environment variable substitution
[]
# Uncomment and configure for SASL authentication:
# "security.protocol" = "SASL_SSL"
# "sasl.mechanism" = "PLAIN"
# "sasl.username" = "${KAFKA_USER}"
# "sasl.password" = "${KAFKA_PASSWORD}"
# Uncomment for SSL/TLS:
# "ssl.ca.location" = "/path/to/ca.pem"
# "ssl.certificate.location" = "/path/to/client.pem"
# "ssl.key.location" = "/path/to/client.key"
# Custom labels added to all metrics for this cluster
[]
= "production"
# datacenter = "us-east-1"
# Example: Second cluster configuration
# [[clusters]]
# name = "staging"
# bootstrap_servers = "kafka-staging:9092"
# group_whitelist = ["^staging-.*"]
# group_blacklist = []
# topic_whitelist = [".*"]
# topic_blacklist = ["^__.*"]
#
# [clusters.consumer_properties]
#
# [clusters.labels]
# environment = "staging"