Skip to main content
Version: 5.0.x

Pulsar metrics

Pulsar exposes the following metrics in Prometheus format. You can monitor your clusters with those metrics.

The following types of metrics are available:

  • Counter: a cumulative metric that represents a single monotonically increasing counter. The value increases by default. You can reset the value to zero or restart your cluster.
  • Gauge: a metric that represents a single numerical value that can arbitrarily go up and down.
  • Histogram: a histogram samples observations (usually things like request durations or response sizes) and counts them in configurable buckets. The _bucket suffix is the number of observations within a histogram bucket, configured with parameter {le="<upper inclusive bound>"}. The _count suffix is the number of observations, shown as a time series and behaves like a counter. The _sum suffix is the sum of observed values, also shown as a time series and behaves like a counter. These suffixes are together denoted by _* in this doc.
  • Summary: similar to a histogram, a summary samples observations (usually things like request durations and response sizes). While it also provides a total count of observations and a sum of all observed values, it calculates configurable quantiles over a sliding time window.

This reference lists Pulsar metrics and selected metrics from its dependencies. Enabled components and configuration determine which series are present. Prometheus counters registered through the Java client expose a _total sample suffix, even when a collector's base name omits it. Summaries expose quantiles plus _count and _sum; classic histograms expose _bucket, _count, and _sum. The explicitly named Pulsar *_le_* bucket gauges are separate metric families, not classic Prometheus histograms. See metrics changes when upgrading.

Matching the scrape interval to the stats periods​

Match the Prometheus scrape interval to the stats periods

Many metrics that brokers and bookies expose to Prometheus are not cumulative. The process computes them over a fixed period, 60 seconds by default, and then starts over. These include topic and namespace rates, latency summaries and buckets, and managed-ledger period statistics.

Cumulative counters can be scraped at any interval. For per-period metrics, match the Prometheus scrape interval to the stats period:

  • A scrape interval shorter than the period reads the same values several times. The metrics change only once per period, however often you scrape.
  • A scrape interval longer than the period misses periods. Latency distributions and rates then cover only some of the time.

For finer-grained metrics, such as a 5-second or 10-second scrape during load tests, set the following periods to the scrape interval. All values below are in seconds.

Broker (conf/broker.conf):

SettingDefaultPurpose
statsUpdateFrequencyInSecs60Updates topic and namespace rates and latency summaries for each period.
statsUpdateInitialDelayInSecs60Delays the first stats update after startup; set it to the same value as the update period.
managedLedgerStatsPeriodSeconds60Sets the period for managed-ledger statistics (pulsar_ml_*), including latency and entry-size buckets.
managedLedgerPrometheusStatsLatencyRolloverSeconds60Sets the rollover period for the BookKeeper client's latency statistics, exposed when bookkeeperClientExposeStatsToPrometheus=true.

Bookie (conf/bookkeeper.conf):

SettingDefaultPurpose
prometheusStatsLatencyRolloverSeconds60Sets the rollover period for the bookie's request, journal, and storage latency statistics.

The default bookkeeper.conf does not list prometheusStatsLatencyRolloverSeconds, so add it to the file. With the Pulsar Docker image, pass it as the environment variable PULSAR_PREFIX_prometheusStatsLatencyRolloverSeconds; the PULSAR_PREFIX_ form adds keys that are absent from the file. With the Pulsar Helm chart, set this environment variable through bookie.configData, as described in Component configuration.

For example, configure a 10-second scrape interval as follows:

# conf/broker.conf
statsUpdateFrequencyInSecs=10
statsUpdateInitialDelayInSecs=10
managedLedgerStatsPeriodSeconds=10
managedLedgerPrometheusStatsLatencyRolloverSeconds=10
# conf/bookkeeper.conf
prometheusStatsLatencyRolloverSeconds=10
# prometheus.yml
scrape_configs:
- job_name: pulsar
scrape_interval: 10s
static_configs:
- targets: ["broker:8080", "bookie:8000"]

Replace the example targets with your broker and bookie metrics endpoints, or use your existing Prometheus service discovery configuration.

Shorter periods cost more broker CPU because each stats update goes through every topic. On brokers with many topics, keep the default 60-second period for production monitoring and use shorter periods for load tests and troubleshooting.

ZooKeeper​

The ZooKeeper metrics are exposed under "/metrics" at port 8000. You can use a different port by configuring the metricsProvider.httpPort in conf/zookeeper.conf.

ZooKeeper provides a New Metrics System since 3.6.0. For more detailed metrics, refer to the ZooKeeper Monitor Guide.

BookKeeper​

The BookKeeper metrics are exposed under "/metrics" at port 8000. You can change the port by updating prometheusStatsHttpPort in the bookkeeper.conf configuration file.

Server metrics​

NameTypeDescription
bookie_SERVER_STATUSGaugeThe server status for bookie server.
  • 1: the bookie is running in writable mode.
  • 0: the bookie is running in read-only mode.
bookkeeper_server_ADD_ENTRY_countCounterThe total number of ADD_ENTRY requests received at the bookie. The success label is used to distinguish between successes and failures.
bookkeeper_server_READ_ENTRY_countCounterThe total number of READ_ENTRY requests received at the bookie. The success label is used to distinguish between successes and failures.
bookie_WRITE_BYTESCounterThe total number of bytes written to the bookie.
bookie_READ_BYTESCounterThe total number of bytes read from the bookie.
bookkeeper_server_ADD_ENTRY_REQUESTSummaryThe summary of request latency of ADD_ENTRY requests at the bookie. The success label is used to distinguish between successes and failures.
bookkeeper_server_READ_ENTRY_REQUESTSummaryThe summary of request latency of READ_ENTRY requests at the bookie. The success label is used to distinguish between successes and failures.
bookkeeper_server_BookieReadThreadPool_queue_{thread_id}GaugeThe number of requests to be processed in a read thread queue.
bookkeeper_server_BookieReadThreadPool_task_queuedSummaryThe waiting time of a task to be processed in a read thread queue.
bookkeeper_server_BookieReadThreadPool_task_executionSummaryThe execution time of a task in a read thread queue.

Journal metrics​

NameTypeDescription
bookie_journal_JOURNAL_SYNC_countCounterThe total number of journal fsync operations happening at the bookie. The success label is used to distinguish between successes and failures.
bookie_journal_JOURNAL_QUEUE_SIZEGaugeThe total number of requests pending in the journal queue.
bookie_journal_JOURNAL_FORCE_WRITE_QUEUE_SIZEGaugeThe total number of force write (fsync) requests pending in the force-write queue.
bookie_journal_JOURNAL_CB_QUEUE_SIZEGaugeThe total number of callbacks pending in the callback queue.
bookie_journal_JOURNAL_ADD_ENTRYSummaryThe summary of request latency of adding entries to the journal.
bookie_journal_JOURNAL_SYNCSummaryThe summary of fsync latency of syncing data to the journal disk.
bookie_journal_JOURNAL_CREATION_LATENCYSummaryThe latency created by a journal log file.

Storage metrics​

NameTypeDescription
bookie_ledgers_countGaugeThe total number of ledgers stored in the bookie.
bookie_entries_countGaugeThe total number of entries stored in the bookie.
bookie_write_cache_sizeGaugeThe bookie write cache size (in bytes).
bookie_read_cache_sizeGaugeThe bookie read cache size (in bytes).
bookie_DELETED_LEDGER_TOTALCounterThe total number of ledgers deleted since the bookie has started.
bookie_ledger_writable_dirsGaugeThe number of writable directories in the bookie.
bookie_flushGaugeThe table flush latency of bookie memory.
bookie_throttled_write_requestsCounterThe number of write requests to be throttled.

Replication metrics​

NameTypeDescription
auditor_NUM_UNDER_REPLICATED_LEDGERSSummaryThe distribution of num under_replicated ledgers on each auditor run.
auditor_UNDER_REPLICATED_LEDGERS_TOTAL_SIZESummaryThe distribution of under_replicated ledgers total size on each auditor run.
auditor_URL_PUBLISH_TIME_FOR_LOST_BOOKIESummaryThe latency distribution of publishing under replicated ledgers for lost bookies.
auditor_BOOKIE_TO_LEDGERS_MAP_CREATION_TIMESummaryThe latency distribution of creating bookies-to-ledgers map.
auditor_CHECK_ALL_LEDGERS_TIMESummaryThe latency distribution of checking all ledgers.
auditor_PLACEMENT_POLICY_CHECK_TIMESummaryThe latency distribution of placementPolicy check.
auditor_REPLICAS_CHECK_TIMESummaryThe latency distribution of replicas check.
auditor_AUDIT_BOOKIES_TIMESummaryThe latency distribution of auditing all the bookies.
auditor_NUM_LEDGERS_CHECKEDCounterThe number of ledgers checked by the auditor.
auditor_NUM_FRAGMENTS_PER_LEDGERSummaryThe distribution of number of fragments per ledger.
auditor_NUM_BOOKIES_PER_LEDGERSummaryThe distribution of number of bookies per ledger.
auditor_NUM_BOOKIE_AUDITS_DELAYEDCounterThe number of bookie-audits delayed.
auditor_NUM_DELAYED_BOOKIE_AUDITS_DELAYES_CANCELLEDCounterThe number of delayed-bookie-audits cancelled.
auditor_NUM_LEDGERS_NOT_ADHERING_TO_PLACEMENT_POLICYGaugeThe number of ledgers not adhering to placement policy found in placement policy check.
auditor_NUM_LEDGERS_SOFTLY_ADHERING_TO_PLACEMENT_POLICYGaugeThe number of ledgers softly adhering to placement policy found in placement policy check.
auditor_NUM_UNDERREPLICATED_LEDGERS_ELAPSED_RECOVERY_GRACE_PERIODGaugeThe number of underreplicated ledgers elapsed recovery grace period.
auditor_NUM_LEDGERS_HAVING_NO_REPLICA_OF_AN_ENTRYGaugeThe number of ledgers having an entry with all the replicas missing.
auditor_NUM_LEDGERS_HAVING_LESS_THAN_AQ_REPLICAS_OF_AN_ENTRYGaugeThe number of ledgers having an entry with less than AQ number of replicas, this doesn't include ledgers counted towards numLedgersHavingNoReplicaOfAnEntry.
auditor_NUM_LEDGERS_HAVING_LESS_THAN_WQ_REPLICAS_OF_AN_ENTRYGaugeThe number of ledgers having an entry with less than WQ number of replicas, this doesn't include ledgers counted towards numLedgersHavingLessThanAQReplicasOfAnEntry.
election_attemptsCounterThe number of auditor election attempts.
replication_worker_NUM_BYTES_READSummaryThe distribution size of entries read by the replicator.
replication_worker_NUM_ENTRIES_READCounterNumber of entries read by the replicator.
replication_worker_NUM_ENTRIES_WRITTENCounterNumber of entries written by the replicator.
replication_worker_NUM_BYTES_WRITTENSummaryThe distribution size of entries written by the replicator.
replication_worker_READ_DATA_LATENCYSummaryThe distribution of latency of read entries by the replicator.
replication_worker_WRITE_DATA_LATENCYSummaryThe distribution of latency of write entries by the replicator.
replication_worker_exceptionsSummaryReplication related exceptions.
replication_worker_rereplicateSummaryOperation stats of re-replicating ledgers.
replication_worker_NUM_FULL_OR_PARTIAL_LEDGERS_REPLICATEDCounterThe number of ledgers re-replicated.
replication_worker_NUM_DEFER_LEDGER_LOCK_RELEASE_OF_FAILED_LEDGERCounterThe number of defer-ledger-lock-releases of failed ledgers.
replication_worker_NUM_ENTRIES_UNABLE_TO_READ_FOR_REPLICATIONCounterThe number of entries ReplicationWorker unable to read.

Broker​

The broker metrics are exposed under "/metrics/" at port 8080. You can change the port by updating webServicePort to a different port in the broker.conf configuration file.

All the metrics exposed by a broker are labeled with cluster=\$\{pulsar_cluster\}. The name of Pulsar cluster is the value of \$\{pulsar_cluster\}, which you have configured in the broker.conf file.

Metric exposure​

exposeTopicLevelMetricsInPrometheus=true exports topic and subscription series; setting it to false exports namespace aggregates instead. This setting is dynamic:

bin/pulsar-admin brokers update-dynamic-config \
--config exposeTopicLevelMetricsInPrometheus --value false

Change it back to true to restore topic-level series. Review dashboards and scrape cardinality when changing the aggregation level. To remove the dynamic override and use the broker configuration again, run pulsar-admin brokers delete-dynamic-config --config exposeTopicLevelMetricsInPrometheus.

For custom topic labels, see Configure topic metric labels.

Broker metrics​

All the broker metrics are labeled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} is the cluster name that you have configured in the broker.conf file.
NameTypeDescription
pulsar_ml_cache_evictionsGaugeThe number of cache evictions during the last minute.
pulsar_ml_cache_inserted_entries_totalCounterThe number of entries inserted into the entry cache.
pulsar_ml_cache_evicted_entries_totalCounterThe number of entries evicted from the entry cache.
pulsar_ml_cache_entriesGaugeThe number of entries in the entry cache.
pulsar_ml_cache_hits_rateGaugeThe number of cache hits per second on the broker side.
pulsar_ml_cache_hits_throughputGaugeThe amount of data (byte per second) retrieved from the cache on the broker side.
pulsar_ml_cache_misses_rateGaugeThe number of cache missed per second on the broker side.
pulsar_ml_cache_misses_throughputGaugeThe amount of data (byte per second) that cannot be retrieved from the cache on the broker side.
pulsar_ml_cache_pool_active_allocationsGaugeThe number of currently active allocations in direct arena.
pulsar_ml_cache_pool_active_allocations_hugeGaugeThe number of currently active huge allocation in direct arena.
pulsar_ml_cache_pool_active_allocations_normalGaugeThe number of currently active normal allocations in direct arena.
pulsar_ml_cache_pool_active_allocations_smallGaugeThe number of currently active small allocations in direct arena.
pulsar_ml_cache_pool_allocatedGaugeDirect memory reserved by the managed-ledger cache allocator, in bytes.
pulsar_ml_cache_pool_usedGaugeDirect memory in use by the managed-ledger cache allocator, in bytes.
pulsar_default_pool_allocatedGaugeDirect memory reserved by the default Pulsar allocator, in bytes.
pulsar_default_pool_usedGaugeDirect memory in use by the default Pulsar allocator, in bytes.
pulsar_ml_cache_used_sizeGaugeThe size used to store the payloads of entries (in bytes).
pulsar_ml_countGaugeThe number of currently opened managed ledgers.
topic_load_times (deprecated)SummaryThe topic load latency calculated in milliseconds.
pulsar_topic_load_timesSummaryThe topic load latency calculated in milliseconds.
pulsar_broker_topics_countGaugeThe number of Pulsar topics in this broker.
pulsar_broker_subscriptions_countGaugeThe number of Pulsar subscriptions in this broker.
pulsar_broker_producers_countGaugeThe number of active producers connected to this broker.
pulsar_broker_consumers_countGaugeThe number of active consumers connected to this broker.
pulsar_broker_rate_inGaugeThe total message rate coming into this broker (message per second).
pulsar_broker_rate_outGaugeThe total message rate going out from this broker (message per second).
pulsar_broker_throughput_inGaugeThe total throughput coming into this broker (byte per second).
pulsar_broker_throughput_outGaugeThe total throughput going out from this broker (byte per second).
pulsar_broker_storage_sizeGaugeThe total storage size of all topics in this broker (in bytes).
pulsar_broker_storage_logical_sizeGaugeThe storage size of all topics in this broker without replicas (in bytes).
pulsar_broker_storage_write_rateGaugeThe total message batches (entries) written to the storage for this broker (message batch per second).
pulsar_broker_storage_read_rateGaugeThe total message batches (entries) read from the storage for this broker (message batch per second).
pulsar_broker_msg_backlogGaugeThe total number of message backlogs in this broker (entries).
pulsar_storage_backlog_quota_check_duration_secondsHistogramThe duration of the backlog quota check process (in seconds)
pulsar_broker_storage_backlog_quota_exceeded_evictions_totalCounterThe number of times a backlog was evicted since it has exceeded its quota. Includes the label quota_type = (time | size)

The pulsar_ml_cache_pool_* metrics describe the separate ml-cache allocator, while pulsar_default_pool_* describe the default allocator. The startup scripts select Netty's adaptive allocator for both. For adaptive and unpooled allocators, active allocation counts are unsupported and reported as -1; the allocated and used byte values both use the allocator's reported direct-memory usage. With the pooled allocator, allocation counts and the distinction between reserved and used pool bytes remain available. Compare these values with pulsar_ml_cache_used_size, which measures logical cached entry bytes: it does not include all memory retained by the allocator.

Additional broker metrics​

These metrics are broker-wide. Publish latency is measured in milliseconds; its quantiles describe the stats rollover period, while its count and sum are cumulative.

NameTypeDescription
pulsar_broker_publish_latencySummaryEnd-to-end broker publish latency, including broker-side completion. Quantiles: 0, 0.5, 0.95, 0.99, 0.999, 0.9999, and 1.
pulsar_broker_in_bytes_totalGaugeTotal bytes received across topics on the broker.
pulsar_broker_out_bytes_totalGaugeTotal bytes dispatched across topics on the broker.
pulsar_broker_storage_read_cache_misses_rateGaugeStorage read operations per second that miss the managed-ledger cache.
pulsar_broker_pending_bytes_to_dispatchGaugeBytes loaded in memory and waiting to be dispatched to consumers.
pulsar_broker_http_rejected_requests_totalCounterHTTP requests rejected by request rate limiting.
pulsar_healthGaugeResult of the latest broker health check: 1 for success, 0 for failure, or -1 before a result is available.
pulsar_version_infoGaugeConstant 1, labeled with the Pulsar version and commit.
pulsar_broker_load_manager_bundle_assigmentSummaryTime in milliseconds to select a broker for bundle assignment in the modular load manager. The exported name retains the spelling assigment.

BookKeeper client metrics​

The BookKeeper client metrics is disabled by default. Set bookkeeperClientExposeStatsToPrometheus=true in broker.conf to expose the BookKeeper client metrics. Suppose you want to expose PerChannel BookKeeper client metrics, which allows you to get the metrics for each bookie that the BookKeeper client connected. You can set bookkeeperClientLimitStatsLogging=true in broker.conf. Note that enabling the PerChannel BookKeeper client metrics might introduce performance issues in high-load situations.

All the BookKeeper client metrics are labeled with the following label:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you configured in broker.conf.
NameTypeDescription
pulsar_managedLedger_client_bookkeeper_client_BOOKIE_QUARANTINECounterThe number of bookie clients to be quarantined.
pulsar_managedLedger_client_BookKeeperClientWorker_task_executionSummaryThe task execution latency calculated in milliseconds
pulsar_managedLedger_client_BookKeeperClientWorker_task_queuedSummaryThe task queued latency calculated in milliseconds
pulsar_managedLedger_client_bookkeeper_client_ADD_ENTRYSummaryAdd entry latency calculated in milliseconds
pulsar_managedLedger_client_bookkeeper_client_READ_ENTRYSummaryRead entry latency calculated in milliseconds
pulsar_managedLedger_client_bookkeeper_client_READ_LACSummaryRead Last Add Confirmed request latency calculated in milliseconds
pulsar_managedLedger_client_bookkeeper_client_WRITE_LACSummaryWrite Last Add Confirmed request latency calculated in milliseconds

Namespace metrics​

Namespace metrics are only exposed when exposeTopicLevelMetricsInPrometheus is set to false.

All the namespace metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you configured in broker.conf.
  • namespace: namespace=\$\{pulsar_namespace\}. \$\{pulsar_namespace\} is the namespace name.
NameTypeDescription
pulsar_topics_countGaugeThe number of Pulsar topics of the namespace owned by this broker.
pulsar_subscriptions_countGaugeThe number of Pulsar subscriptions of the namespace served by this broker.
pulsar_producers_countGaugeThe number of active producers of the namespace connected to this broker.
pulsar_consumers_countGaugeThe number of active consumers of the namespace connected to this broker.
pulsar_rate_inGaugeThe total message rate of the namespace coming into this broker (message per second).
pulsar_rate_outGaugeThe total message rate of the namespace going out from this broker (message per second).
pulsar_throughput_inGaugeThe total throughput of the namespace coming into this broker (byte per second).
pulsar_throughput_outGaugeThe total throughput of the namespace going out from this broker (byte per second).
pulsar_consumer_msg_ack_rateGaugeThe total message acknowledgment rate of the namespace owned by this broker (message per second).
pulsar_storage_sizeGaugeThe total storage size of the topics in this namespace owned by this broker (bytes).
pulsar_storage_logical_sizeGaugeThe storage size of topics in the namespace owned by the broker without replicas (in bytes).
pulsar_storage_backlog_sizeGaugeThe total backlog size of the topics of this namespace owned by this broker (in bytes).
pulsar_storage_backlog_quota_exceeded_evictions_totalCounterThe number of times a backlog was evicted since it has exceeded its quota (When backlog quota's retention policy was set to consumer_backlog_eviction). Also includes label quota_type = (time | size)
pulsar_storage_offloaded_sizeGaugeThe total amount of the data in this namespace offloaded to the tiered storage (bytes).
pulsar_storage_write_rateGaugeThe total message batches (entries) written to the storage for this namespace (message batch per second).
pulsar_storage_read_rateGaugeThe total message batches (entries) read from the storage for this namespace (message batch per second).
pulsar_subscription_delayedGaugeThe total message batches (entries) are delayed for dispatching.
pulsar_storage_write_latency_le_*HistogramThe entry rate of a namespace that the storage write latency is smaller with a given threshold.
Available thresholds:
  • pulsar_storage_write_latency_le_0_5: <= 0.5ms
  • pulsar_storage_write_latency_le_1: <= 1ms
  • pulsar_storage_write_latency_le_5: <= 5ms
  • pulsar_storage_write_latency_le_10: <= 10ms
  • pulsar_storage_write_latency_le_20: <= 20ms
  • pulsar_storage_write_latency_le_50: <= 50ms
  • pulsar_storage_write_latency_le_100: <= 100ms
  • pulsar_storage_write_latency_le_200: <= 200ms
  • pulsar_storage_write_latency_le_1000: <= 1s
  • pulsar_storage_write_latency_le_overflow: > 1s
pulsar_entry_size_le_*HistogramThe entry rate of a namespace that the entry size is smaller with a given threshold.
Available thresholds:
  • pulsar_entry_size_le_128: <= 128 bytes
  • pulsar_entry_size_le_512: <= 512 bytes
  • pulsar_entry_size_le_1_kb: <= 1 KB
  • pulsar_entry_size_le_2_kb: <= 2 KB
  • pulsar_entry_size_le_4_kb: <= 4 KB
  • pulsar_entry_size_le_16_kb: <= 16 KB
  • pulsar_entry_size_le_100_kb: <= 100 KB
  • pulsar_entry_size_le_1_mb: <= 1 MB
  • pulsar_entry_size_le_overflow: > 1 MB
pulsar_delayed_message_index_size_bytesGaugeThe estimated memory size of DelayedDeliveryTracker for the namespace owned by this broker (in bytes). The in-memory tracker estimates its bitmap index using serialized size; this is not a measurement of total JVM heap usage.
pulsar_delayed_message_index_bucket_totalGaugeThe number of delayed message index buckets (immutable buckets + LastMutableBucket )
pulsar_delayed_message_index_loadedGaugeThe total number of delayed message indexes for in the memory.
pulsar_delayed_message_index_bucket_snapshot_size_bytesGaugeThe total size of delayed message index bucket snapshot (in bytes).
pulsar_delayed_message_index_bucket_op_countCounterThe total number of operation delayed message index bucket snapshots. The state label can be succeed,failed, andall (all means the total number of all states) and the type label can be create,load,delete, and merge.
pulsar_delayed_message_index_bucket_op_latency_msHistogramThe latency of delayed message index bucket snapshot operation with a given quantile (threshold). The type label can be create,load,delete, and merge
The label quantile can be:
  • quantile="50" is operation latency between (0ms, 50ms]
  • quantile="100" is operation latency between (50ms, 100ms]
  • quantile="500" is operation latency between (100ms, 500ms]
  • quantile="1000" is operation latency between (500ms, 1s]
  • quantile="5000" is operation latency between (1s, 5s]
  • quantile="30000" is operation latency between (5s, 30s]
  • quantile="60000" is operation latency between (30s, 60s]
  • quantile="overflow" is operation latency > 1m

Topic metrics​

Topic metrics are only exposed when exposeTopicLevelMetricsInPrometheus is set to true.

All the topic metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you configured in broker.conf.
  • namespace: namespace=\$\{pulsar_namespace\}. \$\{pulsar_namespace\} is the namespace name.
  • topic: topic=\$\{pulsar_topic\}. \$\{pulsar_topic\} is the topic name.
NameTypeDescription
pulsar_subscriptions_countGaugeThe number of Pulsar subscriptions of the topic served by this broker.
pulsar_producers_countGaugeThe number of active producers of the topic connected to this broker.
pulsar_consumers_countGaugeThe number of active consumers of the topic connected to this broker.
pulsar_rate_inGaugeThe total message rate of the topic coming into this broker (message per second).
pulsar_rate_outGaugeThe total message rate of the topic going out from this broker (message per second).
pulsar_publish_rate_limit_timesGaugeThe number of times the publish rate limit is triggered.
pulsar_throughput_inGaugeThe total throughput of the topic coming into this broker (byte per second).
pulsar_throughput_outGaugeThe total throughput of the topic going out from this broker (byte per second).
pulsar_consumer_msg_ack_rateGaugeThe total message acknowledgment rate of the topic connected to this broker (message per second).
pulsar_storage_sizeGaugeThe total storage size of the topics in this topic owned by this broker (bytes).
pulsar_storage_logical_sizeGaugeThe storage size of topics in the namespace owned by the broker without replicas (in bytes).
pulsar_storage_backlog_sizeGaugeThe total backlog size of the topics of this topic owned by this broker (in bytes).
pulsar_storage_offloaded_sizeGaugeThe total amount of the data in this topic offloaded to the tiered storage (bytes).
pulsar_storage_backlog_quota_limitGaugeThe total amount of the data in this topic that limit the backlog quota (bytes).
pulsar_storage_backlog_age_secondsGaugeThe age of the oldest unacknowledged message (backlog).
pulsar_storage_backlog_quota_exceeded_evictions_totalCounterThe number of times a backlog was evicted since it has exceeded its quota. Includes label quota_type = (time | size)
pulsar_storage_write_rateGaugeThe total message batches (entries) written to the storage for this topic (message batch per second).
pulsar_storage_read_rateGaugeThe total message batches (entries) read from the storage for this topic (message batch per second).
pulsar_subscription_delayedGaugeThe total message batches (entries) are delayed for dispatching.
pulsar_storage_write_latency_le_*HistogramThe entry rate of a topic that the storage write latency is smaller with a given threshold.
Available thresholds:
  • pulsar_storage_write_latency_le_0_5: <= 0.5ms
  • pulsar_storage_write_latency_le_1: <= 1ms
  • pulsar_storage_write_latency_le_5: <= 5ms
  • pulsar_storage_write_latency_le_10: <= 10ms
  • pulsar_storage_write_latency_le_20: <= 20ms
  • pulsar_storage_write_latency_le_50: <= 50ms
  • pulsar_storage_write_latency_le_100: <= 100ms
  • pulsar_storage_write_latency_le_200: <= 200ms
  • pulsar_storage_write_latency_le_1000: <= 1s
  • pulsar_storage_write_latency_le_overflow: > 1s
pulsar_entry_size_le_*HistogramThe entry rate of a topic that the entry size is smaller with a given threshold.
Available thresholds:
  • pulsar_entry_size_le_128: <= 128 bytes
  • pulsar_entry_size_le_512: <= 512 bytes
  • pulsar_entry_size_le_1_kb: <= 1 KB
  • pulsar_entry_size_le_2_kb: <= 2 KB
  • pulsar_entry_size_le_4_kb: <= 4 KB
  • pulsar_entry_size_le_16_kb: <= 16 KB
  • pulsar_entry_size_le_100_kb: <= 100 KB
  • pulsar_entry_size_le_1_mb: <= 1 MB
  • pulsar_entry_size_le_overflow: > 1 MB
pulsar_in_bytes_totalCounterThe total number of messages in bytes received for this topic.
pulsar_in_messages_totalCounterThe total number of messages received for this topic.
pulsar_out_bytes_totalCounterThe total number of messages in bytes read from this topic.
pulsar_out_messages_totalCounterThe total number of messages read from this topic.
pulsar_compaction_removed_event_countGaugeThe total number of removed events of the compaction.
pulsar_compaction_succeed_countGaugeThe total number of successes of the compaction.
pulsar_compaction_failed_countGaugeThe total number of failures of the compaction.
pulsar_compaction_duration_time_in_millsGaugeThe duration time of the compaction.
pulsar_compaction_read_throughputGaugeThe read throughput of the compaction.
pulsar_compaction_write_throughputGaugeThe write throughput of the compaction.
pulsar_compaction_latency_le_*HistogramThe compaction latency with given quantile.
Available thresholds:
  • pulsar_compaction_latency_le_0_5: <= 0.5ms
  • pulsar_compaction_latency_le_1: <= 1ms
  • pulsar_compaction_latency_le_5: <= 5ms
  • pulsar_compaction_latency_le_10: <= 10ms
  • pulsar_compaction_latency_le_20: <= 20ms
  • pulsar_compaction_latency_le_50: <= 50ms
  • pulsar_compaction_latency_le_100: <= 100ms
  • pulsar_compaction_latency_le_200: <= 200ms
  • pulsar_compaction_latency_le_1000: <= 1s
  • pulsar_compaction_latency_le_overflow: > 1s
pulsar_compaction_compacted_entries_countGaugeThe total number of the compacted entries.
pulsar_compaction_compacted_entries_sizeGaugeThe total size of the compacted entries.
pulsar_txn_tb_active_totalGaugeThe number of active transactions on this topic.
pulsar_txn_tb_aborted_totalCounterThe number of aborted transactions on the topic.
pulsar_txn_tb_committed_totalCounterThe number of committed transactions on the topic.
pulsar_delayed_message_index_size_bytesGaugeThe estimated memory size of DelayedDeliveryTracker for the topic owned by this broker (in bytes). The in-memory tracker estimates its bitmap index using serialized size; this is not a measurement of total JVM heap usage.
pulsar_delayed_message_index_bucket_totalGaugeThe number of delayed message index buckets (immutable buckets + LastMutableBucket )
pulsar_delayed_message_index_loadedGaugeThe total number of delayed message indexes for in the memory.
pulsar_delayed_message_index_bucket_snapshot_size_bytesGaugeThe total size of delayed message index bucket snapshot (in bytes).
pulsar_delayed_message_index_bucket_op_countCounterThe total number of operation delayed message index bucket snapshots. The state label can be succeed,failed, andall (all means the total number of all states) and the type label can be create,load,delete, and merge.
pulsar_delayed_message_index_bucket_op_latency_msHistogramThe latency of delayed message index bucket snapshot operation with a given quantile (threshold). The labeltype label can be create,load,delete, and merge
The label quantile can be:
  • quantile="50" is operation latency between (0ms, 50ms]
  • quantile="100" is operation latency between (50ms, 100ms]
  • quantile="500" is operation latency between (100ms, 500ms]
  • quantile="1000" is operation latency between (500ms, 1s]
  • quantile="5000" is operation latency between (1s, 5s]
  • quantile="30000" is operation latency between (5s, 30s]
  • quantile="60000" is operation latency between (30s, 60s]
  • quantile="overflow" is operation latency > 1m

Producer metrics​

Enable exposeProducerLevelMetricsInPrometheus and topic-level metrics to expose producer metrics. Labels include cluster, namespace, topic, producer_name, and producer_id.

NameTypeDescription
pulsar_producer_msg_rate_inGaugeMessages published per second by this producer.
pulsar_producer_msg_throughput_inGaugeBytes published per second by this producer.
pulsar_producer_msg_average_SizeGaugeAverage published message size in bytes. The capital S is part of the exported name.

Replication metrics​

If a namespace is configured to be replicated among multiple Pulsar clusters, the corresponding replication metrics is also exposed when replicationMetricsEnabled is enabled.

All the replication metrics are also labelled with remoteCluster=\$\{pulsar_remote_cluster\}.

NameTypeDescription
pulsar_replication_rate_inGaugeThe total message rate of the namespace replicating from remote cluster (messages/second).
pulsar_replication_rate_outGaugeThe total message rate of the namespace replicating to remote cluster (messages/second).
pulsar_replication_throughput_inGaugeThe total throughput of the namespace replicating from remote cluster (bytes/second).
pulsar_replication_throughput_outGaugeThe total throughput of the namespace replicating to remote cluster (bytes/second).
pulsar_replication_backlogGaugeThe total backlog of the namespace replicating to remote cluster (messages).
pulsar_replication_rate_expiredGaugeTotal rate of messages expired (messages/second).
pulsar_replication_connected_countGaugeThe count of replication-subscriber up and running to replicate to remote cluster.
pulsar_replication_delay_in_secondsGaugeTime in seconds from the time a message was produced to the time when it is about to be replicated.

Replicated-subscription snapshots​

Snapshot metrics describe cross-cluster replicated-subscription position tracking.

NameTypeDescription
pulsar_replicated_subscriptions_pending_snapshotsGaugeCounter of currently pending snapshots
pulsar_replicated_subscriptions_snapshot_msSummaryTime taken to create a consistent snapshot across clusters
pulsar_replicated_subscriptions_timedout_snapshots_totalCounterCounter of timed out snapshots
pulsar_replication_disconnected_countGaugeNumber of disconnected replicators, labeled by namespace and remote cluster.

Topic lookup metrics​

NameTypeDescription
pulsar_broker_load_manager_bundle_assignmentGaugeThe summary of latency of bundles ownership operations.
pulsar_broker_lookupGaugeThe latency of all lookup operations.
pulsar_broker_lookup_redirectsGaugeThe number of lookup redirected requests.
pulsar_broker_lookup_answersGaugeThe number of lookup responses (i.e. not redirected requests).
pulsar_broker_lookup_failuresGaugeThe number of lookup failures.
pulsar_broker_lookup_pending_requestsGaugeThe number of pending lookups in broker. When it is up to the threshold, new requests are rejected.
pulsar_broker_topic_load_pending_requestsGaugeThe load of pending topic operations.

Topic loading failures​

NameTypeDescription
topic_load_failed_totalCounterPersistent topic load failures, labelled by reason.
pulsar_topic_load_failed_countGaugeCompatibility total across all failure reasons. This is brk_topic_load_failed_count in the broker metrics API.

Each persistent topic-loading operation records at most one failure. The reason values are bundle_unloading, failed_load_namespace_policies, failed_load_topic_policies, failed_load_ml, failed_check_ownership, failed_access_metadata_store, failed_init, timeout, timeout_load_namespace_policies, timeout_load_topic_policies, timeout_load_ml, timeout_init, timeout_dedup, and others. A timeout identifies the pending loading stage when known; timeout is the fallback. All reason series are initialized to zero.

Aggregate over reason for an overall failure rate, or select a reason to diagnose a particular loading stage. For example:

sum without (reason) (rate(topic_load_failed_total[5m]))

Storage and compaction bucket companions​

The pulsar_storage_write_latency_le_* and pulsar_storage_ledger_write_latency_le_* series contain per-period latency bucket counts. The ledger-write family isolates BookKeeper add-entry latency. Bucket names express upper bounds in milliseconds, while the underlying measurements and _sum values use microseconds. Each family also exports _count, _sum, and _overflow; for example, pulsar_storage_ledger_write_latency_count, pulsar_storage_ledger_write_latency_sum, and pulsar_storage_ledger_write_latency_overflow.

The pulsar_compaction_latency_le_* family follows the same bucket naming and microsecond sum units, with pulsar_compaction_latency_count, pulsar_compaction_latency_sum, and pulsar_compaction_latency_overflow companions. Its stats refresh when collected. The pulsar_entry_size_le_* family measures bytes, with pulsar_entry_size_count and pulsar_entry_size_sum companions. These bucket families are exported as gauges; do not treat them as cumulative Prometheus histograms.

ManagedLedger metrics​

All the managedLedger metrics are labeled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} is the cluster name that you have configured in the broker.conf file.
  • namespace: namespace=${pulsar_namespace}. ${pulsar_namespace} is the namespace name.
  • quantile: quantile=${quantile}. Quantile is only for Histogram type metric, and represents the threshold for given Buckets.
NameTypeDescription
pulsar_ml_AddEntryBytesRateGaugeThe B/s rate of messages added
pulsar_ml_AddEntryWithReplicasBytesRateGaugeThe B/s rate of messages added with replicas
pulsar_ml_AddEntryErrorsGaugeThe number of addEntry requests that failed
pulsar_ml_AddEntryLatencyBucketsHistogramThe latency of adding a ledger entry with a given quantile (threshold), including time spent waiting in queue on the broker side.
Available quantile:
  • quantile="0.0_0.5" is AddEntryLatency between (0.0ms, 0.5ms]
  • quantile="0.5_1.0" is AddEntryLatency between (0.5ms, 1.0ms]
  • quantile="1.0_5.0" is AddEntryLatency between (1ms, 5ms]
  • quantile="5.0_10.0" is AddEntryLatency between (5ms, 10ms]
  • quantile="10.0_20.0" is AddEntryLatency between (10ms, 20ms]
  • quantile="20.0_50.0" is AddEntryLatency between (20ms, 50ms]
  • quantile="50.0_100.0" is AddEntryLatency between (50ms, 100ms]
  • quantile="100.0_200.0" is AddEntryLatency between (100ms, 200ms]
  • quantile="200.0_1000.0" is AddEntryLatency between (200ms, 1s]
pulsar_ml_AddEntryLatencyBuckets_OVERFLOWGaugeThe number of times the AddEntryLatency is longer than 1 second
pulsar_ml_AddEntryMessagesRateGaugeThe msg/s rate of messages added
pulsar_ml_AddEntrySucceedGaugeThe number of addEntry requests that succeeded
pulsar_ml_EntrySizeBucketsHistogramThe added entry size of a ledger with a given quantile.
Available quantile:
  • quantile="0.0_128.0" is EntrySize between (0byte, 128byte]
  • quantile="128.0_512.0" is EntrySize between (128byte, 512byte]
  • quantile="512.0_1024.0" is EntrySize between (512byte, 1KB]
  • quantile="1024.0_2048.0" is EntrySize between (1KB, 2KB]
  • quantile="2048.0_4096.0" is EntrySize between (2KB, 4KB]
  • quantile="4096.0_16384.0" is EntrySize between (4KB, 16KB]
  • quantile="16384.0_102400.0" is EntrySize between (16KB, 100KB]
  • quantile="102400.0_1232896.0" is EntrySize between (100KB, 1MB]
pulsar_ml_EntrySizeBuckets_OVERFLOWGaugeThe number of times the EntrySize is larger than 1MB
pulsar_ml_LedgerSwitchLatencyBucketsHistogramThe ledger switch latency with a given quantile.
Available quantile:
  • quantile="0.0_0.5" is EntrySize between (0ms, 0.5ms]
  • quantile="0.5_1.0" is EntrySize between (0.5ms, 1ms]
  • quantile="1.0_5.0" is EntrySize between (1ms, 5ms]
  • quantile="5.0_10.0" is EntrySize between (5ms, 10ms]
  • quantile="10.0_20.0" is EntrySize between (10ms, 20ms]
  • quantile="20.0_50.0" is EntrySize between (20ms, 50ms]
  • quantile="50.0_100.0" is EntrySize between (50ms, 100ms]
  • quantile="100.0_200.0" is EntrySize between (100ms, 200ms]
  • quantile="200.0_1000.0" is EntrySize between (200ms, 1000ms]
pulsar_ml_LedgerSwitchLatencyBuckets_OVERFLOWGaugeThe number of times the ledger switch latency is longer than 1 second
pulsar_ml_LedgerAddEntryLatencyBucketsHistogramThe latency for bookie client to persist a ledger entry from broker to BookKeeper service with a given quantile (threshold).
Available quantile:
  • quantile="0.0_0.5" is LedgerAddEntryLatency between (0.0ms, 0.5ms]
  • quantile="0.5_1.0" is LedgerAddEntryLatency between (0.5ms, 1.0ms]
  • quantile="1.0_5.0" is LedgerAddEntryLatency between (1ms, 5ms]
  • quantile="5.0_10.0" is LedgerAddEntryLatency between (5ms, 10ms]
  • quantile="10.0_20.0" is LedgerAddEntryLatency between (10ms, 20ms]
  • quantile="20.0_50.0" is LedgerAddEntryLatency between (20ms, 50ms]
  • quantile="50.0_100.0" is LedgerAddEntryLatency between (50ms, 100ms]
  • quantile="100.0_200.0" is LedgerAddEntryLatency between (100ms, 200ms]
  • quantile="200.0_1000.0" is LedgerAddEntryLatency between (200ms, 1s]
pulsar_ml_LedgerAddEntryLatencyBuckets_OVERFLOWGaugeThe number of times the LedgerAddEntryLatency is longer than 1 second
pulsar_ml_MarkDeleteRateGaugeThe rate of mark-delete ops/s
pulsar_ml_NumberOfMessagesInBacklogGaugeThe number of backlog messages for all the consumers
pulsar_ml_ReadEntriesBytesRateGaugeThe B/s rate of messages read
pulsar_ml_ReadEntriesErrorsGaugeThe number of readEntries requests that failed
pulsar_ml_ReadEntriesRateGaugeThe msg/s rate of messages read
pulsar_ml_ReadEntriesSucceededGaugeThe number of readEntries requests that succeeded
pulsar_ml_StoredMessagesSizeGaugeThe total size of the messages in active ledgers (accounting for the multiple copies stored)

Managed-ledger read cache and permits​

Pending-read counters describe reuse of concurrent BookKeeper reads. In-flight byte gauges describe the read limiter and report -1 when limiting is disabled. These are broker-wide metrics.

NameTypeDescription
pulsar_ml_cache_pendingreads_entries_notread_totalCounterTotal number of entries not read from BK
pulsar_ml_cache_pendingreads_entries_read_totalCounterTotal number of entries read from BK
pulsar_ml_cache_pendingreads_matched_totalCounterPending reads reused with perfect range match
pulsar_ml_cache_pendingreads_matched_included_totalCounterPending reads reused by attaching to a read with a larger range
pulsar_ml_cache_pendingreads_matched_overlapping_miss_both_totalCounterPending reads that didn't find a match but they partially overlap with another read
pulsar_ml_cache_pendingreads_matched_overlapping_miss_left_totalCounterPending reads that didn't find a match but they partially overlap with another read
pulsar_ml_cache_pendingreads_matched_overlapping_miss_right_totalCounterPending reads that didn't find a match but they partially overlap with another read
pulsar_ml_cache_pendingreads_missed_totalCounterPending reads that didn't find a match
pulsar_ml_reads_available_inflight_bytesGaugeAvailable space for inflight data read from storage or cache
pulsar_ml_reads_inflight_bytesGaugeEstimated number of bytes retained by data read from storage or cache
pulsar_ml_ReadEntriesOpsCacheMissesRateGaugeManaged-ledger read operations per second that miss the cache, aggregated by namespace when exposeManagedLedgerMetricsInPrometheus=true.

Managed cursor acknowledgment state​

The acknowledgment state is persistent to the ledger first. When the acknowledgment state fails to be persistent to the ledger, they are persistent to ZooKeeper. To track the stats of acknowledgment, you can configure the metrics for the managed cursor.

All the cursor acknowledgment state metrics are labeled with the following labels:

  • namespace: namespace=\$\{pulsar_namespace\}. \$\{pulsar_namespace\} is the namespace name.

  • ledger_name: ledger_name=\$\{pulsar_ledger_name\}. \$\{pulsar_ledger_name\} is the ledger name.

  • cursor_name: ledger_name=\$\{pulsar_cursor_name\}. \$\{pulsar_cursor_name\} is the cursor name.

NameTypeDescription
pulsar_ml_cursor_persistLedgerSucceedGaugeThe number of acknowledgment states that is persistent to a ledger.
pulsar_ml_cursor_persistLedgerErrorsGaugeThe number of ledger errors occurred when acknowledgment states fail to be persistent to the ledger.
pulsar_ml_cursor_persistZookeeperSucceedGaugeThe number of acknowledgment states that is persistent to ZooKeeper.
pulsar_ml_cursor_persistZookeeperErrorsGaugeThe number of ledger errors occurred when acknowledgment states fail to be persistent to ZooKeeper.
pulsar_ml_cursor_nonContiguousDeletedMessagesRangeGaugeThe number of non-contiguous deleted messages ranges.
pulsar_ml_cursor_writeLedgerSizeGaugeThe size of write to ledger.
pulsar_ml_cursor_writeLedgerLogicalSizeGaugeThe size of write to ledger (accounting for without replicas).
pulsar_ml_cursor_readLedgerSizeGaugeThe size of read from ledger.

Subscription metrics​

Subscription metrics are only exposed when exposeTopicLevelMetricsInPrometheus is set to true.

To expose subscription backlog age, also set exposeSubscriptionBacklogAgeInPrometheus=true in broker.conf and restart the broker. It defaults to false. When disabled, the broker skips computing subscription backlog age and the topic-stat field oldestBacklogMessageAgeSeconds is -1; the Prometheus age series is absent. See Monitor subscription backlog age.

All the subscription metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
  • namespace: namespace=\$\{pulsar_namespace\}. \$\{pulsar_namespace\} is the namespace name.
  • topic: topic=\$\{pulsar_topic\}. \$\{pulsar_topic\} is the topic name.
  • subscription: subscription=\$\{subscription\}. \$\{subscription\} is the topic subscription name.
NameTypeDescription
pulsar_subscription_back_logGaugeThe number of entries (messages/batched-messages) in unacknowledged state for a subscription
pulsar_subscription_back_log_no_delayedGaugeThe backlog of a subscription that does not contain the delay messages (entries).
pulsar_subscription_storage_backlog_age_secondsGaugeBest-effort age, in seconds, of the oldest unacknowledged message in the subscription storage backlog. Requires exposeSubscriptionBacklogAgeInPrometheus=true. Omitted while the age is unavailable.
pulsar_subscription_delayedGaugeThe total number of messages are delayed to be dispatched for a subscription (messages).
pulsar_subscription_msg_rate_redeliverGaugeThe total message rate for message being redelivered (message per second).
pulsar_subscription_unacked_messagesGaugeThe number of entries (messages/batched-messages) dispatched to consumers and are still unacknowledged
pulsar_subscription_blocked_on_unacked_messagesGaugeIndicate whether a subscription is blocked on unacknowledged messages or not.
  • 1 means the subscription is blocked on waiting for unacknowledged messages to be acked.
  • 0 means the subscription is not blocked on waiting for unacknowledged messages to be acked.
pulsar_subscription_msg_rate_outGaugeThe total message dispatch rate for a subscription (message per second).
pulsar_subscription_msg_throughput_outGaugeThe total message dispatch throughput for a subscription (byte per second).
pulsar_subscription_msg_ack_rateGaugeThe total message acknowledgment rate for a subscription (message per second).
pulsar_subscription_last_expire_timestampGaugeThe expiration timestamp of the last message on the subscription.
pulsar_subscription_last_acked_timestampGaugeThe timestamp of the last acknowledged message on the subscription.
pulsar_subscription_last_consumed_flow_timestampGaugeThe timestamp of the last received consume flow command on the subscription.
pulsar_subscription_last_consumed_timestampGaugeThe timestamp of the last consumed message on the subscription.
pulsar_subscription_last_mark_delete_advanced_timestampGaugeThe advanced timestamp of the last MarkDelete position on the subscription.
pulsar_subscription_msg_rate_expiredGaugeThe total rate of messages expired on this subscription (message per second).
pulsar_subscription_total_msg_expiredGaugeThe total number of messages expired on this subscription.
pulsar_subscription_msg_drop_rateGaugeThe rate of messages dropped on this subscription (message per second).
pulsar_subscription_consumers_countGaugeThe number of connected consumers on this subscription.
pulsar_subscription_filter_processed_msg_countCounterThe number of messages processed by EntryFilter.
pulsar_subscription_filter_accepted_msg_countCounterThe number of messages accepted by EntryFilter.
pulsar_subscription_filter_rejected_msg_countCounterThe number of messages rejected by EntryFilter.
pulsar_subscription_filter_rescheduled_msg_countCounterThe number of messages rescheduled by EntryFilter.
pulsar_delayed_message_index_size_bytesGaugeThe estimated memory size of DelayedDeliveryTracker for the subscription owned by this broker (in bytes). The in-memory tracker estimates its bitmap index using serialized size; this is not a measurement of total JVM heap usage.
pulsar_delayed_message_index_bucket_totalGaugeThe number of delayed message index buckets (immutable buckets + LastMutableBucket )
pulsar_delayed_message_index_loadedGaugeThe total number of delayed message indexes for in the memory.
pulsar_delayed_message_index_bucket_snapshot_size_bytesGaugeThe total size of delayed message index bucket snapshot (in bytes).
pulsar_delayed_message_index_bucket_op_countCounterThe total number of operation delayed message index bucket snapshots. The state label can be succeed,failed, andall (all means the total number of all states) and the type label can be create,load,delete, and merge.
pulsar_delayed_message_index_bucket_op_latency_msHistogramThe latency of delayed message index bucket snapshot operation with a given quantile (threshold). The labeltype label can be create,load,delete, and merge
The label quantile can be:
  • quantile="50" is operation latency between (0ms, 50ms]
  • quantile="100" is operation latency between (50ms, 100ms]
  • quantile="500" is operation latency between (100ms, 500ms]
  • quantile="1000" is operation latency between (500ms, 1s]
  • quantile="5000" is operation latency between (1s, 5s]
  • quantile="30000" is operation latency between (5s, 30s]
  • quantile="60000" is operation latency between (30s, 60s]
  • quantile="overflow" is operation latency > 1m

Additional topic and subscription metrics​

These series use the topic/subscription labels of their corresponding sections. Topic-level series require exposeTopicLevelMetricsInPrometheus=true.

NameTypeDescription
pulsar_average_msg_sizeGaugeAverage incoming message size in bytes for a topic.
pulsar_msg_backlogGaugeBacklog summed across subscriptions; emitted at the configured namespace or topic aggregation level.
pulsar_storage_backlog_quota_limit_timeGaugeTopic backlog age quota in seconds.
pulsar_storage_read_cache_misses_rateGaugeRead operations per second missing the storage cache, at namespace or topic level.
pulsar_subscription_delayed_message_index_size_bytesGaugeMemory used by the subscription delayed-message index, in bytes.
pulsar_subscription_dispatch_throttled_msg_eventsGaugeCumulative message-rate throttling events. The reason label is subscription, topic, or broker.
pulsar_subscription_dispatch_throttled_bytes_eventsGaugeCumulative byte-rate throttling events. The reason label is subscription, topic, or broker.
pulsar_subscription_in_replayGaugeEntries in subscription replay queues, exposed per subscription with topic-level metrics or aggregated by namespace.

Consumer metrics​

Consumer metrics are only exposed when both exposeTopicLevelMetricsInPrometheus and exposeConsumerLevelMetricsInPrometheus are set to true.

All the consumer metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
  • namespace: namespace=\$\{pulsar_namespace\}. \$\{pulsar_namespace\} is the namespace name.
  • topic: topic=\$\{pulsar_topic\}. \$\{pulsar_topic\} is the topic name.
  • subscription: subscription=\$\{subscription\}. \$\{subscription\} is the topic subscription name.
  • consumer_name: consumer_name=\$\{consumer_name\}. \$\{consumer_name\} is the topic consumer name.
  • consumer_id: consumer_id=\$\{consumer_id\}. \$\{consumer_id\} is the topic consumer id.
NameTypeDescription
pulsar_consumer_msg_rate_redeliverGaugeThe total message rate for message being redelivered (message per second).
pulsar_consumer_unacked_messagesGaugeThe total number of unacknowledged messages of a consumer (messages).
pulsar_consumer_blocked_on_unacked_messagesGaugeIndicate whether a consumer is blocked on unacknowledged messages or not.
  • 1 means the consumer is blocked on waiting for unacknowledged messages to be acked.
  • 0 means the consumer is not blocked on waiting for unacknowledged messages to be acked.
pulsar_consumer_msg_rate_outGaugeThe total message dispatch rate for a consumer (message per second).
pulsar_consumer_msg_ack_rateGaugeThe total rate of message ack (message per second).
pulsar_consumer_msg_throughput_outGaugeThe total message dispatch throughput for a consumer (byte per second).
pulsar_consumer_available_permitsGaugeThe available permits for for a consumer.

Managed ledger bookie client metrics​

All the managed ledger bookie client metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
NameTypeDescription
pulsar_managedLedger_client_bookkeeper_ml_scheduler_completed_tasks_*GaugeThe number of tasks the scheduler executor execute completed.
The number of metrics determined by the scheduler executor thread number configured by managedLedgerNumSchedulerThreads in broker.conf.
pulsar_managedLedger_client_bookkeeper_ml_scheduler_queue_*GaugeThe number of tasks queued in the scheduler executor's queue.
The number of metrics determined by the scheduler executor's thread number configured by managedLedgerNumSchedulerThreads in broker.conf.
pulsar_managedLedger_client_bookkeeper_ml_scheduler_total_tasks_*GaugeThe total number of tasks the scheduler executor received.
The number of metrics determined by the scheduler executor's thread number configured by managedLedgerNumSchedulerThreads in broker.conf.
pulsar_managedLedger_client_bookkeeper_ml_scheduler_task_executionSummaryThe scheduler task execution latency calculated in milliseconds.
pulsar_managedLedger_client_bookkeeper_ml_scheduler_task_queuedSummaryThe scheduler task queued latency calculated in milliseconds.

Token metrics​

All the token metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
NameTypeDescription
pulsar_expired_token_totalCounterThe number of expired tokens in Pulsar.
pulsar_expiring_token_minutesHistogramThe remaining time of expiring tokens in minutes.

Authentication metrics​

All the authentication metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
  • provider_name: provider_name=\$\{provider_name\}. \$\{provider_name\} is the class name of the authentication provider.
  • auth_method: auth_method=\$\{auth_method\}. \$\{auth_method\} is the authentication method of the authentication provider.
  • reason: reason=\$\{reason\}. \$\{reason\} is the reason for failing authentication operation. (This label is only for pulsar_authentication_failures_total.)
NameTypeDescription
pulsar_authentication_success_totalCounterThe number of successful authentication operations.
pulsar_authentication_failures_totalCounterThe number of failing authentication operations.

Connection metrics​

All the connection metrics are labelled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
  • broker: broker=\$\{advertised_address\}. \$\{advertised_address\} is the advertised address of the broker.
  • metric: metric=\$\{metric\}. \$\{metric\} is the connection metric collective name.
NameTypeDescription
pulsar_active_connectionsGaugeThe number of active connections.
pulsar_connection_created_total_countGaugeThe total number of connections.
pulsar_connection_create_success_countGaugeThe number of successfully created connections.
pulsar_connection_create_fail_countGaugeThe number of failed connections.
pulsar_connection_closed_total_countGaugeThe total number of closed connections.
pulsar_broker_throttled_connectionsGaugeThe number of throttled connections.

Jetty metrics​

For a functions-worker running separately from brokers, its Jetty metrics are only exposed when includeStandardPrometheusMetrics is set to true.

All the jetty metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
NameTypeDescription
jetty_requests_totalCounterNumber of requests.
jetty_requests_activeGaugeNumber of requests currently active.
jetty_requests_active_maxGaugeMaximum number of requests that have been active at once.
jetty_request_time_max_secondsGaugeMaximum time spent handling requests.
jetty_request_time_seconds_totalCounterTotal time spent in all request handling.
jetty_dispatched_totalCounterNumber of dispatches.
jetty_dispatched_activeGaugeNumber of dispatches currently active.
jetty_dispatched_active_maxGaugeMaximum number of active dispatches being handled.
jetty_dispatched_time_maxGaugeMaximum time spent in dispatch handling.
jetty_dispatched_time_seconds_totalCounterTotal time spent in dispatch handling.
jetty_async_requests_totalCounterTotal number of async requests.
jetty_async_requests_waitingGaugeCurrently waiting async requests.
jetty_async_requests_waiting_maxGaugeMaximum number of waiting async requests.
jetty_async_dispatches_totalCounterNumber of requests that have been asynchronously dispatched.
jetty_expires_totalCounterNumber of async requests that have expired.
jetty_responses_totalCounterNumber of responses, labeled by status code. The code label can be "1xx", "2xx", "3xx", "4xx", or "5xx".
jetty_stats_secondsGaugeTime in seconds stats have been collected for.
jetty_responses_bytes_totalCounterTotal number of bytes across all responses.

Schema metrics​

For a functions-worker running separately from brokers, its schema metrics are only exposed when includeStandardPrometheusMetrics is set to true.

All the schema metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
NameTypeDescription
pulsar_schema_del_ops_failed_totalCounterNumber of failed operations to delete schemas.
pulsar_schema_get_ops_failed_totalCounterNumber of failed operations to get schemas.
pulsar_schema_put_ops_failed_totalCounterNumber of failed operations to send schemas.
pulsar_schema_compatible_totalCounterNumber of compatible schemas.
pulsar_schema_incompatible_totalCounterNumber of incompatible schemas.
pulsar_schema_del_ops_latencySummaryLatency of successful operations to delete schemas.
pulsar_schema_get_ops_latencySummaryLatency of successful operations to get schemas.
pulsar_schema_put_ops_latencySummaryLatency of successful operations to send schemas.

Offload metrics​

Offloader collectors retain their brk_ prefix: they are registered directly in the Prometheus registry. The brk_ to pulsar_ conversion applies to generated broker metrics, not these collectors. Topic labels are present only when topic-level offloader metrics are enabled.

All the offload metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you configured in broker.conf.
  • namespace: namespace=\$\{pulsar_namespace\}. \$\{pulsar_namespace\} is the namespace name.
  • topic: topic=\$\{pulsar_topic\}. \$\{pulsar_topic\} is the topic name.
NameTypeDescription
brk_ledgeroffloader_offload_error_totalCounterThe number of failed operations to offload.
brk_ledgeroffloader_offload_rateGaugeThe rate of offloading(byte per second).
brk_ledgeroffloader_read_offload_error_totalCounterThe number of failed operations to read offload ledgers.
brk_ledgeroffloader_read_offload_rateGaugeThe rate of reading entries from offload ledgers(byte per second).
brk_ledgeroffloader_write_storage_error_totalCounterThe number of failed operations to write to storage.
brk_ledgeroffloader_read_offload_index_latencySummaryThe latency of reading index from offload ledgers, in microseconds.
brk_ledgeroffloader_read_offload_data_latencySummaryThe latency of reading data from offload ledgers, in microseconds.
brk_ledgeroffloader_read_ledger_latencySummaryThe latency of reading entries from BookKeeper, in microseconds.
brk_ledgeroffloader_delete_offload_ops_totalCounterThe total number of successful and failed operations to delete offload ledgers, distinguished by the status label.

Offload read bytes​

Offloader collectors retain the brk_ prefix on the Prometheus endpoint.

NameTypeDescription
brk_ledgeroffloader_read_bytes_totalCounterTotal bytes read from offloaded storage. Uses the same namespace/topic labels as the other offloader collectors.

Web service executor metrics​

For functions workers running separately from brokers, their Jetty metrics are only exposed when includeStandardPrometheusMetrics is set to true.

All the web service executor metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
NameTypeDescription
pulsar_web_executor_max_threadsGAUGEThe max threads of pulsar-web thread pool
pulsar_web_executor_min_threadsGAUGEThe min threads of pulsar-web thread pool
pulsar_web_executor_idle_threadsGAUGEThe idle threads of pulsar-web thread pool
pulsar_web_executor_active_threadsGAUGEThe number of threads performing tasks of pulsar-web thread pool
pulsar_web_executor_current_threadsGAUGEThe number of threads in the pulsar-web thread pool

Metadata store metrics​

All the metadata store metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you configured in broker.conf.
  • name: name=\$\{metadata-store\|configuration-metadata-store\|state-metadata-store\}. \$\{name\} is the metadata store name.
NameTypeDescription
pulsar_metadata_store_ops_latency_msHistogramThe latency of getting/deleting/putting data from/to metadata store, in milliseconds.
pulsar_metadata_store_put_bytes_totalCounterThe number of data put to metadata store.
pulsar_batch_metadata_store_executor_queue_sizeGaugeThe number of blocking operations in metadata store executor.
pulsar_batch_metadata_store_queue_wait_time_msHistogramThe waiting time of batch operations.
pulsar_batch_metadata_store_batch_execute_time_msHistogramThe duration of the batch execution in milliseconds.
pulsar_batch_metadata_store_batch_sizeHistogramThe number of read/write operations in the batch.

JVM Metrics​

Process Metrics​

NameTypeDescription
process_cpu_seconds_totalCounterTotal user and system CPU time spent in seconds.
process_start_time_secondsGaugeStart time of the process since unix epoch in seconds.
process_open_fdsGaugeNumber of open file descriptors.
process_max_fdsGaugeMaximum number of open file descriptors.
process_virtual_memory_bytesGaugeVirtual memory size in bytes.
process_resident_memory_bytesGaugeResident memory size in bytes.

Memory Metrics​

NameTypeDescription
jvm_memory_objects_pending_finalizationGaugeThe number of objects waiting in the finalizer queue.
jvm_memory_bytes_usedGaugeUsed bytes of a given JVM memory area.
jvm_memory_bytes_committedGaugeCommitted (bytes) of a given JVM memory area.
jvm_memory_bytes_maxGaugeMax (bytes) of a given JVM memory area.
jvm_memory_bytes_initGaugeInitial bytes of a given JVM memory area.
jvm_memory_pool_bytes_usedUsed bytes of a given JVM memory pool.
jvm_memory_pool_bytes_committedGaugeCommitted bytes of a given JVM memory pool.
jvm_memory_pool_bytes_maxGaugeMax bytes of a given JVM memory pool.
jvm_memory_pool_bytes_initGaugeInitial bytes of a given JVM memory pool.
jvm_memory_pool_collection_used_bytesGaugeUsed bytes after the last collection of a given JVM memory pool.
jvm_memory_pool_collection_committed_bytesGaugeCommitted after last collection bytes of a given JVM memory pool.
jvm_memory_pool_collection_max_bytesGaugeMax bytes after the last collection of a given JVM memory pool.
jvm_memory_pool_collection_init_bytesGaugeInitial after last collection bytes of a given JVM memory pool.
jvm_memory_pool_allocated_bytes_totalCounterTotal bytes allocated in a given JVM memory pool. Only updated after GC, not continuously.

Direct memory metrics​

These gauges supplement the JVM memory pool metrics.

NameTypeDescription
jvm_memory_direct_bytes_usedGaugeDirect memory currently used, in bytes.
jvm_memory_direct_bytes_maxGaugeMaximum direct memory available to the JVM, in bytes.

Buffer Pools Metrics​

NameTypeDescription
jvm_buffer_pool_used_bytesGaugeUsed bytes of a given JVM buffer pool.
jvm_buffer_pool_capacity_bytesGaugeBytes capacity of a given JVM buffer pool.
jvm_buffer_pool_used_buffersGaugeUsed buffers of a given JVM buffer pool.

Garbage Collectors Metrics​

NameTypeDescription
jvm_gc_collection_secondsSummaryTime spent in a given JVM garbage collector in seconds.

Threads Metrics​

NameTypeDescription
jvm_threads_currentGaugeCurrent thread count of a JVM
jvm_threads_daemonGaugeDaemon thread count of a JVM
jvm_threads_peakGaugePeak thread count of a JVM
jvm_threads_started_totalCounterStarted thread count of a JVM
jvm_threads_deadlockedGaugeCycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers
jvm_threads_deadlocked_monitorGaugeCycles of JVM-threads that are in deadlock waiting to acquire object monitors
jvm_threads_stateGaugeCurrent count of threads by state

Classloaders Metrics​

NameTypeDescription
jvm_classes_currently_loadedGaugeThe number of classes that are currently loaded in the JVM
jvm_classes_loaded_totalCounterThe total number of classes that have been loaded since the JVM has started execution
jvm_classes_unloaded_totalCounterThe total number of classes that have been unloaded since the JVM has started execution

Load balancing​

This section shows all metrics related to broker load balancing.

note
  • Load balancing metrics are not exposed by default. If you want to access load balancing metrics, you need to expose them by setting the following configurations in the broker.conf or standalone.conf file and ensure that your cluster has an active producer or consumer.

    loadManagerClassName=org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl
    loadBalancerEnabled=true
    exposeBundlesMetricsInPrometheus=true // Add this configuration to standalone.conf
  • Metrics with an asterisk (*) are only available in the extensible load balancer.

LoadBalancing metrics​

All the loadbalancing metrics are labeled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} is the cluster name that you have configured in the broker.conf file.
  • broker: broker=${broker}. ${broker} is the IP address of the broker
  • metric: metric="loadBalancing".
NameTypeDescription
pulsar_lb_bandwidth_in_usageGaugeThe broker inbound bandwidth usage (in percent).
pulsar_lb_bandwidth_out_usageGaugeThe broker outbound bandwidth usage (in percent).
pulsar_lb_cpu_usageGaugeThe broker cpu usage (in percent).
pulsar_lb_directMemory_usageGaugeThe broker process direct memory usage (in percent).
pulsar_lb_memory_usageGaugeThe broker process memory usage (in percent).
pulsar_lb_resource_usage {feature=max}*GaugeThe max resource usage of the bandwidth, CPU, memory, and direct_memory.
pulsar_lb_resource_usage {feature=max_ema}*GaugeThe broker load score (WeightedMaxEMA).

BundleUnloading metrics​

All the bundleUnloading metrics are labeled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} is the cluster name that you have configured in the broker.conf file.
  • bundle: bundle=${bundle}. ${bundle} is the bundle range on this broker.
  • metric: metric="bundleUnloading".
NameTypeDescription
pulsar_lb_unload_broker_totalCounterUnload broker count in this bundle unloading
pulsar_lb_unload_bundle_totalCounterBundle unload count in this bundle unloading. If the value of pulsar_lb_unload_bundle_total is greater than zero, it means that the bundle has been unloaded.
pulsar_lb_unload_broker_breakdown_total{result, reason}*CounterUnload broker breakdown count grouped by result and reason labels.
pulsar_lb_resource_usage_stats{feature=max_ema, stat=avg}*GaugeThe average of brokers' load scores.
pulsar_lb_resource_usage_stats{feature=max_ema, stat=std}*GaugeThe standard deviation of brokers' load scores.

BundleSplit metrics​

All the bundleUnloading metrics are labeled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} is the cluster name that you have configured in the broker.conf file.
  • bundle: bundle=${bundle}. ${bundle} is the bundle range on this broker.
  • metric: metric="bundlesSplit".
NameTypeDescription
pulsar_lb_bundles_split_totalCounterThe total count of bundle split in this leader broker
pulsar_lb_bundles_split_breakdown_total{result, reason}*CounterBundle split breakdown count grouped by the result and reason labels.

Bundle metrics​

Set exposeBundlesMetricsInPrometheus=true in the broker configuration to expose these metrics; its default is false. The extensible load manager also emits all seven bundle metrics below.

All the bundle metrics are labeled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} is the cluster name that you have configured in the broker.conf file.
  • broker: broker=${broker}. ${broker} is the IP address of the broker
  • bundle: bundle=${bundle}. ${bundle} is the bundle range on this broker
  • metric: metric="bundle".
NameTypeDescription
pulsar_bundle_msg_rate_inGaugeThe total message rate coming into the topics in this bundle (message per second).
pulsar_bundle_msg_rate_outGaugeThe total message rate going out from the topics in this bundle (message per second).
pulsar_bundle_topics_countGaugeThe topic count in this bundle.
pulsar_bundle_consumer_countGaugeThe consumer count of the topics in this bundle.
pulsar_bundle_producer_countGaugeThe producer count of the topics in this bundle.
pulsar_bundle_msg_throughput_inGaugeThe total throughput coming into the topics in this bundle (byte per second).
pulsar_bundle_msg_throughput_outGaugeThe total throughput going out from the topics in this bundle (byte per second).

Bundle assign metrics​

All the bundle assign metrics are labeled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} is the cluster name you have configured in the broker.conf file.
  • broker: broker=${broker}. ${broker} is the IP address of the broker.
  • bundle: bundle=${bundle}. ${bundle} is the bundle range on this broker.
  • metric: metric="assign".
NameTypeDescription
pulsar_lb_assign_broker_breakdown_total{result, reason}*CounterAssign broker breakdown count grouped by result and reason labels.

Service unit state channel metrics​

All the service unit state channel metrics are labeled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} is the cluster name you have configured in the broker.conf file.
  • metric: metric="sunitStateChn".
NameTypeDescription
pulsar_sunit_state_chn_owner_lookup_total{result, state}*CounterThe owner broker lookup counts grouped by the result and state labels.
pulsar_sunit_state_chn_event_publish_ops_total{result, event}*CounterThe published message count of service unit (e.g., bundle) state changes grouped by the result and event labels
pulsar_sunit_state_chn_subscribe_ops_total{result, event}*CounterThe subscribed message count of service unit (e.g., bundle) state changes grouped by the result and event labels.
pulsar_sunit_state_chn_inactive_broker_cleanup_ops_total{result}*CounterThe counts of inactive broker cleanup operations grouped by the result label.
pulsar_sunit_state_chn_orphan_su_cleanup_ops_total*CounterThe total count of orphan service unit (e.g., bundle) cleanup operations.
pulsar_sunit_state_chn_owned_su_total*GaugeThe number of owned bundles.
pulsar_sunit_state_chn_su_tombstone_cleanup_ops_total*CounterThe total count of deleted service units (e.g., bundles) tombstone operations.
pulsar_sunit_state_chn_cleanup_ops_total{result=Failure}*CounterThe total count of cleanup operation failures.

Additional load-manager diagnostics​

These series depend on the configured load manager. Extensible load-manager and service-unit-state values below are exported as gauges, including fields whose names end in _total.

NameTypeDescription
pulsar_lb_ignored_ack_totalGaugeExtensible load-manager ignored-ack diagnostic count.
pulsar_lb_ignored_send_totalGaugeExtensible load-manager ignored-send diagnostic count.
pulsar_sunit_state_chn_metadata_stateGaugeService-unit channel metadata connection state: 0 (Stable), 1 (Jittery), or 2 (Unstable).
pulsar_sunit_state_chn_last_metadata_session_event_is_reestablishedGauge1 if the last metadata session event was session reestablishment; otherwise 0.
pulsar_sunit_state_chn_last_metadata_session_event_timestamp_msGaugeTimestamp of the last metadata session event, in epoch milliseconds.
pulsar_sunit_state_chn_last_metadata_session_event_age_secondsGaugeSeconds since the last metadata session event, or -1 before an event has been recorded.
pulsar_lb_load_rankGaugeSimple load-manager broker load rank.
pulsar_lb_quota_pct_bandwidth_inGaugeSimple load-manager bandwidth in quota utilization percentage.
pulsar_lb_quota_pct_bandwidth_outGaugeSimple load-manager bandwidth out quota utilization percentage.
pulsar_lb_quota_pct_cpuGaugeSimple load-manager cpu quota utilization percentage.
pulsar_lb_quota_pct_memoryGaugeSimple load-manager memory quota utilization percentage.

Extensible load-manager latency histograms​

These collectors also retain brk_. They measure milliseconds and expose _bucket, _count, and _sum samples, with broker and metric labels. Buckets are 1, 10, 100, 200, 1,000 ms, and +Inf.

NameTypeDescription
brk_lb_unload_latency_msHistogramTotal unload duration on the source broker.
brk_lb_assign_latency_msHistogramTime in the assignment state on the destination broker.
brk_lb_release_latency_msHistogramTime in the release state on the source broker.
brk_lb_disconnect_latency_msHistogramTime in the disconnected state on the source broker.

Pulsar Functions​

Function instance metrics use tenant, namespace, name, instance_id, cluster, and fqfn (fully qualified function name). Worker metrics have their own labels, described below. The main instance table covers Java and Python names; see Go Functions metric names for runtime differences.

The following labels identify the cluster and namespace:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
  • namespace: namespace=\$\{pulsar_namespace\}. \$\{pulsar_namespace\} is the namespace name.
NameTypeDescription
pulsar_function_processed_successfully_totalCounterThe total number of messages processed successfully.
pulsar_function_processed_successfully_1min_totalCounterThe total number of messages processed successfully in the last 1 minute.
pulsar_function_system_exceptions_totalCounterThe total number of system exceptions.
pulsar_function_system_exceptions_1min_totalCounterThe total number of system exceptions in the last 1 minute.
pulsar_function_user_exceptions_totalCounterThe total number of user exceptions.
pulsar_function_user_exceptions_1min_totalCounterThe total number of user exceptions in the last 1 minute.
pulsar_function_process_latency_msSummaryThe process latency in milliseconds.
pulsar_function_process_latency_ms_1minSummaryThe process latency in milliseconds in the last 1 minute.
pulsar_function_last_invocationGaugeThe timestamp of the last invocation of the function.
pulsar_function_received_totalCounterThe total number of messages received from source.
pulsar_function_received_1min_totalCounterThe total number of messages received from source in the last 1 minute.
pulsar_function_user_metric_SummaryThe user-defined metrics.

Function exception details​

Exception gauges include the exception text in the error label in addition to the instance labels.

NameTypeDescription
pulsar_function_source_exceptionGaugeException from source.
pulsar_function_sink_exceptionGaugeException from sink.
pulsar_function_user_exceptionGaugeException from user code, with an error label.
pulsar_function_system_exceptionGaugeException from system code, with an error label.

Go Functions metric names​

The Go runtime uses the following names for its one-minute gauges. Java and Python use the _1min_total names in the main Functions table. These per-minute values reset and should not be treated as lifetime counters.

NameTypeDescription
pulsar_function_processed_successfully_total_1minGaugeMessages processed successfully in the current minute.
pulsar_function_system_exceptions_total_1minGaugeSystem exceptions in the current minute.
pulsar_function_user_exceptions_total_1minGaugeUser exceptions in the current minute.
pulsar_function_received_total_1minGaugeMessages received in the current minute.
pulsar_function_user_metricSummaryUser-defined observations, distinguished by the metric label.

Functions worker metrics​

Worker metrics use the cluster label. Leader-only metrics are emitted by the worker that currently leads scheduling.

NameTypeDescription
pulsar_function_worker_drain_execution_time_total_msSummaryTotal execution time of a drain in milliseconds.
pulsar_function_worker_instance_countGaugeNumber of instances run by this worker.
pulsar_function_worker_rebalance_execution_time_total_msSummaryTotal execution time of a rebalance in milliseconds.
pulsar_function_worker_rebalance_strategy_execution_time_msSummaryExecution time of rebalance strategy in milliseconds.
pulsar_function_worker_schedule_execution_time_total_msSummaryTotal execution time of schedule in milliseconds.
pulsar_function_worker_schedule_strategy_execution_time_msSummaryExecution time of schedule strategy in milliseconds.
pulsar_function_worker_start_instance_process_time_msSummaryStarting instance process time in milliseconds.
pulsar_function_worker_start_up_time_msSummaryWorker service startup time in milliseconds.
pulsar_function_worker_stop_instance_process_time_msSummaryStopping instance process time in milliseconds.
pulsar_function_worker_total_function_countGaugeTotal registered Functions known to the leader.
pulsar_function_worker_total_expected_instance_countGaugeTotal expected Function instances known to the leader.
pulsar_function_worker_is_leaderGauge1 on the leader worker; emitted by the leader.

Connectors​

All the Pulsar connector metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
  • namespace: namespace=\$\{pulsar_namespace\}. \$\{pulsar_namespace\} is the namespace name.

Connector metrics contain source metrics and sink metrics.

  • Source metrics

    NameTypeDescription
    pulsar_source_written_totalCounterThe total number of records written to a Pulsar topic.
    pulsar_source_written_1min_totalCounterThe total number of records written to a Pulsar topic in the last 1 minute.
    pulsar_source_received_totalCounterThe total number of records received from source.
    pulsar_source_received_1min_totalCounterThe total number of records received from source in the last 1 minute.
    pulsar_source_last_invocationGaugeThe timestamp of the last invocation of the source.
    pulsar_source_source_exceptionGaugeThe exception from a source.
    pulsar_source_source_exceptions_totalCounterThe total number of source exceptions.
    pulsar_source_source_exceptions_1min_totalCounterThe total number of source exceptions in the last 1 minute.
    pulsar_source_system_exceptionGaugeThe exception from system code.
    pulsar_source_system_exceptions_totalCounterThe total number of system exceptions.
    pulsar_source_system_exceptions_1min_totalCounterThe total number of system exceptions in the last 1 minute.
    pulsar_source_user_metric_SummaryThe user-defined metrics.
  • Sink metrics

    NameTypeDescription
    pulsar_sink_written_totalCounterThe total number of records processed by a sink.
    pulsar_sink_written_1min_totalCounterThe total number of records processed by a sink in the last 1 minute.
    pulsar_sink_received_1min_totalCounterThe total number of messages that a sink has received from Pulsar topics in the last 1 minute.
    pulsar_sink_received_totalCounterThe total number of records that a sink has received from Pulsar topics.
    pulsar_sink_last_invocationGaugeThe timestamp of the last invocation of the sink.
    pulsar_sink_sink_exceptionGaugeThe exception from a sink.
    pulsar_sink_sink_exceptions_totalCounterThe total number of sink exceptions.
    pulsar_sink_sink_exceptions_1min_totalCounterThe total number of sink exceptions in the last 1 minute.
    pulsar_sink_system_exceptionGaugeThe exception from system code.
    pulsar_sink_system_exceptions_totalCounterThe total number of system exceptions.
    pulsar_sink_system_exceptions_1min_totalCounterThe total number of system exceptions in the last 1 minute.
    pulsar_sink_user_metric_SummaryThe user-defined metrics.

Proxy​

All the proxy metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
  • kubernetes_pod_name: kubernetes_pod_name=\$\{kubernetes_pod_name\}. \$\{kubernetes_pod_name\} is the Kubernetes pod name.
NameTypeDescription
pulsar_proxy_active_connectionsGaugeNumber of connections currently active in the proxy.
pulsar_proxy_new_connectionsCounterCounter of connections being opened in the proxy.
pulsar_proxy_rejected_connectionsCounterCounter for connections rejected due to throttling.
pulsar_proxy_binary_opsCounterCounter of proxy operations.
pulsar_proxy_binary_bytesCounterCounter of proxy bytes.

Proxy lookup requests​

These counters track proxy requests and throttling rejections.

NameTypeDescription
pulsar_proxy_get_schema_requests_totalCounterCounter of schema requests
pulsar_proxy_get_topics_of_namespace_requests_totalCounterCounter of getTopicsOfNamespace requests
pulsar_proxy_lookup_requests_totalCounterCounter of topic lookup requests
pulsar_proxy_partitions_metadata_requests_totalCounterCounter of partitions metadata requests
pulsar_proxy_rejected_get_topics_of_namespace_requests_totalCounterCounter of getTopicsOfNamespace requests rejected due to throttling
pulsar_proxy_rejected_lookup_requests_totalCounterCounter of topic lookup requests rejected due to throttling
pulsar_proxy_rejected_partitions_metadata_requests_totalCounterCounter of partitions metadata requests rejected due to throttling

Pulsar transaction​

All the transaction metrics are labeled with the following labels:

  • cluster: cluster=\$\{pulsar_cluster\}. \$\{pulsar_cluster\} is the cluster name that you have configured in the broker.conf file.
  • coordinator_id: coordinator_id=\$\{coordinator_id\}. \$\{coordinator_id\} is the coordinator id.
NameTypeDescription
pulsar_txn_active_countGaugeNumber of active transactions.
pulsar_txn_created_totalCounterNumber of created transactions.
pulsar_txn_committed_totalCounterNumber of committed transactions.
pulsar_txn_aborted_totalCounterNumber of aborted transactions of this coordinator.
pulsar_txn_timeout_totalCounterNumber of timeout transactions.
pulsar_txn_append_log_totalCounterNumber of append transaction logs.
pulsar_txn_execution_latency_le_*HistogramTransaction execution latency.
Available latencies are as below:
  • latency="10" is TransactionExecutionLatency between (0ms, 10ms]
  • latency="20" is TransactionExecutionLatency between (10ms, 20ms]
  • latency="50" is TransactionExecutionLatency between (20ms, 50ms]
  • latency="100" is TransactionExecutionLatency between (50ms, 100ms]
  • latency="500" is TransactionExecutionLatency between (100ms, 500ms]
  • latency="1000" is TransactionExecutionLatency between (500ms, 1000ms]
  • latency="5000" is TransactionExecutionLatency between (1s, 5s]
  • latency="15000" is TransactionExecutionLatency between (5s, 15s]
  • latency="30000" is TransactionExecutionLatency between (15s, 30s]
  • latency="60000" is TransactionExecutionLatency between (30s, 60s]
  • latency="300000" is TransactionExecutionLatency between (1m,5m]
  • latency="1500000" is TransactionExecutionLatency between (5m,15m]
  • latency="3000000" is TransactionExecutionLatency between (15m,30m]
  • latency="overflow" is TransactionExecutionLatency between (30m,∞]
pulsar_txn_tb_client_abort_failed_totalCounterThe number of failures to abort transactions for transaction buffer client.
pulsar_txn_tb_client_commit_failed_totalCounterThe number of failures to commit transaction for transaction buffer client.
pulsar_txn_tb_client_abort_latencySummaryThe latency of aborting transactions for transaction buffer client.
pulsar_txn_tb_client_commit_latencySummaryThe latency of committing transactions for transaction buffer client.
pulsar_txn_tb_client_pending_requestsCounterThe number of pending requests for transaction buffer client.
pulsar_txn_tp_committed_count_totalCounterThe number of committed transactions for pending ack store.
pulsar_txn_tp_aborted_count_totalCounterThe number of aborted transactions for pending ack store.
pulsar_txn_tp_commit_latencySummaryThe latency of committing transactions for transaction pending ack handle.

Resource groups​

Resource-group counters accumulate reported usage, computed quotas, and management operations. Usage counters are cumulative additions of each interval's usage, not gauges for the most recent interval. Labels are ResourceGroup, plus MonitoringClass for usage/quota series and RemoteBroker for remote usage series. Registration counters are grouped by resource group rather than individual tenant or namespace.

NameTypeDescription
pulsar_resource_group_aggregate_usage_secsSummaryTime required to aggregate usage of all resource groups, in seconds.
pulsar_resource_group_bytes_used_totalCounterBytes locally used within this resource group during the last aggregation interval
pulsar_resource_group_calculate_quota_secsSummaryTime required to calculate quota of all resource groups, in seconds.
pulsar_resource_group_calculated_bytes_quota_totalCounterBytes quota calculated for resource group
pulsar_resource_group_calculated_messages_quota_totalCounterMessages quota calculated for resource group
pulsar_resource_group_local_usage_reported_totalCounterNumber of times local usage was reported (vs. suppressed due to negligible change)
pulsar_resource_group_messages_used_totalCounterMessages locally used within this resource group during the last aggregation interval
pulsar_resource_group_namespace_registers_totalCounterNumber of registrations of namespaces
pulsar_resource_group_namespace_unregisters_totalCounterNumber of un-registrations of namespaces
pulsar_resource_group_remote_usage_bytes_used_totalCounterBytes used reported about this resource group and monitoring class from a remote broker
pulsar_resource_group_remote_usage_messages_used_totalCounterMessages used reported about this resource group and monitoring class from a remote broker
pulsar_resource_group_tenant_registers_totalCounterNumber of registrations of tenants
pulsar_resource_group_tenant_unregisters_totalCounterNumber of un-registrations of tenants
pulsar_resource_group_updates_totalCounterNumber of update operations on the given resource group

Topic-list memory limiting (broker and proxy)​

For each suffix below, brokers expose pulsar_broker_topic_list_ plus the suffix, and proxies expose pulsar_proxy_topic_list_ plus the suffix. For example, pulsar_broker_topic_list_heap_memory_used_bytes and pulsar_proxy_topic_list_heap_memory_used_bytes measure heap usage. These metrics have no per-topic labels. Configure limits, queue capacities, and timeouts with the maxTopicListInFlightHeapMem* and maxTopicListInFlightDirectMem* settings.

SuffixTypeDescription
heap_memory_used_bytesGaugeMemory currently reserved by topic-list operations, in bytes.
heap_memory_limit_bytesGaugeConfigured memory limit, in bytes.
heap_queue_sizeGaugeRequests waiting for memory permits.
heap_queue_max_sizeGaugeConfigured maximum waiting queue size.
heap_wait_time_msSummaryTime waiting for memory permits, in milliseconds.
heap_timeout_totalCounterMemory permit acquisition timeouts.
direct_memory_used_bytesGaugeMemory currently reserved by topic-list operations, in bytes.
direct_memory_limit_bytesGaugeConfigured memory limit, in bytes.
direct_queue_sizeGaugeRequests waiting for memory permits.
direct_queue_max_sizeGaugeConfigured maximum waiting queue size.
direct_wait_time_msSummaryTime waiting for memory permits, in milliseconds.
direct_timeout_totalCounterMemory permit acquisition timeouts.