删除Pushgateway监控配置 本节主要介绍如何使用API删除Pushgateway监控配置。 此操作用来删除Pushgateway监控配置。 注意 如果删除了“指标必须具备的label”,可能会造成相关监控数据无法识别的风险。 请求语法 plaintext DELETE /rest/v1/system/config/monitor?serverIdserverid1,serverid2,serveridN HTTP/1.1 Date: date ContentType: application/json; charsetutf8 ContentLength: length Host: ip:port Authorization: authorization { "pushgateway":address:port, "pushgatewayLabels": [ "key1", "key2", "key3", ... ] "collectMetric": name, "collectMetricItems": [ "item1", "item2", "item3", ... ], } 请求参数 参数 类型 描述 是否必须 serverId String 指定要删除Pushgateway监控配置的HBlock服务器ID。一次可以指定多个HBlock服务器的ID,以英文逗号(,)分开。如果不填写,默认为所有HBlock服务器删除指定的Pushgateway监控配置。 否 pushgateway String 指定Pushgateway的地址和接口。 取值:格式为IPv4 :port 、[IPv6 ]:port 或者domainname :port。 是 pushgatewayLabels Array of pushgatewayLabel 指定Pushgateway对应的标签值。 取值:label项。 否 collectMetric String 指定采集的监控指标。 取值为:server、fileSystem、interface、load、disk、tcp、os。 默认删除的上述所有监控指标。 否 collectMetricItems Array of collectMetricItem 指定监控指标下的配置项。 否 请求示例1 为服务器hblock1、hblock2删除相关的Pushgateway监控配置:标签为agent、idc,监控指标为disk,监控指标配置项为pstore、devpts。 plaintext DELETE /rest/v1/system/config/monitor?serverIdhblock1,hblock2 HTTP/1.1 Date: Fri, Fri, 24 May 2024 07:01:39 GMT ContentType: application/json; charsetutf8 Authorization: HBlock userName:signature ContentLength: 216 Host: 192.168.0.110:1443 { "pushgateway": "192.168.0.1:9091", "pushgatewayLabels": [ "agent", "idc" ], "collectMetric": "disk", "collectMetricItems": [ "pstore", "devpts" ] }