云调度CloudGTM
查询调度告警日志
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
language | String | 否 | 语言类型 默认 中文, 中文 'zh_CN'英文 'en' |
domainId | Integer | 是 | 调度域名id |
policyId | Integer | 否 | 策略id |
view | String | 否 | 线路中文名,支持模糊搜索,例如‘中国电信’ |
warnType | Integer | 否 | 告警类型 0:调度告警 1:故障告警 2:恢复通知 |
startTime | String | 否 | 查询开始时间 格式yyyy-MM-dd HH:mm:ss 例如‘2021-04-26 18:00:00’ |
endTime | String | 否 | 查询结束时间 格式yyyy-MM-dd HH:mm:ss 例如‘2021-04-26 18:00:00’ |
参数名称 | 类型 | 描述 |
---|---|---|
resCode | Integer | {"en":"Status code. See "Scheduling Business Status Codes" for a detailed description of RESCODE.", "zh_CN":"状态码。resCode的详细说明请参见“调度业务状态码”。"} |
msg | String | 状态码的详细说明 |
content | List | 业务数据 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/clouddns/DispatchWarnLog" \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -d '{ "language":"zh_CN", "domainId":133456, "policyId":45246, "startTime":"2021-04-22 23:00:00" }'
{ "resCode": 0, "msg": "operate success", "content": [ { "warnState": 2, "warnType": 1, "warnTime": "2021-04-23 10:52:12", "policyId": 45246, "domainId":133456, "views": "默认", "domainName": "test.made-in-china.com", "warnId": 18788765, "warnResourceList":[{ "resourceId":1, "resourcePartType":1, "resourceType":1, "resourceValue":"1.1.1.1", "detectStatus":0, "status":1 }] }, { "warnState": 2, "warnType": 0, "warnTime": "2021-04-23 10:46:48", "policyId": 45246, "domainId":133456, "views": "默认", "domainName": "test.made-in-china.com", "warnId": 18788758, "warnResourceList":[{ "resourceId":1, "resourcePartType":1, "resourceType":1, "resourceValue":"1.1.1.1", "detectStatus":1, "status":1 }] }, { "warnState": 2, "warnType": 2, "domainId":133456, "warnTime": "2021-04-23 10:46:48", "policyId": 45246, "views": "默认", "domainName": "test.made-in-china.com", "warnId": 18788758, "warnResourceList":[{ "resourceId":1, "resourcePartType":1, "resourceType":1, "resourceValue":"1.1.1.1", "detectStatus":1, "status":1 }] } ] }