Skip to content

Latest commit

 

History

History
 
 

prometheus

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Export metrics to Prometheus

Kafka uses JMX to expose metrics, as is already enabled for broker pods. There's many ways to use JMX. For example Kafka Manager uses it to display current broker traffic.

At Yolean we use Prometheus. This folder adds a sidecar to the broker pods that exports selected JMX metrics over HTTP in Prometheus format. To add a container to an existing pod we must use the patchcommand:

kubectl --namespace kafka apply -f prometheus/10-metrics-config.yml 
kubectl --namespace kafka patch statefulset kafka --patch "$(cat prometheus/50-kafka-jmx-exporter-patch.yml )"