// Module included in the following assemblies:
//
// metrics/assembly_metrics-kafka-exporter.adoc

[id='proc-kafka-exporter-enabling-{context}']

= Enabling the Kafka Exporter Grafana dashboard

If you deployed Kafka Exporter with your Kafka cluster, you can enable Grafana to present the metrics data it exposes.

A Kafka Exporter dashboard is provided in the `examples/metrics` directory as a JSON file:

* `strimzi-kafka-exporter.json`

.Prerequisites

* Kafka cluster is deployed with xref:proc-kafka-exporter-configuring-{context}[Kafka Exporter metrics configuration]
* xref:assembly-metrics-prometheus-{context}[Prometheus and Prometheus Alertmanager are deployed to the Kafka cluster]
* xref:proc-metrics-deploying-grafana-{context}[Grafana is deployed to the Kafka cluster]

This procedure assumes you already have access to the Grafana user interface and Prometheus has been added as a data source.
If you are accessing the user interface for the first time, see xref:assembly-metrics-grafana-{context}[Grafana].

.Procedure

. Access the Grafana user interface.

. Click *Dashboards*, then *Import* to open the _Import Dashboard_ window and import the example Kafka Exporter dashboard (or paste the JSON).
+
When metrics data has been collected for some time, the Kafka Exporter charts are populated.

.Kafka Exporter Grafana charts

From the metrics, you can create charts to display:

* Message in per second (from topics)
* Message in per minute (from topics)
* Lag by consumer group
* Messages consumed per minute (by consumer groups)

Use the Grafana charts to analyze lag and to check if actions to reduce lag are having an impact on an affected consumer group.
If, for example, Kafka brokers are adjusted to reduce lag, the dashboard will show the  _Lag by consumer group_ chart going down and the _Messages consumed per minute_ chart going up.
