Kafka Streams Dashboard 2,6632,663
A Dashboard for Kafka Streams Applications running in Kubernetes.
Setup
Option A:
- Deploy a Kafka Streams App with Kubernetes. Make sure that the App exports JMX metrics (example is from sbt):
javaOptions in Universal += Seq(
"-Dcom.sun.management.jmxremote.port=9186",
"-Dcom.sun.management.jmxremote.rmi.port=9186",
"-Dcom.sun.management.jmxremote.ssl=false",
"-Dcom.sun.management.jmxremote.local.only=false",
"-Dcom.sun.management.jmxremote.authenticate=false"
).mkString(" ")
- Start a sidecar prometheus exporter. You can use sscalling/jmx-prometheus-exporter.
- Check if prometheus is scraping your application. You can test this by checking the query result of
kafka_streams_kafka_metrics_count_count. - If prometheus is scraping correctly, the dashboard should work.
Option B:
- Deploy your application with the prometheus-jmx-exporter as java agent (see here
- No need for an additional sidecar container, your app exports prometheus metrics directly.
- Check if prometheus is scraping your application. You can test this by checking the query result of
kafka_streams_kafka_metrics_count_count. - If prometheus is scraping correctly, the dashboard should work.
Kubernetes Config
To automatically add your application to prometheus, use the following annotations in a kubernetes service:
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '5556'
prometheus.io/path: "/metrics"
Used Metrics 2828
kube_deployment_status_replicas_available
kafka_streams_stream_thread_metrics_task_created_total
kafka_streams_stream_thread_metrics_task_closed_total
kafka_streams_kafka_metrics_count_count
java_lang_Runtime_Uptime
kafka_admin_client_admin_client_metrics_outgoing_byte_total
instance
kafka_admin_client_admin_client_metrics_incoming_byte_total
java_lang_MemoryPool_Usage_used
java_lang_OperatingSystem_TotalPhysicalMemorySize
java_lang_OperatingSystem_ProcessCpuLoad
kafka_streams_stream_thread_metrics_process_total
kafka_streams_stream_thread_metrics_poll_total
kafka_streams_stream_thread_metrics_commit_total
kafka_streams_stream_processor_node_metrics_record_e2e_latency_max
min
kafka_streams_stream_processor_node_metrics_record_e2e_latency_min
kafka_streams_stream_thread_metrics_poll_records_max
kafka_streams_stream_thread_metrics_poll_records_avg
kafka_streams_stream_thread_metrics_process_latency_max
kafka_streams_stream_thread_metrics_process_latency_avg
kafka_streams_stream_thread_metrics_process_rate
kafka_streams_stream_thread_metrics_poll_latency_max
kafka_streams_stream_thread_metrics_poll_latency_avg
kafka_streams_stream_thread_metrics_poll_rate
kafka_streams_stream_thread_metrics_commit_latency_max
kafka_streams_stream_thread_metrics_commit_latency_avg
kafka_streams_stream_thread_metrics_commit_rate