RabbitMq(十七)rabbitmq的四种集群监控

rabbitmq的四种集群监控方式:

  1. rabbitmq控制台页面监控
  2. tracing日志监控
  3. 使用api接口自定义实现监控
  4. 使用Zabbix监控rabbitmq

第一种、使用控制台页面监控rabbitmq

网址:http://mq服务ip:15672 登录,可以根据不同菜单中对各项信息进行查看。

第二种、通过tracing日志查看消息的发送流程

参阅文章:消息的追踪查看配置及查看方法 ,通过log文件信息查看消息的发送、接收时间。

第三种、通过restful api接口自定义监控实现

登录控制台地址后,访问地址 http://172.18.255.118:15672/api/index.html ,ip为服务器地址,可以看到api文档相关介绍。通过api接口我们可以实现自己的监控内容以及界面。

eg:登录后请求地址 http://172.18.255.118:15672/api/connections 返回信息如下:

[{"auth_mechanism":"PLAIN","channel_max":2047,"channels":0,"client_properties":{"capabilities":{"authentication_failure_close":true,"basic.nack":true,"connection.blocked":true,"consumer_cancel_notify":true,"exchange_exchange_bindings":true,"publisher_confirms":true},"copyright":"Copyright (c) 2007-2019 Pivotal Software, Inc.","information":"Licensed under the MPL. See http://www.rabbitmq.com/","platform":"Java","product":"RabbitMQ","version":"5.6.0"},"connected_at":1595647363915,"frame_max":131072,"garbage_collection":{"fullsweep_after":65535,"max_heap_size":0,"min_bin_vheap_size":46422,"min_heap_size":233,"minor_gcs":4},"host":"172.18.255.118","name":"172.18.255.162:52348 -> 172.18.255.118:5672","node":"rabbit-1@localhost","peer_cert_issuer":null,"peer_cert_subject":null,"peer_cert_validity":null,"peer_host":"172.18.255.162","peer_port":52348,"port":5672,"protocol":"AMQP 0-9-1","recv_cnt":3,"recv_oct":620,"recv_oct_details":{"rate":36.0},"reductions":8905,"reductions_details":{"rate":628.2},"send_cnt":3,"send_oct":651,"send_oct_details":{"rate":23.8},"send_pend":0,"ssl":false,"ssl_cipher":null,"ssl_hash":null,"ssl_key_exchange":null,"ssl_protocol":null,"state":"running","timeout":60,"type":"network","user":"xiaohui","user_who_performed_action":"xiaohui","vhost":"/myhost"},{"client_properties":{},"connected_at":1595645109548,"name":"<rabbit-1@localhost.3.2086.0>","node":"rabbit-1@localhost","protocol":"Direct 0-9-1","type":"direct","user":"guest","user_who_performed_action":"guest","vhost":"/myhost"},{"client_properties":{},"connected_at":1595645512615,"name":"<rabbit-1@localhost.3.2480.0>","node":"rabbit-1@localhost","protocol":"Direct 0-9-1","type":"direct","user":"xiaohui","user_who_performed_action":"xiaohui","vhost":"/myhost"}]

第四种、通过Zabbix监控rabbitmq(内容过多,这里不做介绍)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值