采集器「华为云-云专线 DC-物理连接」配置手册
阅读本文前,请先阅读:
使用本采集器前,必须安装「观测云集成 Core 核心包」及其配套的第三方依赖包
1. 配置结构
本采集器配置结构如下:
字段 |
类型 |
是否必须 |
说明 |
region_projects |
dict |
必须 |
所需采集数据的「地域 - 项目 ID」列表 |
region_projects[#] |
str:list |
必须 |
键值对中: Key 代表地域(如:'cn-north-4' ) Value 代表该地域下所需采集的项目 ID 列表 总表见附录 |
2. 配置示例
指定地域
采集cn-north-4
地域下对应项目的资源
Python |
---|
| collector_configs = {
'region_projects':{
'cn-north-4': ['c631f046252d4exxxxxxxxxxx', '15c6ce1c12da40xxxxxxxx9']
}
}
|
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 | {
"measurement": "huaweicloud_dcaas_direct_connect",
"tags": {
"RegionId" : "ap-southeast-3",
"project_id" : "xxxxxxx",
"enterpriseProjectId": "0",
"tenant_id" : "x8a03190xxxx",
"name" : "xxxxx",
"direct_connect_id" : "xxxxx",
"direct_connect_name": "dc-to-xxx",
"status" : "ACTIVE"
},
"fields": {
"apply_time" : "2024-01-19T07:21:56.000Z",
"bandwidth" : 1000,
"charge_mode" : "prepayment",
"create_time" : "2023-012-16T05:21:50.000Z",
"description" : "dev",
"device_id" : "11.22.2.36",
"location" : "Singapore2-GlobalSwitch",
"port_type" : "1G",
"provider" : "others",
"provider_status" : "ACTIVE",
"tags" : "[]",
"type" : "standard"
"message" : "{实例 JSON 数据}"
}
}
|
tags、fields 中的字段可能会随后续更新有所变动
X. 附录
华为云云专线 DC「地域 ID」
请参考华为云官方文档: