Loading
close

其它服务

time 更新时间:2024-08-20 19:36:26

其它服务页面,目前提供RabbitMQ服务监控数据。

RabbitMQ

功能介绍

RabbitMQ页面接口调用说明。

URI

GET /apis/monitoring/v1/ecms/rabbitmq

可选Metrics

名称 说明 单位
rabbitmq_cluster_status RabbitMQ 集群整体状态
RabbitMQ Cluster
rabbitmq_cluster_queues 队列数 Queues
rabbitmq_cluster_connections 连接数 Connections
rabbitmq_cluster_channels 通道数 Channels
rabbitmq_cluster_exchanges 消息交换机 Exchanges
rabbitmq_cluster_consumers 消费者数 Consumers
rabbitmq_node_status RabbitMQ 节点状态
RabbitMQ Node Status
rabbitmq_top10_queues_ack 消息数前10名队列
Top 10 Queues (Sorted by Messages)
rabbitmq_top10_queues_unack 未应答消息数前10名队列
Top 10 Queues (Sorted by unack Messages)
rabbitmq_messages_ready 已就绪消息数 Ready Messages
rabbitmq_messages_published 已发布消息 Published Messages
rabbitmq_messages_delivered 已交付消息 Delivered Messages
rabbitmq_messages_ack 已确认消息 Ack Messages
rabbitmq_messages_unack 未确认消息 Unack Messages
rabbitmq_nodes_disk_free_bytes 节点磁盘 - Free
Nodes Disk - Free
Byte
rabbitmq_nodes_disk_limit_bytes 节点磁盘 - Limit
Nodes Disk - Limit
Byte
rabbitmq_nodes_mem_used_bytes 节点内存 - Used
Nodes Memory - Used
Byte
rabbitmq_nodes_mem_limit_bytes 节点内存 - Limit
Nodes Memory - Limit
Byte
rabbitmq_file_descriptors_total 文件描述符总数
File Descriptors Total
rabbitmq_file_descriptors_used 文件描述符已使用数
File Descriptors Used
rabbitmq_sockets_total Socket连接总数
Sockets Total
rabbitmq_sockets_used Socket连接已使用数
Sockets Used

示例

示例一:查询RabbitMQ集群整体状态

请求示例:

cURI -H 'X-Auth-Token: gAAAAABf_Qb8yyZ2zM-uhK7q5c8D6ikGc7A5o4FenPkzYlpCI2PhJXtnDOyl9EeCQ-Gj9lg0SV37PIZda3nlUCTrBawfsbnSM1pw-9QJWoEo3NDxSvM5fyhQIadjI17H0jV40NHx9tc3EkIxrAScXhxZsldOt9uVjRO6cq9pFTKs6qhxyu1GBHk' 'http://emla.openstack.svc.cluster.local/apis/monitoring/v1/ecms/rabbitmq?metrics_filter=rabbitmq_cluster_status'

响应示例:

{
 "results": [
  {
   "metric_name": "rabbitmq_cluster_status",
   "data": {
    "resultType": "vector",
    "result": [
     {
      "value": [
       1609315972.046,
       "1"
      ]
     }
    ]
   }
  }
 ]
}

RabbitMQ 集群整体状态 rabbitmq_cluster_status 有以下四种状态:

  • 健康(Healthy)
  • 警告(Warning)
  • 故障(Error)
  • 无数据(No data)

状态–Value:

Metric 名称 说明 Healthy Warning Error No data
rabbitmq_cluster_status RabbitMQ 集群整体状态 [1, 1) [0.1, 0.9) [0, 0) [nu, null)

“1”在[1, 1)范围内,所以此时RabbitMQ 集群整体状态为健康。

示例二:查询消息数前10队列

请求示例:

cURI -H 'X-Auth-Token: gAAAAABf_Qb8yyZ2zM-uhK7q5c8D6ikGc7A5o4FenPkzYlpCI2PhJXtnDOyl9EeCQ-Gj9lg0SV37PIZda3nlUCTrBawfsbnSM1pw-9QJWoEo3NDxSvM5fyhQIadjI17H0jV40NHx9tc3EkIxrAScXhxZsldOt9uVjRO6cq9pFTKs6qhxyu1GBHk' 'http://emla.openstack.svc.cluster.local/apis/monitoring/v1/ecms/rabbitmq?metrics_filter=rabbitmq_top10_queues_ack'

响应示例:

{
 "results": [
  {
   "metric_name": "rabbitmq_top10_queues_ack",
   "data": {
    "resultType": "vector",
    "result": [
     {
      "metric": {
       "__name__": "top10_rabbitmq_queue_messages",
       "queue": "mistral_engine",
      },
      "value": [
       1609318241.539,
       "1"
      ]
     },
     {
      "metric": {
       "__name__": "top10_rabbitmq_queue_messages",
       "queue": "notifications.info",
      },
      "value": [
       1609318241.539,
       "100"
      ]
     },
     ...
     {
      "metric": {
       "__name__": "top10_rabbitmq_queue_messages",
       "queue": "notifications.sample",
      },
      "value": [
       1609318241.539,
       "168"
      ]
     }
    ]
   }
  }
 ]
}

metric中“queue”的值为队列名称
消息数前10队列:

队列 消息数
1 mistral_engine 1
2 notifications.info 100
10 notifications.sample 168
此篇文章对你是否有帮助?
没帮助
locked-file

您暂无权限访问该产品