> ## Documentation Index
> Fetch the complete documentation index at: https://sariva.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Metrics: how they work

> Where Sariva's cluster metrics come from on the CFK path, what is on by default, the prerequisites, and how the platform degrades when a source is unavailable.

Sariva answers "is this cluster healthy?" from **two independent data paths** — knowing which is which tells you what needs to be working:

| Signal | Source | Needs JMX? |
| - | - | - |
| Broker up/down, offline partitions, under-replicated partitions | Kafka **admin metadata** (over the mTLS admin connection) | No |
| **Consumer lag** | Kafka **admin API** (consumer offsets vs log-end) | No |
| Throughput (bytes/messages in/out), request latency (p99), JVM heap | **JMX Prometheus exporter** on each broker pod | Yes |
| Component health (Schema Registry, Connect, …) | CFK custom-resource status (Kubernetes API) | No |

So a cluster with no metrics endpoint still gets connectivity, partition health, lag, and component health — only the throughput/heap block is affected.

## Enabling metrics: nothing to enable

On Confluent Platform 8.x under CFK, the in-process **JMX Prometheus exporter is already on** at each broker pod, port **7778**, path `/metrics` — plaintext HTTP, no CR change, no rolling restart, on **both Community and Enterprise** packages. Sariva scrapes it directly.

ⓘINFO

**Not the Confluent Metrics Reporter.** The Community scaffold disables CFK's Confluent Metrics Reporter (`spec.metricReporter.enabled: false`) — that reporter is Control Center telemetry, requires the Enterprise image, and is unrelated to Sariva's metrics. Sariva's scrape of the `:7778` exporter works regardless of that setting, on either package.

## Prerequisites

| Prerequisite | Why | Already satisfied when |
| - | - | - |
| Working mTLS admin connection | Sariva discovers the broker hosts from admin metadata and derives the metrics targets from them (port 9071 → 7778) — no Kubernetes pod-listing, **no extra RBAC** | The cluster is registered and `state: healthy` |
| Network reachability, Sariva pod → broker pods on `:7778` | The scrape is a direct in-cluster HTTP read | Sariva and the cluster share the EKS cluster (topology A) with default networking |
| `monitoring_enabled: true` on the cluster registration | The observability switch per cluster | Default for wizard/watcher-registered clusters |

Nothing to install, no Prometheus required — Sariva reads live values on demand and stores no time-series (history is your Prometheus stack's job, if you run one).

## What you get (and what reads as null)

* **Populated:** bytes/messages in and out per second, under-replicated partitions, produce/fetch p99 latency, JVM heap % (worst broker highlighted in Slack answers).
* **Null with a reason, by design:** controller-quorum metrics (they live on the KRaft controller pods, not the broker exporter) — reported as unavailable with the reason, never as zero.

Every section of an observe result carries a machine-readable reason (`ok`, `metrics_not_exposed`, …), so "no data" is always distinguishable from "zero".

## When metrics are unavailable

If `:7778` is unreachable (network policy, non-CFK cluster, exporter off), the metrics block returns null **with the reason** — connectivity, partition health, lag, and component health keep working. Nothing fails; Slack answers simply omit throughput/heap and say why.

Restrictive NetworkPolicies are the usual culprit: allow ingress to broker pods on TCP 7778 from Sariva's namespace.

## Roadmap

Two further metric sources share the same result shape: reading from **your Prometheus** (for clusters where direct pod scraping isn't appropriate) and the **Confluent Cloud Metrics API** (the CC path's equivalent). Same sections, same reasons model.

## Continue the deployment path

> [card] [Permissions model](https://sariva.mintlify.site/prerequisites/cfk/permissions.md)
>
> Why metrics need no extra RBAC — and everything else Sariva is granted.

> [card] [Back: AWS EKS + Confluent Platform (CFK)](https://sariva.mintlify.site/deploy/aws-eks-cfk.md)
>
> Return to the CFK path map.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.