此操作用来修改向智维平台推送告警的配置。
请求语法
PUT /rest/v1/system/config/ctyuncms HTTP/1.1
Date: date
Content-Type: application/json; charset=utf-8
Content-Length: length
Host: ip:port
Authorization: authorization
{
"url":url,
"labels": {
"key1": "value1",
"key2": "value2",
"key3": "value3",
...
},
"all": changeAll,
}
请求参数
参数 描述 是否必须 url 智维平台第三方告警的推送地址。
类型:字符串
是 labels 指定推送至智维平台的告警数据中携带的标签信息。
类型:字符串
取值:"key":"value"格式。
是 all 修改配置时,以覆盖方式更新,还是以添加方式更新。
类型:布尔
取值:
true:配置以覆盖方式更新。
false:配置以添加方式更新。
默认值为false。
否
请求示例
PUT /rest/v1/system/config/ctyuncms HTTP/1.1
Date: Mon, 27 May 2024 01:13:58 GMT
Content-Type: application/json; charset=utf-8
Authorization: HBlock userName:signature
Content-Length: 177
Host: 192.168.0.110:1443
{
"url": "https://ctyuncms:9527/blackhole/api/v1/issue",
"labels": {
"mid": "65de96adf2faca1f3a75b33a",
"idc": "xinjiang"
},
"all": true
}
响应示例
HTTP/1.1 204 No Content
x-hblock-request-id: 0bbdce9b065545b891a4433664a9c81e
Connection: keep-alive
Date: Mon, 27 May 2024 01:13:58 GMT
Server: HBlock