Skip to content

Prometheus Metrics Reporter for Apache Kafka server and client compoenents

License

Notifications You must be signed in to change notification settings

strimzi/metrics-reporter

License Twitter Follow

Strimzi Prometheus Metrics Reporter

Apache Kafka® brokers and clients expose metrics to monitor them. A pluggable reporter interface allows exporting these metrics to monitoring systems. Apache Kafka has a built-in reporter for JMX.

This repository contains a reporter implementation for Prometheus as proposed in Strimzi Proposal #64.

Warning

The project is currently in early access.

Installing

Since there isn't a release available yet, you'll need to build the reporter first:

mvn package

After building, make sure the metrics reporter JARs located under target/metrics-reporter-*/metrics-reporter-*/libs/ are in the classpath.

Configuring

The metrics reporter has the following configurations:

  • prometheus.metrics.reporter.listener: The HTTP listener to expose the metrics. It must be in the http://[host]:[port] format. This defaults to http://:8080.
  • prometheus.metrics.reporter.listener.enabled: Enable the listener to expose the metrics. This defaults to true.
  • prometheus.metrics.reporter.allowlist: A comma separated list of regex patterns to specify the metrics to collect. This defaults to .*.

Running

Kafka Brokers

To use the reporter with Kafka brokers, add the following to your broker configuration:

metric.reporters=io.strimzi.kafka.metrics.KafkaPrometheusMetricsReporter
kafka.metrics.reporters=io.strimzi.kafka.metrics.YammerPrometheusMetricsReporter
auto.include.jmx.reporter=false

Kafka Clients

To use the reporter with Kafka producers, consumers or admin clients, add the following to your client configuration:

metric.reporters=io.strimzi.kafka.metrics.KafkaPrometheusMetricsReporter
auto.include.jmx.reporter=false

Kafka Connect and Kafka Streams

To use the reporter with Kafka Connect and Kafka Streams, add the following to your Connect runtime or Streams application configuration:

metric.reporters=io.strimzi.kafka.metrics.KafkaPrometheusMetricsReporter
auto.include.jmx.reporter=false
admin.metric.reporters=io.strimzi.kafka.metrics.KafkaPrometheusMetricsReporter
admin.auto.include.jmx.reporter=false
producer.metric.reporters=io.strimzi.kafka.metrics.KafkaPrometheusMetricsReporter
producer.auto.include.jmx.reporter=false
consumer.metric.reporters=io.strimzi.kafka.metrics.KafkaPrometheusMetricsReporter
consumer.auto.include.jmx.reporter=false

Accessing Metrics

Metrics are exposed on the configured listener on the GET /metrics endpoint. For example, by default this is http://localhost:8080/metrics.

Getting help

If you encounter any issues while using Strimzi, you can get help using:

Strimzi Community Meetings

You can join our regular community meetings:

Resources:

Contributing

You can contribute by:

  • Raising any issues you find using Strimzi
  • Fixing issues by opening Pull Requests
  • Improving documentation
  • Talking about Strimzi

All bugs, tasks or enhancements are tracked as GitHub issues.

If you want to get in touch with us first before contributing, you can use:

License

Strimzi is licensed under the Apache License, Version 2.0

About

Prometheus Metrics Reporter for Apache Kafka server and client compoenents

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •