[id='proc-configuring-kafka-bridge-jmx-metrics-{context}']
= Configuring Prometheus JMX Exporter metrics

[role="_abstract"]
Enable the Prometheus JMX Exporter to collect Kafka Bridge metrics by setting the `bridge.metrics` option to `jmxPrometheusExporter`.

.Prerequisites

* xref:proc-downloading-kafka-bridge-{context}[The Kafka Bridge installation archive is downloaded].

.Procedure

. Set the `bridge.metrics` configuration to `jmxPrometheusExporter`.
+
.Configuration for enabling metrics

[source,properties]
----
bridge.metrics=jmxPrometheusExporter
----
+
Optionally, you can add a custom Prometheus JMX Exporter configuration using the `bridge.metrics.exporter.config.path` property.
If not configured, a default embedded configuration file is used.

. Run the Kafka Bridge run script.
+
.Running the Kafka Bridge
[source,shell]
----
./bin/kafka_bridge_run.sh --config-file=<path>/application.properties
----
+
With metrics enabled, you can scrape metrics in Prometheus format from the `/metrics` endpoint of the Kafka Bridge.
