./stor config ls { -i | --item } monitor [ { -n | --server } SERVER_ID &<1-n> ]
此命令用来查询pushgateway监控配置信息。
参数
参数 描述 -n SERVER_ID 或 --server SERVER_ID 指定要查询pushgateway监控配置的HBlock服务器ID。一次可以查询多个HBlock服务器的pushgateway监控配置,以英文逗号(,)分开。
默认查询所有HBlock服务器的pushgateway监控配置。
示例
查询所有服务器的pushgateway监控配置。
[root@hblockserver CTYUN_HBlock_Plus_3.7.0_x64]# ./stor config ls -i monitor
{
"monitors" : [ {
"serverId" : "hblock_1",
"send" : {
"interval" : 20000,
"timeout" : 2000,
"pushgatewayTimeout" : 10000,
"pushgateways" : [ {
"address" : "192.168.0.1",
"port" : 9091,
"labels" : {
"agent" : "agentname",
"idc" : "idcname",
"hostname" : "hblockserver",
"serverIp" : "192.168.0.110",
"clusterId" : "B8BFE310-8DF6-429E-8C8A-ACD22310AC08",
"clusterName" : "stor2",
"job" : "hblock"
}
} ]
},
"collect" : {
"interval" : 14000,
"metrics" : [ {
"name" : "storFs",
"interval" : 20000,
"items" : [ "ds-1", "ds-2", "mdm" ]
} ]
}
}, {
"serverId" : "hblock_3",
"send" : {
"interval" : 20000,
"timeout" : 2000,
"pushgatewayTimeout" : 10000,
"pushgateways" : [ ]
},
"collect" : {
"interval" : 14000,
"metrics" : [ {
"name" : "storFs",
"interval" : 20000,
"items" : [ "ds-1" ]
} ]
}
}, {
"serverId" : "hblock_2",
"send" : {
"interval" : 20000,
"timeout" : 2000,
"pushgatewayTimeout" : 10000,
"pushgateways" : [ {
"address" : "192.168.0.1",
"port" : 9091,
"labels" : {
"agent" : "agentname",
"idc" : "idcname",
"hostname" : "pm-006",
"serverIp" : "192.168.0.192",
"clusterId" : "B8BFE310-8DF6-429E-8C8A-ACD22310AC08",
"clusterName" : "stor2",
"job" : "hblock"
}
} ]
},
"collect" : {
"interval" : 14000,
"metrics" : [ {
"name" : "storFs",
"interval" : 20000,
"items" : [ "ds-1", "mdm" ]
} ]
}
} ]
}
查询服务器hblock_1、hblock_2的pushgateway监控配置。
[root@hblockserver CTYUN_HBlock_Plus_3.7.0_x64]# ./stor config ls -i monitor -n hblock_1,hblock_2
{
"monitors" : [ {
"serverId" : "hblock_1",
"send" : {
"interval" : 20000,
"timeout" : 2000,
"pushgatewayTimeout" : 10000,
"pushgateways" : [ {
"address" : "192.168.0.1",
"port" : 9091,
"labels" : {
"agent" : "agentname",
"idc" : "idcname",
"hostname" : "hblockserver",
"serverIp" : "192.168.0.110",
"clusterId" : "B8BFE310-8DF6-429E-8C8A-ACD22310AC08",
"clusterName" : "stor2",
"job" : "hblock"
}
} ]
},
"collect" : {
"interval" : 14000,
"metrics" : [ {
"name" : "storFs",
"interval" : 20000,
"items" : [ "ds-1", "ds-2", "mdm" ]
} ]
}
}, {
"serverId" : "hblock_2",
"send" : {
"interval" : 20000,
"timeout" : 2000,
"pushgatewayTimeout" : 10000,
"pushgateways" : [ {
"address" : "192.168.0.1",
"port" : 9091,
"labels" : {
"agent" : "agentname",
"idc" : "idcname",
"hostname" : "pm-006",
"serverIp" : "192.168.0.192",
"clusterId" : "B8BFE310-8DF6-429E-8C8A-ACD22310AC08",
"clusterName" : "stor2",
"job" : "hblock"
}
} ]
},
"collect" : {
"interval" : 14000,
"metrics" : [ {
"name" : "storFs",
"interval" : 20000,
"items" : [ "ds-1", "mdm" ]
} ]
}
} ]
}
pushgateway监控配置查询信息描述 项目 描述 serverId 服务器ID。 send.pushgatewayTimeout 向所有pushgateway推送数据的超时时长,超时即认为推送失败。 send.pushgateways.adress pushgateway的IP或域名。 send.pushgateways.labels pushgateway对应的标签。 collect.interval 硬件指标采集的采集间隔。 collect.metrics.name 采集间隔或采集对象的硬件指标类别名称。 collect.metrics.interval 硬件指标类别单独设置的采集间隔。 collect.metrics.items 硬件指标类别单独设置的采集对象。