跳转至

采集器「阿里云-RocketMQ 5.0」配置手册

阅读本文前,请先阅读:

使用本采集器前,必须安装「观测云集成 Core 核心包」及其配套的第三方依赖包

1. 配置结构

本采集器配置结构如下:

字段 类型 是否必须 说明
regions list 必须 所需采集的地域列表
regions[#] str 必须 地域 ID。如:'cn-hangzhou'
总表见附录

2. 配置示例

指定地域

采集杭州、上海地域的数据

Python
1
2
3
collector_configs = {
    'regions': [ 'cn-hangzhou', 'cn-shanghai' ]
}

3. 数据上报格式

数据正常同步后,可以在观测云的「基础设施 / 自定义(对象)」中查看数据。

上报的数据示例如下:

JSON
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  "measurement": "aliyun_rocketmq",
  "tags": {
    "bid"               : "26842",
    "commodityCode"     : "ons_rmqpost_public_cn",
    "instanceId"        : "rmq-cn-uax3ck6nn0m",
    "instanceName"      : "rmq-cn-uax3ck6nn0m",
    "name"              : "rmq-cn-uax3ck6nn0m",
    "paymentType"       : "PayAsYouGo",
    "regionId"          : "cn-hangzhou",
    "resourceGroupId"   : "rg-acfmv3ro3xnfwaa",
    "seriesCode"        : "standard",
    "serviceCode"       : "rmq",
    "status"            : "RUNNING",
    "subSeriesCode"     : "single_node",
    "userId"            : "1067807587588864"
  },
  "fields": {
    "accountInfo"       : "{json 信息}",
    "createTime"        : "2023-08-14 16:47:50",
    "expireTime"        : "2123-08-15 00:00:00",
    "groupCount"        : 0,
    "instanceQuotas"    : "{json 信息}",
    "networkInfo"       : "{json 信息}",
    "productInfo"       : "{json 信息}",
    "releaseTime"       : "2123-08-22 00:00:00",
    "startTime"         : "2023-08-14 16:47:49",
    "topicCount"        : 0,
    "updateTime"        : "2023-08-14 16:50:34",
    "message"           : "{实例 JSON 信息}",
  }
}

tags、fields 中的字段可能会随后续更新有所变动

tags.name 值为实例 ID,作为唯一标识

fields.message 、 fields.accountInfo 、 fields.instanceQuotas 、 fields.networkInfo 、 fields.productInfo 均为 JSON 序列化后字符串

X. 附录

请参考阿里云官方文档: