Skip to main content

监控 RabbitMQ 消息中间件

对 RabbitMQ 消息中间件的运行状态,节点,队列等相关指标进行监测。

监控前操作

HertzBeat 使用 RabbitMQ Management 的 Rest Api 对 RabbitMQ 进行指标数据采集。
故需要您的 RabbitMQ 环境开启 Management 插件

  1. 开启 Management 插件,或使用自开启版本
rabbitmq-plugins enable rabbitmq_management 
  1. 浏览器访问 http://ip:15672/ ,默认账户密码 guest/guest. 成功登录即开启成功。

  2. 在 HertzBeat 添加对应 RabbitMQ 监控即可,参数使用 Management 的 IP 端口,默认账户密码。

配置参数

参数名称参数帮助描述
监控Host被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。
任务名称标识此监控的名称,名称需要保证唯一性。
端口RabbitMQ Management 对外提供的HTTP端口,默认为15672。
用户名接口Basic认证时使用的用户名
密码接口Basic认证时使用的密码
超时时间HTTP请求查询超时时间
采集间隔监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒
是否探测新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作
描述备注更多标识和描述此监控的备注信息,用户可以在这里备注信息

采集指标

指标集合:overview

指标名称指标单位指标帮助描述
product_version产品版本
product_name产品名称
rabbitmq_versionrabbitmq 版本
management_versionrabbitmq management 插件版本
erlang_versionerlang 版本
cluster_name集群名称
rates_moderates模式

指标集合:object_totals

指标名称指标单位指标帮助描述
channelschannels的总数量
connectionsconnections的总数量
consumersconsumers的总数量
exchangesexchanges的总数量
queuesqueues的总数量

指标集合:nodes

指标名称指标单位指标帮助描述
nameThe node name
typeThe node type
runningRunning state
os_pidPid in OS
mem_limitMBMemory usage high watermark
mem_usedMBTotal amount of memory used
fd_totalFile descriptors available
fd_usedFile descriptors used
sockets_totalSockets available
sockets_usedSockets used
proc_totalErlang process limit
proc_usedErlang processes used
disk_free_limitGBFree disk space low watermark
disk_freeGBFree disk space
gc_numGC runs
gc_bytes_reclaimedMBBytes reclaimed by GC
context_switchesContext_switches num
io_read_count总共读操作的数量
io_read_bytesKB总共读入磁盘数据大小
io_read_avg_timems读操作平均时间,毫秒为单位
io_write_count磁盘写操作总量
io_write_bytesKB写入磁盘数据总量
io_write_avg_timems每个磁盘写操作的平均时间,毫秒为单位
io_seek_countseek操作总量
io_seek_avg_timemsseek操作的平均时间,毫秒单位
io_sync_countfsync操作的总量
io_sync_avg_timemsfsync操作的平均时间,毫秒为单位
connection_createdconnection created num
connection_closedconnection closed num
channel_createdchannel created num
channel_closedchannel closed num
queue_declaredqueue declared num
queue_createdqueue created num
queue_deletedqueue deleted num
connection_closedconnection closed num

指标集合:queues

指标名称指标单位指标帮助描述
nameThe name of the queue with non-ASCII characters escaped as in C.
nodeThe queue on the node name
stateThe state of the queue. Normally "running", but may be "{syncing, message_count}" if the queue is synchronising.
typeQueue type, one of: quorum, stream, classic.
vhostvhost path
auto_deleteWhether the queue will be deleted automatically when no longer used
policyEffective policy name for the queue.
consumersNumber of consumers.
memoryBBytes of memory allocated by the runtime for the queue, including stack, heap and internal structures.
messages_readyNumber of messages ready to be delivered to clients
messages_unacknowledgedNumber of messages delivered to clients but not yet acknowledged
messagesSum of ready and unacknowledged messages (queue depth)
messages_ready_ramNumber of messages from messages_ready which are resident in ram
messages_persistentTotal number of persistent messages in the queue (will always be 0 for transient queues)
message_bytesBSum of the size of all message bodies in the queue. This does not include the message properties (including headers) or any overhead
message_bytes_readyBLike message_bytes but counting only those messages ready to be delivered to clients
message_bytes_unacknowledgedBLike message_bytes but counting only those messages delivered to clients but not yet acknowledged
message_bytes_ramBLike message_bytes but counting only those messages which are currently held in RAM
message_bytes_persistentBLike message_bytes but counting only those messages which are persistent