#!-*- 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
相关文章
- 09-03amr的三方API
- 09-03API - 使用数据仓库 - 基础篇
- 09-03TensorFlow——tf.contrib.layers库中的相关API
- 09-03#高德地图api移动端定位失败解决方案 #H5 原生Geollocation接口Chomre浏览器的坑
- 09-03c – 用于获取netstat -s统计信息的Windows API
- 09-03API+WinForm怎样来实现分页功能
- 09-03适合于构建视频会议应用的WEB API介绍
- 09-03python调用openstack的api,create_instance的程序解析
- 09-03【Smod2.API】Map
- 09-03w10的 Google Tensorflow Object Detection API安装