标签:
info.py
#!/usr/bin/env python
import requests
import json
import sys
d = [
{
"endpoint": sys.argv[1],
"counter": sys.argv[2],
},
]
url = "http://127.0.0.1:9966/graph/info"
r = requests.post(url, data=json.dumps(d))
print r.text
执行:
python info.py master feng-count
[{"endpoint":"master","counter":"feng-count","consolFun":"GAUGE","step":60,"filename":"/data/6070/c0/c0c426be18bf40971d0f2b6cc4331818_GAUGE_60.rrd","addr":"172.16.230.169:6070"}]
标签:
原文地址:http://www.cnblogs.com/fengjian2016/p/5606634.html