You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/assemblies/metrics/assembly-metrics.adoc
+12-28
Original file line number
Diff line number
Diff line change
@@ -6,39 +6,23 @@
6
6
= Introducing metrics
7
7
8
8
[role="_abstract"]
9
-
Collecting metrics is critical for understanding the health and performance of your Kafka deployment.
10
-
By monitoring metrics, you can actively identify issues before they become critical and make informed decisions about resource allocation and capacity planning. Without metrics, you may be left with limited visibility into the behavior of your Kafka deployment, which can make troubleshooting more difficult and time-consuming. Setting up metrics can save you time and resources in the long run, and help ensure the reliability of your Kafka deployment.
9
+
Collecting metrics is essential for understanding the health and performance of your Kafka deployment.
10
+
By monitoring metrics, you can actively identify issues before they become critical and make informed decisions about resource allocation and capacity planning.
11
+
Without metrics, you may be left with limited visibility into the behavior of your Kafka deployment, which can make troubleshooting more difficult and time-consuming.
12
+
Setting up metrics can save you time and resources, and help ensure the reliability of your Kafka deployment.
11
13
12
-
Metrics are available for each component in Strimzi, providing valuable insights into their individual performance.
13
-
While other components require configuration to expose metrics, Strimzi operators automatically expose Prometheus metrics by default.
14
-
These metrics include:
15
-
16
-
* Reconciliation count
17
-
* Custom Resource count being processed
18
-
* Reconciliation duration
19
-
* JVM metrics
20
-
21
-
You can also collect metrics specific to `oauth` authentication and `opa` or `keycloak` authorization by enabling the `enableMetrics` property in the listener or authorization configuration of the `Kafka` resource.
22
-
Similarly, you can enable metrics for `oauth` authentication in custom resources such as `KafkaBridge`, `KafkaConnect`, and `KafkaMirrorMaker2`.
23
-
24
-
You can use Prometheus and Grafana to monitor Strimzi.
25
-
Prometheus consumes metrics from the running pods in your cluster when configured with Prometheus rules.
14
+
Metrics can be collected from Strimzi components using Prometheus and visualized in Grafana.
15
+
Prometheus collects metrics from running pods in your cluster when configured with appropriate rules.
26
16
Grafana visualizes these metrics on dashboards, providing an intuitive interface for monitoring.
27
17
28
-
To facilitate metrics integration, Strimzi provides example Prometheus rules and Grafana dashboards for Strimzi components.
29
-
You can customize the example Grafana dashboards to suit your specific deployment requirements.
30
-
You can use rules to define conditions that trigger alerts based on specific metrics.
31
-
32
-
Depending on your monitoring requirements, you can do the following:
33
-
34
-
* xref:assembly-metrics-setup-{context}[Set up and deploy Prometheus to expose metrics]
35
-
* xref:proc-metrics-kafka-deploy-options-{context}[Deploy Kafka Exporter to provide additional metrics]
36
-
* xref:proc-metrics-grafana-dashboard-{context}[Use Grafana to present the Prometheus metrics]
18
+
While the Strimzi operators expose their own Prometheus metrics by default, such as reconciliation counts and durations, JVM data, and resource processing statistics, other Strimzi components and features that support metrics, including OAuth 2.0 integration, require configuration to expose them.
37
19
20
+
Strimzi provides example Prometheus rules and Grafana dashboards, which you can customize to fit your deployment.
21
+
These tools help visualize metrics and define alerts based on specific conditions.
38
22
Additionally, you can configure your deployment to track messages end-to-end by xref:assembly-distributed-tracing-str[setting up distributed tracing].
39
23
40
-
NOTE: Strimzi provides example installation files for Prometheus and Grafana, which can serve as a starting point for monitoring your Strimzi deployment.
41
-
For further support, try engaging with the Prometheus and Grafana developer communities.
24
+
NOTE: Strimzi provides example installation files for Prometheus and Grafana to help get you started.
25
+
For further support, refer to the Prometheus and Grafana developer communities.
42
26
43
27
.Supporting documentation for metrics and monitoring tools
44
28
For more information on the metrics and monitoring tools, refer to the supporting documentation:
@@ -47,7 +31,7 @@ For more information on the metrics and monitoring tools, refer to the supportin
Copy file name to clipboardExpand all lines: documentation/modules/con-common-configuration-properties.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ tls:
115
115
trustedCertificates: []
116
116
----
117
117
118
-
Similarly, you can use the `tlstrustedCertificates` property in the configuration for `oauth`, `keycloak`, and `opa` authentication and authorization types that integrate with authorization servers.
118
+
Similarly, you can use the `tlsTrustedCertificates` property in the configuration for `oauth`and `keycloak` authentication and authorization types that integrate with authorization servers.
119
119
The configuration sets up encrypted TLS connections to the authorization server.
120
120
121
121
.Example TLS encryption configuration for authentication types
Copy file name to clipboardExpand all lines: documentation/modules/configuring/con-config-kafka-kraft.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -172,7 +172,7 @@ spec:
172
172
<15> Healthchecks to know when to restart a container (liveness) and when a container can accept traffic (readiness).
173
173
<16> JVM configuration options to optimize performance for the Virtual Machine (VM) running Kafka.
174
174
<17> ADVANCED OPTION: Container image configuration, which is recommended only in special situations.
175
-
<18> Authorization enables simple, OAUTH 2.0, or OPA authorization on the Kafka broker. Simple authorization uses the `AclAuthorizer` and `StandardAuthorizer` Kafka plugins.
175
+
<18> Authorization enables simple, OAuth 2.0, custom, or OPA (deprecated) authorization on the Kafka broker. Simple authorization uses the `StandardAuthorizer` Kafka plugin.
176
176
<19> Rack awareness configuration to spread replicas across different racks, data centers, or availability zones. The `topologyKey` must match a node label containing the rack ID. The example used in this configuration specifies a zone using the standard `{K8sZoneLabel}` label.
177
177
<20> Prometheus metrics enabled. In this example, metrics are configured for the Prometheus JMX Exporter (the default metrics exporter).
178
178
<21> Rules for exporting metrics in Prometheus format to a Grafana dashboard through the Prometheus JMX Exporter, which are enabled by referencing a ConfigMap containing configuration for the Prometheus JMX exporter. You can enable metrics without further configuration using a reference to a ConfigMap containing an empty file under `metricsConfig.valueFrom.configMapKeyRef.key`.
Copy file name to clipboardExpand all lines: documentation/modules/metrics/proc-metrics-kafka-deploy-options.adoc
+29-25
Original file line number
Diff line number
Diff line change
@@ -6,26 +6,31 @@
6
6
= Enabling Prometheus metrics through configuration
7
7
8
8
[role="_abstract"]
9
-
To enable and expose metrics in Strimzi for Prometheus, use metrics configuration properties.
9
+
To enable and expose metrics in Strimzi for Prometheus, configure the appropriate properties in the custom resources for the components you want to monitor.
10
10
11
-
The following components require `metricsConfig` configuration to expose metrics:
11
+
Use `metricsConfig` to expose metrics for these components:
12
12
13
13
* Kafka
14
-
* KafkaConnect
14
+
* Kafka Connect
15
15
* MirrorMaker
16
16
* Cruise Control
17
17
18
-
This configuration enables the {JMXExporter} to expose metrics through an HTTP endpoint.
19
-
The port for the JMX exporter HTTP endpoint is 9404.
18
+
This enables the {JMXExporter}, which exposes metrics on port 9404 through an HTTP endpoint.
20
19
Prometheus scrapes this endpoint to collect Kafka metrics.
21
20
22
-
Set the `enableMetrics` property to `true` in order to expose metrics for these components:
21
+
Set `enableMetrics` to `true` to expose metrics for the following:
23
22
24
-
* Kafka Bridge
25
-
* OAuth 2.0 authentication and authorization framework
26
-
* Open Policy Agent (OPA) for authorization
23
+
* Kafka Bridge
24
+
* OAuth 2.0
25
+
** Configure in the `Kafka` resource for `oauth` or `keycloak` cluster authorization, or `oauth` listener authentication.
26
+
** Configure in the `KafkaBridge`, `KafkaConnect`, or `KafkaMirrorMaker2` resources for `oauth` authentication.
27
27
28
-
To deploy Prometheus metrics configuration in Strimzi, you can use your own configuration or the xref:ref-metrics-prometheus-metrics-config-{context}[example custom resource configuration files] provided with Strimzi:
28
+
To include xref:con-metrics-kafka-exporter-lag-str[Kafka Exporter] metrics, add `kafkaExporter` configuration to the `Kafka` resource.
29
+
30
+
IMPORTANT: Kafka Exporter provides additional metrics for consumer lag and offsets only.
31
+
You still need to configure Prometheus metrics in the `Kafka` resource to collect standard Kafka metrics.
32
+
33
+
You can create your own Prometheus configuration or use the xref:ref-metrics-prometheus-metrics-config-{context}[example custom resource files] provided with Strimzi:
29
34
30
35
* `kafka-metrics.yaml`
31
36
* `kafka-connect-metrics.yaml`
@@ -34,16 +39,10 @@ To deploy Prometheus metrics configuration in Strimzi, you can use your own conf
34
39
* `kafka-cruise-control-metrics.yaml`
35
40
* `oauth-metrics.yaml`
36
41
37
-
These files contain the necessary relabeling rules and configuration to enable Prometheus metrics.
38
-
They are a good starting point for trying Prometheus with Strimzi.
39
-
40
-
This procedure shows how to deploy example Prometheus metrics configuration in the `Kafka` resource.
41
-
The process is the same when deploying the example files for other resources.
42
+
These files include relabeling rules and example metrics configuration, and are a good starting point for trying Prometheus with Strimzi.
42
43
43
-
If you wish to include xref:con-metrics-kafka-exporter-lag-str[Kafka Exporter] metrics, add `kafkaExporter` configuration to your `Kafka` resource.
44
-
45
-
IMPORTANT: Kafka Exporter only provides additional metrics related to consumer lag and consumer offsets.
46
-
For regular Kafka metrics, configure Prometheus metrics in the `Kafka` resource.
44
+
This procedure shows how to deploy example Prometheus metrics configuration to the `Kafka` resource.
45
+
The same steps apply when deploying the example files for other resources.
47
46
48
47
.Procedure
49
48
@@ -180,17 +179,18 @@ spec:
180
179
# ...
181
180
----
182
181
183
-
.Enabling metrics for OAuth 2.0 and OPA
182
+
.Enabling metrics for OAuth 2.0
184
183
185
-
To expose metrics for OAuth 2.0 or OPA, set the `enableMetrics` property to `true` in the appropriate custom resource.
184
+
To expose metrics for OAuth 2.0, set the `enableMetrics` property to `true` in the appropriate custom resource.
186
185
187
-
OAuth 2.0 metrics:: Enable metrics for Kafka cluster authorization and Kafka listener authentication in the `Kafka` resource.
188
-
You can also enable metrics for OAuth 2.0 authentication in the custom resource of other xref:proc-oauth-kafka-config-{context}[supported components].
189
-
OPA metrics:: Enable metrics for Kafka cluster authorization in the `Kafka` resource similar to OAuth 2.0.
186
+
* In the Kafka resource for:
187
+
** Cluster authorization (`oauth` or `keycloak`)
188
+
** Listener authentication (`oauth` only)
189
+
* In the `KafkaBridge`, `KafkaConnect`, or `KafkaMirrorMaker2` resources for `oauth` authentication
190
190
191
191
In the following example, metrics are enabled for OAuth 2.0 listener authentication and OAuth 2.0 (`keycloak`) cluster authorization.
192
192
193
-
.Example cluster configuration with metrics enabled for OAuth 2.0
193
+
.Example configuration with OAuth 2.0 metrics enabled
194
194
[source,yaml,subs="+quotes,attributes"]
195
195
----
196
196
apiVersion: {KafkaApiVersion}
@@ -219,4 +219,8 @@ spec:
219
219
220
220
To use OAuth 2.0 metrics with Prometheus, copy the `ConfigMap` configuration from the `oauth-metrics.yaml` file to the same `Kafka` resource configuration file where you enabled metrics for OAuth 2.0 and then apply the configuration.
221
221
222
+
NOTE: You can also enable metrics for the `type: opa` authorization option in the same way as for OAuth 2.0 authorization.
223
+
However, `type: opa` is deprecated and will be removed in a future release.
224
+
To continue using the Open Policy Agent authorizer, use the `type: custom` authorization configuration.
* OAuth 2.0 authorization (if you are using OAuth 2.0 token-based authentication)
35
-
* Open Policy Agent (OPA) authorization
35
+
* Open Policy Agent (OPA) authorization (deprecated)
36
36
* Custom authorization (supported by Kafka)
37
37
38
38
Federal Information Processing Standards (FIPS):: Strimzi is designed to run on FIPS-enabled Kubernetes clusters to ensure data security and system interoperability.
0 commit comments