-
Notifications
You must be signed in to change notification settings - Fork 79
Blog Post: Strimzi Metrics Reporter #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Blog Post: Strimzi Metrics Reporter #531
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @OwenCorrigan76, thanks for creating the blog post.
Can you please put one sentence per line? This makes the review easier.
Left some suggestions.
@fvaleri Would we add a ` in every case of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the blog post. I left some commemnts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the blog post! I made a first pass and left a few suggestions.
layout: post | ||
title: "Using Strimzi Metrics Reporter to Expose Kafka Metrics in Prometheus Format" | ||
date: 2025-10-01 | ||
author: Owen Corrigan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add yourself in this list here https://github.com/strimzi/strimzi.github.io/blob/main/_data/authors.yml and then referring the entry from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks for the info
@@ -0,0 +1,97 @@ | |||
--- | |||
layout: post | |||
title: "Using Strimzi Metrics Reporter to Expose Kafka Metrics in Prometheus Format" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need "Expose", "Metrics" and "Format" having capital first letter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored
* Configurable Metrics Collection: Allows users to specify which metrics should be collected using a flexible allowlist. | ||
|
||
### Deploying Metrics Reporter | ||
The first step is to install the metrics reporter in your `Kafka Custom Resource`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first step is to install the metrics reporter in your `Kafka Custom Resource`. | |
The first step is to install the metrics reporter in your `Kafka` custom resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored
We have shown you how to deploy the `Strimzi Metrics Reporter` in your Kafka cluster and given some compelling reasons why you might want to use it in preference to the previously recommended `JMX Exporter`. | ||
As one recent reviewer wrote: `That strimzi metrics Reporter just shaved about 1.5 G of memory usage on our kafka pods. Good job`. | ||
The `Strimzi Metrics Reporter` was recently [featured as part of StrimziCon 2025](https://www.youtube.com/watch?v=evKGEziQj54) which you may also find worth watching. | ||
We have also provided you with a practical demo video in which we go through the steps outlined above and hopefully this will encourage you to try out Strimzi Metrics Reporter for yourself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will provide you the link to the video when we are ready with this blog to be published.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@fvaleri @scholzj @mimaison @ppatierno Thanks for the very valuable feedback. I knew that my first attempt would be rough and ready. Next time will be a lot better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better now. I left one nit. I also think it would be good to mention the other compoenents there as well? Connect, MM2, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates. I left a few more suggestions
Prometheus is a metrics monitoring solution that is increasingly common due to its popularity in the cloud-native ecosystem, and it is this format that we use to expose metrics. | ||
Up to this point, we have recommended using the [JMX Exporter](https://github.com/prometheus/jmx_exporter) as a way to expose Kafka metrics, and we have provided some example YAML files in our [Strimzi Examples folder](https://github.com/strimzi/strimzi-kafka-operator/tree/main/packaging/examples/metrics). | ||
|
||
The [Strimzi Metrics Reporter](https://github.com/strimzi/metrics-reporter) is a new project in Strimzi and it is available since Strimzi 0.48.0 release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention it's still in early access? I assume the support in the operator is still early access too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added early access
Up to this point, we have recommended using the [JMX Exporter](https://github.com/prometheus/jmx_exporter) as a way to expose Kafka metrics, and we have provided some example YAML files in our [Strimzi Examples folder](https://github.com/strimzi/strimzi-kafka-operator/tree/main/packaging/examples/metrics). | ||
|
||
The [Strimzi Metrics Reporter](https://github.com/strimzi/metrics-reporter) is a new project in Strimzi and it is available since Strimzi 0.48.0 release. | ||
It implements the Kafka MetricsReporter interface to expose metrics via Prometheus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can keep the code formatting for MetricsReporter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Fixed
``` | ||
|
||
By adding `type: strimziMetricsReporter` to the `metricsConfig` section of your `Kafka` custom resource, Strimzi will export a sensible set of default metrics. | ||
However, you can add you own custom values (providing the metrics are available) by filtering the metrics by name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean with "(providing the metrics are available)" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I just mean that the metrics have to be a valid Kafka metric but I suppose that's stating the obvious. Will remove
ddd8472
to
cca2686
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OwenCorrigan76 I left a few comments. Also, aren't you missing a sentence somewhere mentioning the video you recorded with the corresponding link. You should add something like that with the link as TBD (I will provide it when the PR is closed to be merged).
|
||
## Using Strimzi Metrics Reporter in your Kafka Cluster | ||
|
||
Apache Kafka® generates and exposes metrics that reflect how it is operating. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we are using the trademark logo in any blog post we mention Kafka, I would just remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
* Configurable Metrics Collection: Allows users to specify which metrics should be collected using a flexible allowlist. | ||
|
||
#### Deploying Metrics Reporter | ||
The first step is to install the Strimzi Metrics Reporter in your `Kafka` custom resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is using "install" correct? Of course, I am not a native speaker but sounds weird on my side. I am actually setting a field in the custom resource not installing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored
``` | ||
|
||
We also provide some [Grafana Dashboards](https://github.com/strimzi/strimzi-kafka-operator/tree/0.48.0/examples/metrics/strimzi-metrics-reporter/grafana-dashboards) to help you get started with visualizing your Kafka metrics in the Prometheus format. | ||
Strimzi Metrics Reporter can also be used with Kafka Connect and Kafka MirrorMaker 2, and we provide [examples](https://github.com/strimzi/strimzi-kafka-operator/tree/0.48.0/examples/metrics/strimzi-metrics-reporter) for these too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about HTTP bridge as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OwenCorrigan76 please also add that the Bridge is also supported, but otherwise LGTM. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks, nice work @OwenCorrigan76.
# ... | ||
``` | ||
|
||
If you are adding Strimzi Metrics Reporter to an existing cluster, then you will see all your Kafka broker and Controller pods roll so that the Strimzi Metrics Reporter config is set in your `Kafa` resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are adding Strimzi Metrics Reporter to an existing cluster, then you will see all your Kafka broker and Controller pods roll so that the Strimzi Metrics Reporter config is set in your `Kafa` resource. | |
If you are adding Strimzi Metrics Reporter to an existing cluster, then you will see all your Kafka broker and Controller pods roll so that the Strimzi Metrics Reporter config is set in your `Kafka` resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting @im-konge. Fixed
Signed-off-by: OwenCorrigan76 <[email protected]>
Signed-off-by: OwenCorrigan76 <[email protected]>
Signed-off-by: OwenCorrigan76 <[email protected]>
Signed-off-by: OwenCorrigan76 <[email protected]>
Signed-off-by: OwenCorrigan76 <[email protected]>
Signed-off-by: OwenCorrigan76 <[email protected]>
Signed-off-by: OwenCorrigan76 <[email protected]>
2b4d74d
to
b5e9f17
Compare
Related to the upcoming release 0.48.0.
Type of change
Select the type of your PR