查询Pushgateway监控配置 本节主要介绍如何使用API查询Pushgateway监控配置。 此操作用来查询Pushgateway监控配置信息。 请求语法 plaintext GET /rest/v1/system/config/monitor?serverIdserverid1,serverid2,serveridN HTTP/1.1 HTTP/1.1 Date:date Host: ip:port Authorization:authorizationq 请求参数 参数 类型 描述 是否必须 serverId String 指定查询Pushgateway监控配置的HBlock服务器ID。一次可以指定多个HBlock服务器的ID,以英文逗号(,)分开。如果不填写,默认查询所有HBlock服务器的Pushgateway监控配置。 否 响应结果 名称 类型 描述 monitors Array of monitor 监控信息,详见“表1 响应参数monitor说明”。 表1 响应参数monitor说明 名称 类型 描述 serverId String 服务器ID。 send.pushgatewayTimeout Long 向所有Pushgateway推送数据的超时时长,超时即认为推送失败。 send.pushgateways Array of pushgateway Pushgateway信息,详见“表2 响应参数Pushgateway说明”。 collect.interval Long 硬件指标采集的采集间隔。 collect.metrics Array of metric 硬件采集指标信息,详见“表3 响应参数metric说明”。 表2 响应参数Pushgateway说明 名称 类型 描述 address String Pushgateway的IP或域名。 port Integer Pushgateway的端口号。 labels.agent String Pushgateway的客户端。 labels.idc Integer 数据所属的数据中心。 labels.hostname String 主机名称。 labels.serverIp String 服务器IP。 labels.clusterId String 集群ID。 labels.clusterName String 集群名称。 labels.job String Pushgateway推送数据的来源。 表3 响应参数metric说明 名称 类型 描述 name String 采集间隔或采集对象的硬件指标类别名称。 interval Long 硬件指标类别单独设置的采集间隔。 items String 硬件指标类别单独设置的采集对象。