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