刚开始与Prometheus监控系统约会。
Maked API
请求获取名称指标node_filesystem_avail
请求返回有关所有目标实例的信息:
{ “状态”: “成功”, “数据”:{ “与resultType”: “基体”, “结果”:[{ “公制”:{ “的名称”: “node_filesystem_avail” , “设备”: “的/ dev /映射器/ INTVG-homevol”, “文件系统类型”: “EXT4”, “实例”: “SERVER01:9100”, “工作”: “node_exporter_metrics”, “挂载点”: “/家” }, “值”:[[1513255295, “41150836736”],[1513255355, “41150836736”],[1513255415, “41150836736”],[1513255475, “41150836736”],[1513255535, “41150836736”],[1513255595, “41150836736”],[1513255655, “41150836736”],[1513255715, “41150836736”],[1513255775, “41150836736”],[1513255835, “41150836736”],[1513255895, “41150836736”],[1513255955,“41150836736 “],[1513256015,” 41150836736 “],[1513256075,” 41150836736 “],[1513256135,” 41150836736 “],[1513256195,” 41150836736 “],[1513256255,” 41150836736 “],[1513256315,” 41150836736" ] ,[1513256375, “41150836736”],[1513256435, “41150828544”],[1513256495, “41150824448”],[1513256555, “41150824448”],[1513256615, “41150824448”],[1513256675, “41150824448”],[ 1513256735, “41150824448”],[1513256795, “41150824448”],[1513256855, “41150824448”],[151325 6915, “41150824448”],[1513256975, “41150824448”],[1513257035, “41150824448”],[1513257095, “41150824448”],[1513257155, “41150824448”],[1513257215, “41150824448”],[1513257275, “41150824448”],[1513257335, “41150824448”],[1513257395, “41150824448”],[1513257455, “41150824448”],[1513257515, “41150824448”],[1513257575, “41150824448”],[1513257635,“41150824448 “],[1513257695,” 41150824448 “],[1513257755,” 41150824448 “],[1513257815,” 41150824448 “],[1513257875,” 41150824448 “],[1513257935,” 41150824448 “],[1513257995,” 41150824448" ] ,[1513258055, “41150820352”],[1513258115, “41150820352”],[1513258175, “41150820352”],[1513258235, “41150820352”],[1513258295, “41150820352”],[1513258355, “41150820352”],[ 1513258415, “41150808064”],[1513258475, “41150808064”],[1513258535, “41150808064”],[1513258595, “41150808064”],[1513258655, “41150808064”],[1513258715, “41150808064”]]},{ “指标”:{ “的名称”: “node_filesystem_avail”, “设备”: “的/ dev /映射器/ INTVG-homevol”, “文件系统类型”: “EXT4”, “实例”:“Server02上: 9100" , “工作”: “普罗米修斯”,“mountpoin吨 “:”/家 “},” 值 “:[[1513255115,” 20755623936 “],[1513255175,” 20755623936 “],[1513255235,” 20755623936 “],[1513255295,” 20755623936 “],[1513255355” 20755623936 “],[1513255415,” 20755623936 “],[1513255475,” 20755623936 “],[1513255535,” 20755623936 “],[1513255595,” 20755623936 “],[1513255655,” 20755623936 “],[1513255715,” 20755623936" ],[1513255775, “20755623936”],[1513255835, “20755623936”],[1513255895, “20755623936”],[1513255955, “20755623936”],[1513256015, “20755623936”],[1513256075, “20755623936”], [1513256135, “20755623936”],[1513256195, “20755623936”],[1513256255, “20755623936”],[1513256315, “20755623936”],[1513256375, “20755623936”],[1513256435, “20755623936”],[1513256495 “20755623936”],[1513256555, “20755623936”],[1513256615, “20755623936”],[1513256675, “20755623936”],[1513256735, “20755623936”],[1513256795, “20755623936”],[1513256855” 20755623936 “],[1513256915,” 20755623936 “],[1513256975,” 20755623936 “],[1513257035,” 20755623936 “],[1513257095,” 20755623936 “],[1513257155,” 20755623936 “],[1513257215,” 20755623936" ],[15132 57275, “20755623936”],[1513257335, “20755623936”],[1513257395, “20755623936”],[1513257455, “20755623936”],[1513257515, “20755623936”],[1513257575, “20755623936”],[1513257635, “20755623936”],[1513257695, “20755623936”],[1513257755, “20755623936”],[1513257815, “20755623936”],[1513257875, “20755623936”],[1513257935, “20755623936”],[1513257995,“20755623936 “],[1513258055,” 20755623936 “],[1513258115,” 20755623936 “],[1513258175,” 20755623936 “],[1513258235,” 20755623936 “],[1513258295,” 20755623936 “],[1513258355,” 20755623936" ] ,[1513258415, “20755623936”],[1513258475, “20755623936”],[1513258535, “20755623936”],[1513258595, “20755623936”],[1513258655, “20755623936”],[1513258715, “20755623936”]]} }}
很好,但是如何让价值指标只有一个实例?
答案 0 :(得分:0)
使用query_range
:
http://server01:9090/api/v1/query_range?query=up{instance="server01:9100"}&start=2017-12-15T11:10:30.781Z&end=2017-12-15T11:17:00.781Z&step=15s