diff --git a/CHANGELOG.md b/CHANGELOG.md index a4f21fec..57b6948f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,7 @@ * Dependency updates (JMX exporter 1.1.0) * Dropped support for Java 11 and replaced with Java 17. * Added support for the [Strimzi Metrics Reporter](https://github.com/strimzi/metrics-reporter) metrics. - This is a Kafka plugin that exports metrics in Prometheus format without passing through JMX, and can be enabled by setting `bridge.metrics=strimziMetricsReporter`. - The JMX Exporter metrics can still be enabled by setting `bridge.metrics=jmxPrometheusExporter`. + This is a Kafka plugin that directly exports metrics in Prometheus format, and can be enabled by setting `bridge.metrics=strimziMetricsReporter`. ### Changes, deprecations and removals diff --git a/bin/docker/kafka_bridge_config_generator.sh b/bin/docker/kafka_bridge_config_generator.sh index a136ca53..9dac70f7 100755 --- a/bin/docker/kafka_bridge_config_generator.sh +++ b/bin/docker/kafka_bridge_config_generator.sh @@ -11,10 +11,27 @@ fi BRIDGE_PROPERTIES=$(cat <<-EOF #Bridge configuration bridge.id=${KAFKA_BRIDGE_ID} +${BRIDGE_METRICS} ${BRIDGE_TRACING} EOF ) +if [ -n "$KAFKA_BRIDGE_METRICS_JMX_CONFIG" ]; then + METRICS_JMX_PROPERTIES=$(cat < map = Map.of( "bridge.id", "my-bridge", "kafka.bootstrap.servers", "localhost:9092", "bridge.metrics", "jmxPrometheusExporter", + "bridge.metrics.jmx.exporter.config.path", configFilePah, "http.host", "0.0.0.0", "http.port", "8080" ); BridgeConfig bridgeConfig = BridgeConfig.fromMap(map); assertThat(bridgeConfig.getMetrics(), is(MetricsType.JMX_EXPORTER.toString())); + assertThat(bridgeConfig.getJmxExporterConfigPath(), is(Path.of(configFilePah))); } @Test