Internal Metrics

This page describes the original metrics available on <node ip>:9644/metrics. These are provided for internal support, troubleshooting, and backward compatibility.

For information about the latest metrics available on :9644/public_metrics, see Monitoring.

Configure Prometheus: internal metrics

Prometheus is a systems monitoring and alerting tool. It collects and stores metrics as time-series data identified by metric name and key/value pairs.

Redpanda exports Prometheus metrics on :9644/public_metrics, which has been available since v22.2. To generate the Redpanda configuration on an existing Prometheus instance for both the /public_metrics endpoint as well as the /metrics endpoint, run:

rpk generate prometheus-config --job-name redpanda-metrics-test --node-addrs 'localhost:9644' --internal-metrics

The output is a YAML object that you can add to the scrape_configs list.

- job_name: redpanda-node
  - targets:

Edit the prometheus.yml file in the Prometheus root folder to add the Redpanda configuration under the scrape_configs:

  - job_name: redpanda
      - targets:

The number of targets may change depending on the total number of running nodes.

Save the configuration file, and restart Prometheus to apply changes.

Configure Grafana: internal metrics

Now that you have the metrics, you need a tool to query, visualize, and generate alerts. Grafana talks to Prometheus and lets you create dashboards with multiple graphic components.

To generate a comprehensive Grafana dashboard, run:

rpk generate grafana-dashboard --datasource <name> --metrics-endpoint <url>


  • <name> is the name of the Prometheus data source configured in your Grafana instance.

  • <url> is the address to a Redpanda node’s metrics endpoint. The default is <node ip>:9644/metrics.

See details in the rpk command reference for Grafana.

Out of the box, Grafana generates panels tracking latency for 50%, 95%, and 99% (based on the maximum latency set), throughput, and error segmentation by type.

Pipe the command’s output to a file, and import it into Grafana.

rpk generate grafana-dashboard \
  --datasource prometheus \
  --metrics-endpoint > redpanda-dashboard.json

In Grafana, import this generated JSON file. The default Grafana dashboard shows information about available Redpanda nodes, partitions, latency, and throughput graphics.

You can use the imported dashboard to create new panels.

  1. Click + in the left pane, and select Add a new panel.

  2. On the Query tab, select Prometheus data source.

  3. Decide which metric you want to monitor, click Metrics browser, and start typing vectorized to show available metrics from the Redpanda cluster.

Another way to see available metrics with their description is to access the cluster using a web browser on port 9644. (The port can change depending on your configuration.) You can dynamically set queries to calculate the values in the format you want.

For example, to display the total number of partitions in your cluster, run this query on Grafana:

count(count by (topic,partition)

To show the number of partitions for a specific topic, run:

count(count by (topic,partition)

Monitor internal metrics

Most metrics are useful for debugging, but the following metrics can be useful to measure system health:

Metric Definition Diagnostics


Redpanda uptime in milliseconds


Last stable offset

If this is the last record received by the cluster, then the cluster is up-to-date and ready for maintenance


Total delay time in the queue

Can indicate latency caused by disk operations in seconds


Number of requests in the queue

Can indicate latency caused by disk operations


kafka_rpc: Currently active connections

Shows the number of clients actively connected


kafka_rpc: Number of accepted connections

Compare to the value at a previous time to derive the rate of accepted connections


kafka_rpc: Number of bytes received from the clients in valid requests

Compare to the value at a previous time to derive the throughput in Kafka layer in bytes/sec received


kafka_rpc: Number of successful requests

Compare to the value at a previous time to derive the messages per second per shard


kafka_rpc: Number of requests being processed by server


kafka_rpc: Number of bytes sent to clients


kafka_rpc: Number of service errors


Number of leadership changes

High value can indicate nodes failing and causing leadership changes


CPU utilization

Shows the true utilization of the CPU by Redpanda process


Number of compacted segments


Number of created log segments


Current size of partition in bytes


Total number of bytes read


Total number of bytes written