-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update assemblies and modules Docs for Metrics Reporter integration #11329
base: main
Are you sure you want to change the base?
Update assemblies and modules Docs for Metrics Reporter integration #11329
Conversation
<13> Metrics configuration that defines Prometheus JMX Exporter relabeling rules for Kafka. | ||
<14> Metrics configuration that defines Prometheus JMX Exporter relabeling rules for MirrorMaker 2. | ||
<15> Metrics configuration that defines Prometheus JMX Exporter relabeling rules for OAuth 2.0. | ||
<10> Example Grafana dashboards with Metrics Reporter for the Kafka component. |
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.
<10> Example Grafana dashboards with Metrics Reporter for the Kafka component. | |
<10> Example Grafana dashboards to be used with Metrics Reporter for the Kafka component. |
<14> Metrics configuration that defines Prometheus JMX Exporter relabeling rules for MirrorMaker 2. | ||
<15> Metrics configuration that defines Prometheus JMX Exporter relabeling rules for OAuth 2.0. | ||
<10> Example Grafana dashboards with Metrics Reporter for the Kafka component. | ||
<11> Resource for deploying and configuring Strimzi Metrics Reporter based Kafka. |
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.
<11> Resource for deploying and configuring Strimzi Metrics Reporter based Kafka. | |
<11> Resource for deploying and configuring Kafka with Strimzi Metrics Reporter. |
Grafana dashboards are dependent on relabeling rules, which are defined for Strimzi components in the custom resource configuration. | ||
|
||
A label is a name-value pair. | ||
Relabeling is the process of writing a label dynamically. | ||
For example, the value of a label may be derived from the name of a Kafka server and client ID. | ||
|
||
Strimzi provides example custom resource configuration YAML files with relabeling rules. | ||
When deploying Prometheus metrics configuration, you can can deploy the example custom resource or copy the metrics configuration to your own custom resource definition. |
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.
Only Prometheus JMX Exporter has relabeling rules, so I think we should make it clear. What about moving this part to the paragraph titled "Example Prometheus Jmx Exporter metrics configuration"?
Using Prometheus with Strimzi, requires the following: | ||
You can enable either Prometheus JMX Exporter or Strimzi Metrics Reporter to expose metrics: | ||
|
||
xref:proc-jmx-exporter-metrics-kafka-deploy-options-{context}[Enabling Prometheus Jmx metrics through configuration] |
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.
xref:proc-jmx-exporter-metrics-kafka-deploy-options-{context}[Enabling Prometheus Jmx metrics through configuration] | |
xref:proc-jmx-exporter-metrics-kafka-deploy-options-{context}[Enabling Prometheus JMX Exporter through configuration] |
[id='proc-metrics-kafka-deploy-options-{context}'] | ||
= Enabling Prometheus metrics through configuration | ||
[id='proc-jmx-exporter-metrics-kafka-deploy-options-{context}'] | ||
= Enabling Prometheus Jmx metrics through configuration |
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.
= Enabling Prometheus Jmx metrics through configuration | |
= Enabling Prometheus JMX Exporter through configuration |
// metrics/assembly_metrics-kafka.adoc | ||
|
||
[id='proc-metrics-reporter-kafka-deploy-options-{context}'] | ||
= Enabling Metrics Reporter metrics through configuration |
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.
= Enabling Metrics Reporter metrics through configuration | |
= Enabling Strimzi Metrics Reporter through configuration |
To enable and expose metrics in Strimzi for Prometheus, use metrics configuration properties. | ||
|
||
The following components require `metricsConfig` configuration to expose metrics: |
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.
To enable and expose metrics in Strimzi for Prometheus, use metrics configuration properties. | |
The following components require `metricsConfig` configuration to expose metrics: | |
The following components require `metricsConfig` configuration to expose metrics in Prometheus format: |
This configuration enables the {StrimziMetricsReporter} to expose metrics through an HTTP endpoint. | ||
The port for the Strimzi Metrics Reporter HTTP endpoint is 9404. |
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.
This configuration enables the {StrimziMetricsReporter} to expose metrics through an HTTP endpoint. | |
The port for the Strimzi Metrics Reporter HTTP endpoint is 9404. | |
This configuration enables the {StrimziMetricsReporter} to expose metrics through an HTTP endpoint on port 9404. |
and similar change for the Prometheus JMX Exporter paragraph.
spec: | ||
kafka: | ||
# ... | ||
metricsConfig: <1> |
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.
There is no reference for <1>. Is it really needed?
|
||
# _metrics configuration..._ |
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 this?
├── kafka-cruise-control-metrics.yaml <14> | ||
├── kafka-metrics.yaml <15> | ||
├── kafka-mirror-maker-2-metrics.yaml <16> | ||
└── oauth-metrics.yaml <17> |
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.
a couple of questions here:
- aren't we getting examples for all the other components (apart Kafka) for using the Strimzi Metrics reporter?
- wouldn't be better to put the Prometheus JMX exporter related example in a dedicated folder now that we have the
strimzi-metrics-reporter
one?
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.
@ppatierno Is this the structure you're recommending?
├── metrics
| ├── prometheus JMX exporter
| └──── grafana-dashboards
| └──── kafka-bridge-metrics.yaml
| └──── kafka-connect-metrics.yaml
| └──── kafka-cruise-control-metrics.yaml
| └──── kafka-metrics.yaml
| └──── kafka-mirror-maker-2-metrics.yaml
| └──── oauth-metrics.yaml
| ├── strimzi-metrics-reporter
| └────grafana-dashboards
| └──── kafka-metrics.yaml
| └──── README.md
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.
Yeah that was the idea thanks @OwenCorrigan76
@fvaleri @PaulRMellor wdyt?
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, but the folder name should be prometheus-jmx-exporter
and we need a similar README.md for consistency.
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.
Yes. I'll update this docs PR and then update the main integration PR. Thanks
e5596ab
to
9fe4d31
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.
Looking good, Owen.
I left some suggestions.
There's a bit of overlap with a PR I'm about to merge in, which I've pointed out.
I also left a note on Kafka Exporter -- I've made a note to do something about that when we get these updates merged in
<8> PodMonitor definitions translated by the Prometheus Operator into jobs for the Prometheus server to be able to scrape metrics data directly from pods. | ||
<9> Example Grafana dashboards to be used with Metrics Reporter for the Kafka component. | ||
<10> Resource for deploying and configuring Kafka with Strimzi Metrics Reporter. | ||
<11> Example Grafana dashboards for the different Strimzi components. |
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.
<11> Example Grafana dashboards for the different Strimzi components. | |
<11> Grafana dashboards for components using the JMX Reporter. |
* xref:assembly-metrics-setup-{context}[Set up and deploy Prometheus to expose metrics] | ||
* xref:proc-metrics-kafka-deploy-options-{context}[Deploy Kafka Exporter to provide additional metrics] | ||
* xref:proc-jmx-exporter-metrics-kafka-deploy-options-{context}[Deploy Kafka Exporter to provide additional metrics] | ||
* xref:proc-metrics-grafana-dashboard-{context}[Use Grafana to present the Prometheus metrics] |
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 deleted this section in PR #11307
I don't think we need it here, so would revert the changes to this file
<6> Alerting rules examples for use with Prometheus Alertmanager (deployed with Prometheus). | ||
<7> Installation resource file for the Prometheus image. | ||
<8> PodMonitor definitions translated by the Prometheus Operator into jobs for the Prometheus server to be able to scrape metrics data directly from pods. | ||
<9> Example Grafana dashboards to be used with Metrics Reporter for the Kafka component. |
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.
<9> Example Grafana dashboards to be used with Metrics Reporter for the Kafka component. | |
<9> Grafana dashboards for components using the Strimzi Metrics Reporter. |
|
||
xref:proc-metrics-reporter-kafka-deploy-options-{context}[Enabling Strimzi Metrics Reporter through configuration] | ||
|
||
Once the type is determined, using Prometheus with Strimzi, requires the following: |
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.
Once the type is determined, using Prometheus with Strimzi, requires the following: | |
After enabling metrics, you can integrate with Prometheus: |
@@ -12,16 +12,23 @@ To expose metrics in Prometheus format, you add configuration to a custom resour | |||
You must also make sure that the metrics are scraped by your monitoring stack. | |||
Prometheus and Prometheus Alertmanager are used in the examples provided by Strimzi, but you can use also other compatible tools. | |||
|
|||
Using Prometheus with Strimzi, requires the following: | |||
You can enable either Prometheus JMX Exporter or Strimzi Metrics Reporter to expose metrics: |
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 enable either Prometheus JMX Exporter or Strimzi Metrics Reporter to expose metrics: | |
You can expose metrics using one of the following approaches: |
It is a good starting point for trying Prometheus with Strimzi. | ||
|
||
This procedure shows how to deploy example Prometheus metrics configuration in the `Kafka` resource. | ||
The process is the same when deploying the example files for other resources. |
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 process is the same when deploying the example files for other resources. |
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.
we include a note/cross-ref on how to configure the Kafka Exporter as well in the JMX procedure. Do we want it here too?
Or maybe that needs to be separated from both now, so we link from each of these procedures. Note taken
@@ -29,7 +29,7 @@ When accessing a dashboard, you can use the `port-forward` command to forward tr | |||
The name of the Grafana pod is different for each user. | |||
|
|||
.Prerequisites | |||
* xref:proc-metrics-kafka-deploy-options-{context}[Metrics are configured for the Kafka cluster resource] | |||
* xref:proc-jmx-exporter-metrics-kafka-deploy-options-{context}[Metrics are configured for the Kafka cluster 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.
should we have links for both options here as an either/or?
|
||
[id='ref-jmx-metrics-prometheus-metrics-config-{context}'] | ||
|
||
= Example Prometheus Jmx Exporter metrics configuration |
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.
= Example Prometheus Jmx Exporter metrics configuration | |
= Example Prometheus JMX Exporter metrics configuration |
A label is a name-value pair. | ||
Relabeling is the process of writing a label dynamically. | ||
For example, the value of a label may be derived from the name of a Kafka server and client ID. | ||
Strimzi uses the {StrimziMetricsReporter} or the {JMXExporter} to expose metrics through an HTTP endpoint, which can be scraped by the Prometheus server. |
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 wonder if this file is worth having for two sentences?
Maybe we can just add to the intro of the example metrics file section?
@@ -42,6 +42,7 @@ | |||
//Monitoring links | |||
:GrafanaHome: link:https://grafana.com/[Grafana Labs^] | |||
:JMXExporter: link:https://github.com/prometheus/jmx_exporter[Prometheus JMX Exporter^] | |||
:StrimziMetricsReporter: link:https://github.com/strimzi/metrics-reporter[Strimzi Metrics Reporter^] |
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 want to link to this? We only use the link in one place. Maybe we can live without it?
Signed-off-by: OwenCorrigan76 <[email protected]>
Signed-off-by: OwenCorrigan76 <[email protected]>
Signed-off-by: OwenCorrigan76 <[email protected]>
Signed-off-by: OwenCorrigan76 <[email protected]>
99e88b1
to
8fa4e37
Compare
Type of change
Description
With newly added support for the Strimzi Metrics Reporter to Kafka brokers/controllers components, this PR updates the assemblies and modules documents to reflect the changes in the way we can deploy metrics to the Kafka brokers and controllers.
Updates:
Structure for new content:
Related to #11051
Checklist
Please go through this checklist and make sure all applicable tasks have been done