URI | /v2/threshold/getThreshold.json |
Method | POST |
参数说明 | $array = array( ‘task_id’ => ‘’, 任务id ‘task_sort’=>‘’, 任务类型(0:网站 1:服务器 2:服务 7:全景) ); $post_data = array('data'=>json_encode($array)); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); |
结果(json) | th_id: "" 记录id metric: "" 告警指标 cond: "" 告警条件 value: 告警阀值 unit: "" 单位 retry: "" 重试次数 status: "" 状态 dev: "" 磁盘I/O 或 网络流量 或 指定的监测点 |
一个例子:
curl -H "application/x-www-form-urlencoded" --data 'data={"task_id":"705429","task_sort":"0"}' "https://api.jiankongbao.com/v2/threshold/getThreshold.json?access_token=86154772570397e891f2639736f3b657c1ff40d5"
说明:access_token通过获取访问token得到。返回结果:
[
{
"th_id": "114973",
"metric": "当前响应时间",
"cond": "大于",
"value": 2000,
"unit": "ms",
"monitor_set": "平均",
"monitor_count": "0",
"retry": "1",
"status": "已开启"
}
]