open-flacon api历史数据
2021-03-20 23:24
标签:int time() print port min request idle text api open-flacon api历史数据 标签:int time() print port min request idle text api 原文地址:https://www.cnblogs.com/oracle614/p/11844564.html#!-*- coding:utf8 -*-
import requests
import time
import json
end = int(time.time())
start = end - 3600 #查询过去一小时的数据
d = {
"start": start,
"end": end,
"cf": "AVERAGE",
"endpoint_counters": [
{
"endpoint": "host1",
"counter": "cpu.idle",
},
{
"endpoint": "host1",
"counter": "load.1min",
},
],
}
url = "http://127.0.0.1:9966/graph/history"
r = requests.post(url, data=json.dumps(d))
print r.text
下一篇:我用过的gitlab api
文章标题:open-flacon api历史数据
文章链接:http://soscw.com/index.php/essay/66908.html