Skip to Content
FeaturesMonitoring & Dashboard

Monitoring & Dashboard

Pilot provides real-time visibility into your Kafka cluster through a web dashboard and REST API. All monitoring features are free and do not require a license.

Dashboard Overview

Access the dashboard at http://localhost:8080 (or your configured PORT). The overview page displays:

  • Kafka availability - a verdict from the open cluster conditions, and a card with three open conditions, Kafka’s first
  • Cluster health - broker availability, under-replicated partitions, offline partitions
  • Broker status - online/offline/maintenance state per broker with rack assignments
  • Partition distribution - leader and replica counts per broker
  • Activity scores - per-partition throughput estimates based on metadata sampling

Rates and Activity Scoring

Pilot estimates partition activity from broker metadata, without consuming any messages. Every METADATA_UPDATE_INTERVAL (default: 10s), it:

  1. Fetches partition watermarks - high/low offsets for all partitions
  2. Reads the shared storage snapshot - disk usage per partition per broker, refreshed separately from watermarks
  3. Computes activity rates - message rate from watermark deltas, byte rate from log size changes

The Topics page separates producer and consumer estimates:

MeasurementMeaning
Producer message rateHigh-watermark advancement per second, smoothed across observations.
Producer byte rateEstimated log growth per second, using distinct disk observations. This is not broker network ingress.
Consumer message rateCommitted-offset advancement. The topic estimate takes the maximum group rate per partition, smooths it, then sums partitions. It does not sum every group’s traffic.
Consumer byte rateCommitted-offset progress multiplied by an estimated record size. This is not broker network egress.
Stored replicasStorage across replicas, including replication copies, rather than one logical copy of the topic.

Rates are smoothed, so they do not drop to zero the moment producers or consumers stop. Consumer rates fade over several minutes. They also depend on how often clients commit offsets, not just when they fetch or process records.

Proposal scoring uses separate averaged rate history. See Measurement Readiness and Sustained Benefit for the checks that determine when a rebalance can be applied.

Storage figures in the dashboard, the Brokers and Partitions views and /api/v1/cluster/logdirs are measured sizes. For topics whose cleanup.policy contains compact, proposals and what-if simulations weigh each partition at its typical size over its log-cleaner cycle instead, so their broker disk totals can differ from these views. See Compacted Topics.

Sample Availability

Sampled producer rates distinguish current observations from Partial sample, Last known and Unavailable. A missing observation is not measured zero. Failed reads retain the last valid values and their original source timestamps rather than presenting an unsuccessful attempt as a new measurement. A page whose read has been delayed for more than 60 seconds shows a Data delayed chip in its header.

Partition API responses expose samplingStatus, rateObservedAt and diskMeasuredAt. The rate timestamp describes the message-rate observation; the disk timestamp describes storage. hasSamples means historical samples exist, not that the latest attempt succeeded.

Current limitation: byte rates can briefly show zero after startup or an HA failover before two distinct disk observations establish a rate. Do not interpret this initial zero as proof that no bytes are being produced.

Comparing with Prometheus

Match topic and partition identities, definitions, observation times and calculation windows. Pilot’s own Prometheus metrics expose its collected estimates and are not an independent reference. Broker JMX and Kafka exporter metrics have their own collection windows; a broker byte counter is not equivalent to sampled log growth. Retention can advance log starts without consumer activity.

Consumer observation timestamps identify the successful Kafka read interval. Follower-lag responses carry collectedAt for the storage measurements and topologyObservedAt for replica metadata; compare against those rather than the scrape time. See Consumer Group Metrics.

Broker Health Monitoring

A background health monitor checks broker availability every 30 seconds:

  • Available - responding to metadata requests
  • Unavailable - not responding (counted as total - available)
  • Maintenance - explicitly placed in Maintenance Mode

In standalone mode, /api/v1/ready answers 200 only with a health observation and at least one available Kafka broker. Rack assessment uncertainty does not change it. It needs sign-in when authentication is enabled, so Kubernetes probes use /api/v1/health.

Rack Topology

Pilot checks whether each partition’s assigned replicas can retain its effective min.insync.replicas after any single rack is lost. For example, four replicas distributed 2/1/1 across three racks can retain minimum ISR 2 after the largest rack is lost. Co-location alone does not establish a violation. This is an assignment assessment, not a guarantee that the current ISR can keep accepting writes.

The rackAwareness assessment reports complete, partial or unavailable, with evaluated and unknown partition counts, proven violations, source timestamps and an evidence deadline. Missing minimum-ISR configuration, rack labels, assignments or usable topology remain unknown. A partial assessment can have both proven violations and unknown partitions.

Expired evidence becomes unavailable even if the next health pass has not completed. The legacy HTTP notRackAwarePartitions count is null unless the assessment is complete and current; the corresponding exact Prometheus series is omitted. Do not treat either as zero. Zero establishes no assigned-partition rack violations only when the assessment is complete and current. See Cluster Health Metrics.

API Endpoints

MethodPathDescription
GET/api/v1/clusterBasic cluster info
GET/api/v1/cluster/comprehensiveFull cluster data (use ?summary=true to omit partition arrays)
GET/api/v1/cluster/healthBroker and partition health
GET/api/v1/conditionsCluster conditions: what is wrong with the cluster, worst first
GET/api/v1/cluster/logdirsDisk usage (use ?summary=true for broker-level only)
GET/api/v1/cluster/follower-lagFollower lag (use ?summary=true, ?topic=, ?broker=)
GET/api/v1/partitionsPartition listing (supports ?minimal=true and ?fields=f1,f2)
GET/api/v1/brokers/racksRack topology
GET/api/v1/healthLiveness and readiness probe (public)
GET/api/v1/readyWhether Kafka is reachable; needs sign-in when authentication is enabled

Performance Options

For large clusters, use query parameters to reduce payload size:

  • /api/v1/cluster/comprehensive?summary=true - strips partition arrays from topics (60-80% smaller)
  • /api/v1/cluster/logdirs?summary=true - broker-level only (90%+ smaller)
  • /api/v1/partitions?minimal=true - strips extra fields
  • /api/v1/partitions?fields=topic,partition,leader,replicas - whitelist specific fields

Follower Lag Monitoring

Follower lag measures the offset gap between leader and follower replicas for each partition. A non-zero lag means followers have not yet replicated all messages from the leader. Persistent or growing lag can indicate slow brokers, network bottlenecks, or disk I/O pressure on follower nodes.

How It Works

Pilot reads follower lag from Kafka’s DescribeLogDirs response, the same storage data it collects for disk usage. By default this data is refreshed about once a minute, so lag and watermarks can have slightly different timestamps.

Granularity Levels

The dashboard and API surface follower lag at four levels:

  • Cluster total - sum of all follower offset lag across every replica in the cluster
  • Per-broker - total follower lag for all replicas hosted on a given broker
  • Per-topic - total follower lag across all partitions of a topic
  • Per-partition - lag for each individual follower replica of a partition

URP Classification

When under-replicated partitions (URPs) are detected, Pilot classifies each URP by its root cause:

  • Offline broker - the replica’s broker is not responding to metadata requests
  • Follower lag - the broker is online but the replica has fallen behind the leader

This distinction is important for operations: offline-broker URPs require infrastructure attention, while follower-lag URPs often resolve on their own once the underlying I/O or network pressure subsides. The proposal engine skips lag-caused URPs during critical fix generation, avoiding unnecessary partition moves for transient replication delays.

GET /api/v1/cluster/health counts the URPs by cause:

FieldCounts
urpsFromOfflineBrokersURPs caused by offline brokers
urpsFromFollowerLagURPs caused by follower lag
urpsFromReassignmentsURPs whose every replica out of the ISR is a new replica that a reassignment is still copying, whoever started it
unexplainedUrpsURPs that neither an offline broker nor a reassignment explains

urpsFromReassignments and unexplainedUrps are null while the split is unknown: before the first health cycle, and while Kafka’s reassignment listing is unavailable. null is not zero. The cluster conditions use the same split: URPs from reassignments are the info condition kafka.partitions.catching_up, unexplained ones the warning kafka.partitions.under_replicated.

Proposal Engine Integration

Brokers with follower lag do not receive new replicas from balancing plans. Leadership changes to them are still allowed. Repairs prefer brokers without lag, and replication-factor increases never use a broker with lag; see Repairs.

API Endpoint

MethodPathDescription
GET/api/v1/cluster/follower-lagFollower lag data with optional filtering

Query parameters:

ParameterDescription
topicFilter to a specific topic
brokerFilter to a specific broker ID
summaryWhen true, returns only cluster and broker level totals (omits partition detail)

Health Threshold

Set PILOT_FOLLOWER_LAG_WARNING_THRESHOLD (default: 1000) to control when total cluster follower lag triggers a warning on the health endpoint.

Prometheus Integration

Pilot exposes Prometheus metrics at /metrics. Key monitoring metrics include:

  • pilot_cluster_brokers_available / pilot_cluster_brokers_unavailable
  • pilot_cluster_under_replicated_partitions
  • pilot_cluster_offline_partitions
  • pilot_sampler_partitions_tracked
  • pilot_follower_lag_total
  • pilot_follower_lag_max

See Prometheus Metrics for the complete reference and Monitoring Setup for Prometheus scraping and alert rules.

Last updated on