Kafka metrics can be collected and displayed using different methods.
Prometheus can be used to collect monitoring data from Kafka.
To enable this you need to update your cluster configuration to include a metricsConfig section for both the cluster and zookeeper.
This is the kafka-metrics.yaml for creating the config map: kafka-metrics.yaml
Then add kafka exporter component.
When you start your cluster you should see an additional pod running for Kafka exporter.
You can create a service for this using this yaml file: kafka-exporter.yaml
Using minikube tunnel you can view the metrics using this link: localhost:9100/metrics
Next edit the scrape configs section in prometheus.yaml to include an entry for these metrics.
You can then setup the grafana dashboard to view your metrics : kafka-exporter-overview_rev5.json
These metrics can also be imported into telegraf by adding the following lines to your inputs:
You can also include metrics from your Kafka bridge by adding the following line to the bridge spec: enableMetrics: true
Note: It is also possible to obtain JMX metrics using jolokia (GitHub - paksu/kafka-jolokia-telegraf-collector: Simple Kafka broker JMX metric collection with Telegraf) but this requires creating a custom a custom kafka cluster image if you are using Strimzi.
To store these metrics in InfluxDB you need to do is setup up a bucket and a metrics scraper for the kafka-exporter metrics endpoint.
You can then view the metrics in data explorer.