URI | /v2/threshold/getThreshold.json | |||
Method | POST | |||
参数示例: data= {"task_id":684351,"task_sort":0} | ||||
参数项 | 必填 | 描述 | 默认值 | |
access_token | 必填 | |||
task_id | 必填 | 任务ID | ||
task_sort | 必填 | 任务类型[0-网站,1-服务器, 2-服务] | ||
成功结果: [ { "th_id": "118186", "metric": "当前响应时间", "cond": "大于", "value": 23, "unit": "ms", "monitor_set": "任意几个监测点", "monitor_count": "2", "retry": "1", "status": "已开启", "advanced_status": "开启", "monitor_trigger_type": "相同监测点"
}, ........... ] | ||||
返回项 | 类型 | 描述 | ||
th_id | String | 记录ID | ||
metric | Enum | 告警指标 | ||
cond | Enum | 比较条件 | ||
value | String | 告警阈值 | ||
unit | Enum | 单位 [1-ms,2-s,3-%,4-无单位] | ||
retry | String | 连续触发几次即告警 | ||
status | Enum | 状态 [已开启,未开启] | ||
monitor_set | Enum | 监测点选项[任意、指定、平均] | ||
monitor_count | Enum | monitor_set为任意时,监测点个数 | ||
dev | array | 监测点ID数组,monitor_set为指定时,指定的监测点ID,如[1,2] | ||
advanced_status | Enum | 高级告警策略[开启,关闭] | ||
monitor_trigger_type | Enum | 监测点连续要求[相同监测点,不同监测点] | ||
失败结果: { "code": 400, "msg": "错误的任务类型" } | ||||
返回项 | 类型 | 描述 | ||
400 | String | 错误说明 |
调用示例:
curl -H "application/x-www-form-urlencoded" "https://api.jiankongbao.com/v2/threshold/getThreshold.json?access_token=cafdbf13ced4510a" --data 'data= {"task_id":684351,"task_sort":0}'