Pulsar exposes metrics in Prometheus format that can be collected and used for monitoring the health of the cluster.

概述

The metrics exposed by Pulsar are in Prometheus format. The types of metrics are:

  • Counter: a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart.
  • Gauge: a gauge is a metric that represents a single numerical value that can arbitrarily go up and down.
  • Histogram: 直方图样本观测 (通常是请求持续时间和响应大小) ,并将它们计入可配置的 bucket 中。
  • Summary: 与直方图类似的总结样本观察 (通常是请求持续时间和响应大小)。 但它同时也提供了总观测次数以及所有观测值的总和,它会在滑动的时间窗口上计算可配置的分位数。

ZooKeeper

The ZooKeeper metrics are exposed under “/metrics” at port 8000. You can use a different port by configuring the stats_server_port system property.

服务器度量值

Name类型Description
zookeeper_server_znode_count计量表存储的 z-nodes 数量。
zookeeper_server_data_size_bytes计量表储存的所有 z-nodes 的总大小。
zookeeper_server_connections计量表当前打开的连接数量。
zookeeper_server_watches_count计量表注册的观察者数量。
zookeeper_server_ephemerals_count计量表临时 z-nodes 的数量。

请求度量值

Name类型Description
zookeeper_server_requests计数器特定服务器收到请求的总数。
zookeeper_server_requests_latency_ms总结按毫秒计算的请求延迟。
Available labels: type (write, read).
  • write: 将数据写入 ZooKeeper 的请求。
  • read: 从 ZooKeeper 读数据的请求。

BookKeeper

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

服务器度量值

Name类型Description
bookie_SERVER_STATUS计量表bookie 服务器的服务状态。
  • 1: bookie 正运行于可写入模式。
  • 0: bookie 正运行于只读模式。
bookkeeper_server_ADD_ENTRY_count计数器The total number of ADD_ENTRY requests received at the bookie. success 标签会被用于区分成功与失败。
bookkeeper_server_READ_ENTRY_count计数器The total number of READ_ENTRY requests received at the bookie. success 标签会被用于区分成功与失败。
bookie_WRITE_BYTES计数器The total number of bytes written to the bookie.
bookie_READ_BYTES计数器The total number of bytes read from the bookie.
bookkeeper_server_ADD_ENTRY_REQUEST直方图The histogram of request latency of ADD_ENTRY requests at the bookie. success 标签会被用于区分成功与失败。
bookkeeper_server_READ_ENTRY_REQUEST直方图The histogram of request latency of READ_ENTRY requests at the bookie. success 标签会被用于区分成功与失败。

日志度量值

Name类型Description
bookie_journal_JOURNAL_SYNC_count计数器bookie 中日志 fsync 操作的总次数。 success 标签会被用于区分成功与失败。
bookie_journal_JOURNAL_QUEUE_SIZE计量表日志队列中待处理的请求总数。
bookie_journal_JOURNAL_FORCE_WRITE_QUEUE_SIZE计量表在强制写入队列中等待的强制写入 (fsync) 请求总数。
bookie_journal_JOURNAL_CB_QUEUE_SIZE计量表回调队列中待处理的回调总数。
bookie_journal_JOURNAL_ADD_ENTRY直方图在日志中添加条目的请求延迟的直方图。
bookie_journal_JOURNAL_SYNC直方图同步数据到日志磁盘的 fsync 延迟的直方图。

存储度量值

Name类型Description
bookie_ledgers_count计量表bookie 中存储的 ledger 总数。
bookie_entries_count计量表bookie 中存储的条目总数。
bookie_write_cache_size计量表bookie 的写缓存大小(以字节为单位)。
bookie_read_cache_size计量表bookie 的读缓存大小(以字节为单位)。
bookie_DELETED_LEDGER_COUNT计数器bookie 被启动以来被删除的 ledger 总数。
bookie_ledger_writable_dirs计量表bookie 中可写入目录的数量。

Broker

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

broker 暴露的所有度量值会带有 cluster=${pulsar_cluster} 标签。 The value of ${pulsar_cluster} is the pulsar cluster name you configured in broker.conf.

Broker has the following kinds of metrics:

命名空间度量值

命名空间度量值只有在 exposeTopicLevelMetricsInPrometheus 被设为 false 时才暴露。

所有命名空间度量值都带有以下标签:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} 就是你在 broker.conf 中配置的集群名称。
  • namespace: namespace=${pulsar_namespace}. ${pulsar_namespace} 是命名空间名称。
Name类型Description
pulsartopics_count计量表命名空间下由此 broker 拥有的 Pulsar 主题数。
pulsar_subscriptions_count计量表命名空间下由此 broker 服务的 Pulsar 订阅数。
pulsar_producers_count计量表命名空间下连接到此 broker 的活动生产者数。
pulsar_consumers_count计量表命名空间下连接到此 broker 的活动消费者数。
pulsar_rate_in计量表命名空间下的所有消息进入此 broker 的频率(消息/秒)。
pulsar_rate_out计量表命名空间下的所有消息从此 broker 发出的频率(消息/秒)。
pulsar_throughput_in计量表命名空间下数据进入此 broker 的总吞吐量(字节/秒)。
pulsar_throughput_out计量表命名空间下数据由此 broker 发出的总吞吐量(字节/秒)。
pulsar_storage_size计量表命名空间下由此 broker 拥有的主题的总存储大小 (字节)。
pulsar_storage_backlog_size计量表命名空间下由此 broker 拥有的总积压大小 (消息)。
pulsar_storage_offloaded_size计量表此命名空间中已卸载到层级存储的数据总量(字节)。
pulsar_storage_write_rate计量表此命名空间写入到存储的总消息批处理(条目)数 (消息批处理/秒)。
pulsar_storage_read_rate计量表此命名空间从存储中读取的总消息批处理(条目)数 (消息批处理/秒)。
pulsar_subscription_delayed计量表被延迟派发的总消息批处理(条目)数。
pulsar_storage_write_latency_le直方图The entry rate of a namespace that the storage write latency is smaller with a given threshold.
可用的阈值:
  • pulsarstorage_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直方图The 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

复制度量值

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

All the replication metrics will also be labelled with remoteCluster=${pulsar_remote_cluster}.

Name类型Description
pulsar_replication_rate_in计量表命名空间从远程集群进行复制的总消息频率(消息/秒)。
pulsar_replication_rate_out计量表命名空间复制到远程集群的总消息频率(消息/秒)。
pulsar_replication_throughput_in计量表命名空间从远程集群进行复制的总吞吐量(字节/秒)。
pulsar_replication_throughput_out计量表命名空间复制到远程集群的总吞吐量(字节/秒)。
pulsar_replication_backlog计量表命名空间复制到远程集群的总积压量(消息)。

主题度量值

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

所有主题度量值都带有以下标签:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} 就是你在 broker.conf 中配置的集群名称。
  • namespace: namespace=${pulsar_namespace}. ${pulsar_namespace} 是命名空间名称。
  • topic: topic=${pulsar_topic}. ${pulsar_topic} 是主题名。
Name类型Description
pulsarsubscriptions_count计量表主题下由此 broker 服务的 Pulsar 订阅数。
pulsar_producers_count计量表主题下连接到此 broker 的活动生产者数。
pulsar_consumers_count计量表主题下连接到此 broker 的活动消费者数。
pulsar_rate_in计量表主题下的所有消息进入此 broker 的频率(消息/秒)。
pulsar_rate_out计量表主题下的所有消息从此 broker 发出的频率(消息/秒)。
pulsar_throughput_in计量表主题下数据进入此 broker 的总吞吐量(字节/秒)。
pulsar_throughput_out计量表主题下数据由此 broker 发出的总吞吐量(字节/秒)。
pulsar_storage_size计量表主题下由此 broker 拥有的主题的总存储大小 (字节)。
pulsar_storage_backlog_size计量表主题下由此 broker 拥有的总积压大小 (消息)。
pulsar_storage_offloaded_size计量表此主题中已卸载到层级存储的数据总量(字节)。
pulsar_storage_backlog_quota_limit计量表此主题中限制积压定额的数据总量(字节)。
pulsar_storage_write_rate计量表此主题写入到存储的总消息批处理(条目)数 (消息批处理/秒)。
pulsar_storage_read_rate计量表此主题从存储中读取的总消息批处理(条目)数 (消息批处理/秒)。
pulsar_subscription_delayed计量表被延迟派发的总消息批处理(条目)数。
pulsar_storage_write_latency_le直方图The entry rate of a topic that the storage write latency is smaller with a given threshold.
可用的阈值:
  • pulsarstorage_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直方图The 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_total计数器The total number of bytes received for this topic
pulsar_in_messages_total计数器The total number of messages received for this topic
pulsar_out_bytes_total计数器The total number of bytes read from this topic
pulsar_out_messages_total计数器The total number of messages read from this topic

复制度量值

If a namespace that a topic belongs to is configured to be replicated between multiple Pulsar clusters, the corresponding replication metrics will also be exposed when replicationMetricsEnabled is enabled.

All the replication metrics will also be labelled with remoteCluster=${pulsar_remote_cluster}.

Name类型Description
pulsar_replication_rate_in计量表主题从远程集群进行复制的总消息频率(消息/秒)。
pulsar_replication_rate_out计量表主题复制到远程集群的总消息频率(消息/秒)。
pulsar_replication_throughput_in计量表主题从远程集群进行复制的总吞吐量(字节/秒)。
pulsar_replication_throughput_out计量表主题复制到远程集群的总吞吐量(字节/秒)。
pulsar_replication_backlog计量表主题复制到远程集群的总积压量(消息)。

ManagedLedgerCache 度量值

所有 ManagedLedgerCache 度量值都带有以下标签:

  • 集群: cluster=${pulsar_cluster}。 ${pulsar_cluster} is the cluster name that you configured in broker.conf.
Name类型Description
pulsar_ml_cache_evictions计量表在过去 1 分钟内的缓存驱逐数。
pulsar_ml_cache_hits_rate计量表每秒缓存命中数。
pulsar_ml_cache_hits_throughput计量表从缓存中取出的数据量,以字节/秒为单位
pulsar_ml_cache_misses_rate计量表每秒缓存失效数
pulsar_ml_cache_misses_throughput计量表从缓存中取出的数据量,以字节/秒为单位
pulsar_ml_cache_pool_active_allocations计量表直接场地(direct arena)中当前活动的分配数
pulsar_ml_cache_pool_active_allocations_huge计量表直接场地(direct arena)中当前活动的大型(huge)分配数
pulsar_ml_cache_pool_active_allocations_normal计量表直接场地(direct arena)中当前活动的正常(normal)分配数
pulsar_ml_cache_pool_active_allocations_small计量表直接场地(direct arena)中当前活动的小型(small)分配数
pulsar_ml_cache_pool_active_allocations_tiny计量表直接场地(direct arena)中当前活动的超小型(tiny)分配数
pulsar_ml_cache_pool_allocated计量表直接场地(direct arena)中为 chunk 列表分配的总内存
pulsar_ml_cache_pool_used计量表直接场地(direct arena)中 chunk 列表使用的总内存
pulsar_ml_cache_used_size计量表用于存储条目负载的字节大小
pulsar_ml_count计量表当前打开的托管 ledger 数量。

ManagedLedger 度量值

所有 managedLedger 度量值都带有以下标签:

  • 集群: cluster=${pulsar_cluster}。 ${pulsar_cluster} is the cluster name that you configured in broker.conf.
  • 命名空间: namespace=${pulsar_namespace}。 ${pulsar_namespace} 是命名空间名称。
  • 分位数: quantile=${quantile}. 分位数是只提供给 直方图 的类型度量值,代表了给定 Bucket 的阈值。
Name类型Description
pulsar_ml_AddEntryBytesRate计量表添加消息的字节/秒频率
pulsar_ml_AddEntryErrors计量表失败的 addEntry 请求数
pulsar_ml_AddEntryLatencyBuckets直方图给定分位数(阈值)的 ledger 添加条目延迟 。
可用的分位数:
  • quantile=”0.0_0.5” 是 AddEntryLatency 介于 (0.0ms, 0.5ms]
  • quantile=”0.5_1.0” 是 AddEntryLatency 介于 (0.5ms, 1.0ms]
  • quantile=”1.0_5.0” 是 AddEntryLatency 介于 (1ms, 5ms]
  • quantile=”5.0_10.0” 是 AddEntryLatency 介于 (5ms, 10ms]
  • quantile=”10.0_20.0” 是 AddEntryLatency 介于 (10ms, 20ms]
  • quantile=”20.0_50.0” 是 AddEntryLatency 介于 (20ms, 50ms]
  • quantile=”50.0_100.0” 是 AddEntryLatency 介于 (50ms, 100ms]
  • quantile=”100.0_200.0” 是 AddEntryLatency 介于 (100ms, 200ms]
  • quantile=”200.0_1000.0” 是 AddEntryLatency 介于 (200ms, 1s]
pulsar_ml_AddEntryLatencyBuckets_OVERFLOW计量表The add entry latency > 1s
pulsar_ml_AddEntryMessagesRate计量表The msg/s rate of messages added
pulsar_ml_AddEntrySucceed计量表The number of addEntry requests that succeeded
pulsar_ml_EntrySizeBuckets直方图The add entry size of a ledger with given quantile.
Available quantile:
  • quantile=”0.0_128.0” 是 EntrySize 介于 (0byte, 128byte]
  • quantile=”128.0_512.0” 是 EntrySize 介于 (128byte, 512byte]
  • quantile=”512.0_1024.0” 是 EntrySize 介于 (512byte, 1KB]
  • quantile=”1024.0_2048.0” 是 EntrySize 介于 (1KB, 2KB]
  • quantile=”2048.0_4096.0” 是 EntrySize 介于 (2KB, 4KB]
  • quantile=”4096.0_16384.0” 是 EntrySize 介于 (4KB, 16KB]
  • quantile=”16384.0_102400.0” 是 EntrySize 介于 (16KB, 100KB]
  • quantile=”102400.0_1232896.0” 是 EntrySize 介于 (100KB, 1MB]
pulsar_ml_EntrySizeBuckets_OVERFLOW计量表The add entry size > 1MB
pulsar_ml_LedgerSwitchLatencyBuckets直方图The ledger switch latency with given quantile.
可用的分位数:
  • quantile=”0.0_0.5” 是 EntrySize 介于 (0ms, 0.5ms]
  • quantile=”0.5_1.0” 是 EntrySize 介于 (0.5ms, 1ms]
  • quantile=”1.0_5.0” 是 EntrySize 介于 (1ms, 5ms]
  • quantile=”5.0_10.0” 是 EntrySize 介于 (5ms, 10ms]
  • quantile=”10.0_20.0” 是 EntrySize 介于 (10ms, 20ms]
  • quantile=”20.0_50.0” 是 EntrySize 介于 (20ms, 50ms]
  • quantile=”50.0_100.0” 是 EntrySize 介于 (50ms, 100ms]
  • quantile=”100.0_200.0” 是 EntrySize 介于 (100ms, 200ms]
  • quantile=”200.0_1000.0” 是 EntrySize 介于 (200ms, 1000ms]
pulsar_ml_LedgerSwitchLatencyBuckets_OVERFLOW计量表The ledger switch latency > 1s
pulsar_ml_MarkDeleteRate计量表The rate of mark-delete ops/s
pulsar_ml_NumberOfMessagesInBacklog计量表The number of backlog messages for all the consumers
pulsar_ml_ReadEntriesBytesRate计量表The bytes/s rate of messages read
pulsar_ml_ReadEntriesErrors计量表The number of readEntries requests that failed
pulsar_ml_ReadEntriesRate计量表The msg/s rate of messages read
pulsar_ml_ReadEntriesSucceeded计量表The number of readEntries requests that succeeded
pulsar_ml_StoredMessagesSize计量表The total size of the messages in active ledgers (accounting for the multiple copies stored)

LoadBalancing 度量值

所有负载均衡度量值都带有以下标签:

  • 集群: cluster=${pulsar_cluster}。 ${pulsar_cluster} is the cluster name that you configured in broker.conf.
  • broker: broker=${broker}. ${broker} is the ip address of the broker
  • 度量值: metric=”loadBalancing”。
Name类型Description
pulsar_lb_bandwidth_in_usage计量表正在使用的 broker 带宽
pulsar_lb_bandwidth_out_usage计量表不在使用的 broker 带宽
pulsar_lb_cpu_usage计量表broker 的 cpu 使用量
pulsar_lb_directMemory_usage计量表broker 进程的直接内存使用量
pulsar_lb_memory_usage计量表broker 进程的内存使用量

BundleUnloading 度量值

所有 bundleUnloading 度量值都带有以下标签:

  • 集群: cluster=${pulsar_cluster}。 ${pulsar_cluster} is the cluster name that you configured in broker.conf.
  • 度量值: metric=”bundleUnloading”。
Name类型Description
pulsar_lb_unload_broker_count计数器在本次 bundle 卸载中卸载的 broker 计数
pulsar_lb_unload_bundle_count计数器在本次 bundle 卸载中卸载的 bundle 计数

BundleSplit 度量值

所有 bundleUnloading 度量值都带有以下标签:

  • 集群: cluster=${pulsar_cluster}。 ${pulsar_cluster} is the cluster name that you configured in broker.conf.
  • 度量值: metric=”bundlesSplit”。
Name类型Description
pulsar_lb_bundles_split_count计数器在本次 bundle 切分检查中切分的 bundle 计数

Subscription metrics

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

All the subscription metrics are labelled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} 就是你在 broker.conf 中配置的集群名称。
  • namespace: namespace=${pulsar_namespace}. ${pulsar_namespace} 是命名空间名称。
  • topic: topic=${pulsar_topic}. ${pulsar_topic} 是主题名。
  • subscription: subscription=${subscription}. ${subscription} is the topic subscription name.
Name类型Description
pulsar_subscription_back_log计量表The total backlog of a subscription (messages).
pulsar_subscription_delayed计量表The total number of messages are delayed to be dispatched for a subscription (messages).
pulsar_subscription_msg_rate_redeliver计量表The total message rate for message being redelivered (messages/second).
pulsar_subscription_unacked_messages计量表The total number of unacknowledged messages of a subscription (messages).
pulsar_subscription_blocked_on_unacked_messages计量表Indicate whether a subscription is blocked on unacknowledged messages or not.
  • 1 means the subscription is blocked on waiting unacknowledged messages to be acked.
  • 0 means the subscription is not blocked on waiting unacknowledged messages to be acked.
pulsar_subscription_msg_rate_out计量表The total message dispatch rate for a subscription (messages/second).
pulsar_subscription_msg_throughput_out计量表The total message dispatch throughput for a subscription (bytes/second).

Consumer metrics

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

All the consumer metrics are labelled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} 就是你在 broker.conf 中配置的集群名称。
  • namespace: namespace=${pulsar_namespace}. ${pulsar_namespace} 是命名空间名称。
  • topic: topic=${pulsar_topic}. ${pulsar_topic} 是主题名。
  • 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.
Name类型Description
pulsar_consumer_msg_rate_redeliver计量表The total message rate for message being redelivered (messages/second).
pulsar_consumer_unacked_messages计量表The total number of unacknowledged messages of a consumer (messages).
pulsar_consumer_blocked_on_unacked_messages计量表Indicate whether a consumer is blocked on unacknowledged messages or not.
  • 1 means the consumer is blocked on waiting unacknowledged messages to be acked.
  • 0 means the consumer is not blocked on waiting unacknowledged messages to be acked.
pulsar_consumer_msg_rate_out计量表The total message dispatch rate for a consumer (messages/second).
pulsar_consumer_msg_throughput_out计量表The total message dispatch throughput for a consumer (bytes/second).
pulsar_consumer_available_permits计量表The available permits for for a consumer.

托管的 ledger bookie 客户端度量值

All the managed ledger bookie client metrics labelled with the following labels:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} 就是你在 broker.conf 中配置的集群名称。
Name类型Description
pulsarmanagedLedger_client_bookkeeper_ml_scheduler_completed_tasks计量表调度程序执行器已执行完成的任务数。
broker.confmanagedLedgerNumerThrad 配置的调度器线程数所决定的度量值数。
pulsarmanagedLedger_client_bookkeeper_ml_scheduler_queue计量表在调度器执行者队列中排队的任务数量。
broker.confmanagedLedgerNumerThrad 配置的调度器线程数所决定的度量值数。
pulsarmanagedLedger_client_bookkeeper_ml_scheduler_total_tasks计量表调度程序执行器接收的任务数。
broker.confmanagedLedgerNumerThrad 配置的调度器线程数所决定的度量值数。
pulsarmanagedLedger_client_bookkeeper_ml_workers_completed_tasks计量表worker 执行器已执行完成的任务数。
broker.confmanagedLedgerNumWorkerThreads 配置的 worker 任务线程数所决定的度量值数。
pulsarmanagedLedger_client_bookkeeper_ml_workers_queue计量表在 worker 执行者队列中排队的任务数量。
broker.confmanagedLedgerNumWorkerThreads 配置的调度器线程数所决定的度量值数。
pulsarmanagedLedger_client_bookkeeper_ml_workers_total_tasks计量表worker 执行器接收的任务数。
broker.confmanagedLedgerNumWorkerThreads 配置的 worker 线程数所决定的度量值数。
pulsar_managedLedger_client_bookkeeper_ml_scheduler_task_execution总结按毫秒计算的调度器任务执行延迟。
pulsar_managedLedger_client_bookkeeper_ml_scheduler_task_queued总结按毫秒计算的调度器任务排队延迟。
pulsar_managedLedger_client_bookkeeper_ml_workers_task_execution总结按毫秒计算的 worker 任务执行延迟。
pulsar_managedLedger_client_bookkeeper_ml_workers_task_queued总结按毫秒计算的 worker 任务排队延迟。

Pulsar Functions

所有 Pulsar Functions 度量值都带有以下标签:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} 就是你在 broker.conf 中配置的集群名称。
  • namespace: namespace=${pulsar_namespace}. ${pulsar_namespace} 是命名空间名称。
Name类型Description
pulsar_function_processed_successfully_total计数器成功处理的消息总数。
pulsar_function_processed_successfully_total_1min计数器在过去 1 分钟内成功处理的消息总数。
pulsar_function_system_exceptions_total计数器系统异常总数。
pulsar_function_system_exceptions_total_1min计数器在过去 1 分钟内的系统异常总数。
pulsar_function_user_exceptions_total计数器用户异常总数。
pulsar_function_user_exceptions_total_1min计数器在过去 1 分钟内的用户异常总数。
pulsar_function_process_latency_ms总结进程延迟,以毫秒计。
pulsar_function_process_latency_ms_1min总结在过去 1 分钟内的进程延迟,以毫秒计。
pulsar_function_last_invocation计量表该函数最后一次调用的时间戳。
pulsar_function_received_total计数器从源接收的消息总数。
pulsar_function_received_total_1min计数器在过去 1 分钟内从源接收的消息总数。

Proxy

所有代理度量值都带有以下标签:

  • cluster: cluster=${pulsar_cluster}. ${pulsar_cluster} 就是你在 broker.conf 中配置的集群名称。
  • kubernetes_pod_name: kubernetes_pod_name=${kubernetes_pod_name}. ${kubernetes_pod_name} 是 kubernetes pod 名称。
Name类型Description
pulsar_proxy_active_connections计量表代理中当前活动的连接数量。
pulsar_proxy_new_connections计数器代理中正在打开的连接的计数器。
pulsar_proxy_rejected_connections计数器由于阈值而拒绝的连接计数器。
pulsar_proxy_binary_ops计数器代理操作计数器。
pulsar_proxy_binary_bytes计数器代理字节计数器。

Pulsar SQL Worker

Name类型Description
split_bytes_read计数器从 BookKeeper 读取的字节数。
split_num_messages_deserialized计数器反序列化的消息数量。
split_num_record_deserialized计数器反序列化的记录数量。
split_bytes_read_per_query总结每个查询中读取的字节总数.
split_entry_deserialize_time总结用于对条目进行反序列化的时间。
split_entry_deserialize_time_per_query总结用于对每个查询中的条目进行反序列化的时间。
split_entry_queue_dequeue_wait_time总结由于队列为空而等待从条目队列获取条目花费的时间。
split_entry_queue_dequeue_wait_time_per_query总结从每个查询的条目队列中等待获取条目的总时间。
split_message_queue_dequeue_wait_time_per_query总结每个查询中由于队列为空而等待从消息队列中移除所花的时间。
split_message_queue_enqueue_wait_time总结由于消息队列已满,等待进入消息队列的时间。
split_message_queue_enqueue_wait_time_per_query总结每个查询中由于消息队列已满,等待进入消息队列的时间。
split_num_entries_per_batch总结每个批处理的条目数。
split_num_entries_per_query总结每个查询的条目数。
split_num_messages_deserialized_per_entry总结每个条目反序列化的消息数量。
split_num_messages_deserialized_per_query总结每个查询反序列化的消息数量。
split_read_attempts总结读取尝试次数(如果队列已满会失败)。
split_read_attempts_per_query总结每个查询的读取尝试次数。
split_read_latency_per_batch总结每个批处理的读取延迟。
split_read_latency_per_query总结每个查询的总读取延迟。
split_record_deserialize_time总结将消息反序列化到记录花费的时间。 例如,Avro、JSON 等等。
split_record_deserialize_time_per_query总结每个查询将消息反序列化到记录花费的时间。
split_total_execution_time总结总执行时间。

Monitor

You can set up a Prometheus instance to collect all the metrics exposed at Pulsar components and set up Grafana dashboards to display the metrics and monitor your Pulsar cluster.

The following are some Grafana dashboards examples:

  • pulsar-grafana: A grafana dashboard that displays metrics collected in Prometheus for Pulsar clusters running on Kubernetes.
  • apache-pulsar-grafana-dashboard: A collection of grafana dashboard templates for different Pulsar components running on both Kubernetes and on-premise machines.