Monitor Confluent Gateway Metrics
Confluent Gateway exposes Prometheus-format metrics and a liveness check through a single administrative service. For information on how to enable the metrics endpoint, see Administration and metrics configuration.
Metric names and labels can change between Confluent Gateway releases. Query the
administrative service’s /metrics endpoint
at http://{bindAddress}:{port}/metrics directly on your Confluent Gateway instance
to verify the exact metric names exposed by your deployed version.
To view pre-built Grafana dashboards and a sample Prometheus stack you can run
locally, see the gateway monitoring examples
in the confluent-kubernetes-examples repository.
Monitor failed connections
Use these metrics to detect downstream request failures and upstream broker connections that fail to establish.
Metric |
Description |
Alert guidance |
|---|---|---|
|
Total count of downstream client-facing errors. Measures failures occurring on the proxy before requests reach upstream Kafka brokers. |
Alert on a sustained non-zero rate over five minutes. |
|
Measures cumulative connection attempts from clients to the proxy with connection attempts from the proxy to upstream brokers. Divergence indicates the proxy accepts client connections but fails to establish broker connections. |
Alert if the rates of these two metrics diverge for more than five
minutes. Compare rates, for example with |
|
Measures total client disconnections partitioned by cause, such as graceful
shutdowns with |
Alert on spikes in |
|
Identifies current lifecycle state of virtual cluster routes, returning |
Alert if any route reports |
Example Prometheus Query Language (PromQL) query for the downstream error rate:
rate(kroxylicious_client_to_proxy_errors_total[5m])
Track request and response completion
Use these metrics to identify requests that do not complete and schema validation failures on enforced routes.
Metric |
Description |
Alert guidance |
|---|---|---|
|
Requests that never receive a response. |
Alert if the ratio of |
|
Count of partitions that Confluent Gateway validated, per route, topic, and mode, with the outcome and failure origin. Confluent Gateway emits this metric only for routes that have governance enabled. For more information, see Enforce Data Governance Centrally with Confluent Gateway. |
Alert on a sustained |
Example PromQL queries:
# Request rate
rate(kroxylicious_client_to_proxy_request_total[5m])
# Response rate
rate(kroxylicious_proxy_to_client_response_total[5m])
# Governance rejection rate by route and topic
sum by (route, topic) (rate(gateway_governance_data_latency_seconds_count{outcome="rejected"}[5m]))
Measure throughput and latency
Use these metrics for capacity planning and to track authentication swapping (AuthSwap) latency against your service-level objectives (SLOs).
Metric |
Description |
Alert guidance |
|---|---|---|
|
Traffic volume and payload sizes for client-to-proxy and proxy-to-broker traffic. |
Track for capacity planning. No default alert required. |
|
Client-observed end-to-end AuthSwap latency percentiles. |
Alert if the |
|
Secret store lookup latency during AuthSwap. |
Alert if the |
|
Client-side and cluster-side AuthSwap authentication success and failure counts. |
Alert on a sustained |
Note
Confluent Gateway emits gateway_authswap_* metrics only for routes configured
with AuthSwap authentication. Routes using passthrough authentication
do not emit these series. For details,
see Authentication swapping.
Example PromQL queries:
# Average request size by virtual cluster
rate(kroxylicious_client_to_proxy_request_size_bytes_sum[5m])
/ rate(kroxylicious_client_to_proxy_request_size_bytes_count[5m])
# AuthSwap client authentication failure rate by route
rate(gateway_authswap_client_auth_total{result="failure"}[5m])
# 99th-percentile AuthSwap latency by route
gateway_authswap_latency_seconds{quantile="0.99"}
Monitor topic-based routing and fencing
Use these metrics to monitor fencing rules and dynamic routes. Dynamic routing is an Early Access feature. For more information, see Migrate Topics Incrementally with Topic-Based Routing and Fencing.
Metric |
Description |
Alert guidance |
|---|---|---|
|
Requests that fencing rules blocked.
|
A non-zero rate indicates an active fence. Alert if the rate doesn’t return to zero after you remove a fence. |
|
Requests that a dynamic route rejected.
|
After you reroute a topic, expect a transient spike in
|
|
Fan-out requests that failed on a bound cluster. Confluent Gateway sends a fan-out request to every bound cluster, and a failure on any one cluster fails the request and closes the client connection.
|
Alert on any non-zero rate. |
|
Topics that Confluent Gateway filtered out of metadata responses.
|
Not an alert signal. The rate is non-zero during normal operation on any route bound to more than one streaming domain. To calculate the average number of dropped topics per metadata request, divide by the total number of metadata calls (the next metric in this table). |
|
Metadata requests that Confluent Gateway handled on dynamic routes.
|
Use as the denominator for the dropped-topics metric in the previous row. |
|
Producer ID rewrites that Confluent Gateway performed on dynamic routes.
|
No default alert required. |
Example PromQL queries:
# Blocked requests by plane and topic
sum by (plane, topic) (rate(gateway_fencing_v2_requests_total[5m]))
# Rejected requests by reason
sum by (reason) (rate(gateway_router_rejections_total[5m]))
# Average number of dropped topics per metadata request
sum(rate(gateway_router_metadata_topics_dropped_total[5m]))
/ sum(rate(gateway_router_metadata_calls_total[5m]))
Check process health
Use standard Java Virtual Machine (JVM) and process metrics to monitor process health.
Metric |
Description |
Alert guidance |
|---|---|---|
|
Heap and non-heap memory usage compared to configured limits. |
Alert if usage exceeds 85% of maximum memory. |
|
Garbage collection pause time. |
Alert on a rising |
|
Process CPU usage compared to total host CPU usage. |
Alert if usage exceeds your configured threshold. |
|
Open file descriptors compared to the maximum limit. Requires
|
Alert if open files exceed 80% of the maximum limit. |
|
Active client-to-proxy and proxy-to-broker connection counts. |
Track against expected client and broker counts. |
|
Pending tasks per Netty event-loop thread. |
Alert on a sustained non-zero value to detect event-loop saturation. |
Example PromQL query for heap usage:
sum(jvm_memory_used_bytes{area="heap"}) / sum(jvm_memory_max_bytes{area="heap"} > 0)