rabbitmq的监控

这篇博客介绍了如何使用curl和RabbitMQ的HTTP API进行监控,包括获取Overview和Queue信息。作者提到虽然curl获取的数据格式不理想,但通过编写Python脚本可以实现树状视图,便于理解和在Nagios、Collectd中集成监控。
摘要由CSDN通过智能技术生成

rabbiqmq搭建完成后,可通过web来对rabbitmq的某些指标进行监控,不过在此不予讨论。
在rabbirmq的web监控页面提供了http api监控文档。网址就是http://IP:15672/api/ 将ip换成自身主机的ip地址。
通过curl对rabbitmq进行监控,如下:

[root@crq720 ~]# curl -i -u guest:guest 'http://localhost:15672/api/overview'
HTTP/1.1 200 OK
Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)
Date: Tue, 19 Jul 2016 00:59:30 GMT
Content-Type: application/json
Content-Length: 1300
Cache-Control: no-cache

{
  "management_version":"3.2.3","statistics_level":"fine","exchange_types":[{
  "name":"fanout","description":"AMQP fanout exchange, as per the AMQP specification","enabled":true},{
  "name":"direct","description":"AMQP direct exchange, as per the AMQP specification","enabled":true},{
  "name":"headers","description":"AMQP headers exchange, as per the AMQP specification","enabled":true},{
  "name":"topic","description":"AMQP topic exchange, as per the AMQP specification","enabled":true}],"rabbitmq_version":"3.2.3","erlang_version":"R14B04","erlang_full_version":"Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:30] [kernel-poll:true]","message_stats":{},"queue_totals":{
  "messages":0,"messages_details":{
  "rate":0.0},"messages_ready":0,"messages_ready_details":{
  "rate":0.0},"messages_unacknowledged":0,"messages_unacknowledged_details":{
  "rate":0.0}},"object_totals":{
  "consumers":0,"queues":1,"exchanges
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值