
// This assembly is included in the following assemblies:
//
// metrics/assembly_metrics.adoc

[id='assembly-metrics-config-files-{context}']

= Example metrics files

[role="_abstract"]
You can find example Grafana dashboards and other metrics configuration files in the xref:config-examples-{context}[example configuration files] provided by Strimzi.

.Example metrics files provided with Strimzi
[source]
--
metrics
├── grafana-dashboards <1>
│   ├── strimzi-cruise-control.json
│   ├── strimzi-kafka-bridge.json
│   ├── strimzi-kafka-connect.json
│   ├── strimzi-kafka-exporter.json
│   ├── strimzi-kafka-mirror-maker-2.json
|   ├── strimzi-kafka-oauth.json
│   ├── strimzi-kafka.json
|   ├── strimzi-kraft.json
│   ├── strimzi-operators.json
├── grafana-install
│   └── grafana.yaml <2>
├── kube-state-metrics <3>
│   ├── configmap.yaml
│   ├── ksm.yaml
│   └── prometheus-rules.yaml
├── prometheus-additional-properties
│   └── prometheus-additional.yaml <4>
├── prometheus-alertmanager-config
│   └── alert-manager-config.yaml <5>
├── prometheus-install
│    ├── alert-manager.yaml <6>
│    ├── prometheus-rules.yaml <7>
│    ├── prometheus.yaml <8>
│    └── strimzi-pod-monitor.yaml <9>
├── kafka-bridge-metrics.yaml <10>
├── kafka-connect-metrics.yaml <11>
├── kafka-cruise-control-metrics.yaml <12>
├── kafka-metrics.yaml <13>
├── kafka-mirror-maker-2-metrics.yaml <14>
└── oauth-metrics.yaml <15>

--
<1> Example Grafana dashboards for the different Strimzi components.
<2> Installation file for the Grafana image.
<3> Kube-state-metrics deployment and configuration files for custom resource monitoring.
<4> Additional configuration to scrape metrics for CPU, memory and disk volume usage, which comes directly from the Kubernetes cAdvisor agent and kubelet on the nodes.
<5> Hook definitions for sending notifications through Alertmanager.
<6> Resources for deploying and configuring Alertmanager.
<7> Alerting rules examples for use with Prometheus Alertmanager (deployed with Prometheus).
<8> Installation resource file for the Prometheus image.
<9> PodMonitor definitions translated by the Prometheus Operator into jobs for the Prometheus server to be able to scrape metrics data directly from pods.
<10> Kafka Bridge resource with metrics enabled.
<11> Metrics configuration that defines Prometheus JMX Exporter relabeling rules for Kafka Connect.
<12> Metrics configuration that defines Prometheus JMX Exporter relabeling rules for Cruise Control.
<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.

NOTE: The Prometheus JMX Exporter collects Java Management Extensions (JMX) from Kafka components and converts them into Prometheus metrics.
You do not require `jmxOptions` configuration in the custom resource of the component for the Prometheus JMX Exporter to function.
`jmxOptions` is only required if you need direct access to JMX from Kafka components.

//Example Prometheus metrics files
include::../../modules/metrics/ref-prometheus-metrics-config.adoc[leveloffset=+1]
//Example Prometheus alert rules
include::../../modules/metrics/ref_metrics-alertmanager-examples.adoc[leveloffset=+1]
//Example Grafana dashboards
include::../../modules/metrics/ref_metrics-dashboards.adoc[leveloffset=+1]
