跳到主要内容
版本:dev

监控 RabbitMQ 消息中间件

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

监控前操作​

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

  1. 开启 Management 插件,或使用自开启版本

    rabbitmq-plugins enable rabbitmq_management 
  2. 浏览器访问 http://ip:15672/ ,默认账户密码 guest/guest. 成功登录即开启成功。

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

配置参数​

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

采集指标​

指标集合:overview​

指标名称指标单位指标帮助描述
product_version无产品版本
product_name无产品名称
rabbitmq_version无rabbitmq 版本
management_version无rabbitmq management 插件版本
erlang_version无erlang 版本
cluster_name无集群名称
rates_mode无rates模式

指标集合:object_totals​

指标名称指标单位指标帮助描述
channels无channels的总数量
connections无connections的总数量
consumers无consumers的总数量
exchanges无exchanges的总数量
queues无queues的总数量

指标集合:nodes​

指标名称指标单位指标帮助描述
name无The node name
type无The node type
running无Running state
os_pid无Pid in OS
mem_limitMBMemory usage high watermark
mem_usedMBTotal amount of memory used
fd_total无File descriptors available
fd_used无File descriptors used
sockets_total无Sockets available
sockets_used无Sockets used
proc_total无Erlang process limit
proc_used无Erlang processes used
disk_free_limitGBFree disk space low watermark
disk_freeGBFree disk space
gc_num无GC runs
gc_bytes_reclaimedMBBytes reclaimed by GC
context_switches无Context_switches num
io_read_count无总共读操作的数量
io_read_bytesKB总共读入磁盘数据大小
io_read_avg_timems读操作平均时间,毫秒为单位
io_write_count无磁盘写操作总量
io_write_bytesKB写入磁盘数据总量
io_write_avg_timems每个磁盘写操作的平均时间,毫秒为单位
io_seek_count无seek操作总量
io_seek_avg_timemsseek操作的平均时间,毫秒单位
io_sync_count无fsync操作的总量
io_sync_avg_timemsfsync操作的平均时间,毫秒为单位
connection_created无connection created num
connection_closed无connection closed num
channel_created无channel created num
channel_closed无channel closed num
queue_declared无queue declared num
queue_created无queue created num
queue_deleted无queue deleted num
connection_closed无connection closed num

指标集合:queues​

指标名称指标单位指标帮助描述
name无The name of the queue with non-ASCII characters escaped as in C.
node无The queue on the node name
state无The state of the queue. Normally "running", but may be {syncing, message_count} if the queue is synchronising.
type无Queue type, one of: quorum, stream, classic.
vhost无vhost path
auto_delete无Whether the queue will be deleted automatically when no longer used
policy无Effective policy name for the queue.
consumers无Number of consumers.
memoryBBytes of memory allocated by the runtime for the queue, including stack, heap and internal structures.
messages_ready无Number of messages ready to be delivered to clients
messages_unacknowledged无Number of messages delivered to clients but not yet acknowledged
messages无Sum of ready and unacknowledged messages (queue depth)
messages_ready_ram无Number of messages from messages_ready which are resident in ram
messages_persistent无Total 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