首页 运维事件中心 开发参考 API参考 API目录 流转规则 VerifyRouteRule - 验证流转规则

VerifyRouteRule - 验证流转规则

更新时间: 2024-10-18 14:02:23

验证流转规则。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

POST /routeRule/verify HTTP/1.1

请求参数

名称类型必填描述示例值
bodyobject

请求 body。

routeRuleIdlong

规则 ID。

1111
testSourceEventsarray<object>

告警测试内容。

object

告警测试内容。

monitorSourceIdlong

监控源 ID。

1
monitorSourceNamestring

监控源名称。

zabbix
eventTimestring

告警时间。

2021-09-08 13:00:00
eventJsonstring

告警测试内容格式。

{}

{ "testSourceEvents": [ { "eventJson": "{\n\t"summary": "Cpu_util at 85.16% on machine 112.11.123.11",\n\t"priority": "P1",\n\t"name": "Cpu 使用超额预警",\n\t"timestamp": "2021-07-17 T08:42:58.315+0000",\n\t"region": "shanghai",\n\t"source": "112.11.123.11",\n\t"application": "zheda/mozi",\n\t"group": "线上",\n\t"class": "Load",\n\t"details": {\n\t\t"freeSpace": "1%",\n\t\t"pingTime": "1500ms",\n\t\t"loadAvg": "0.75"\n\t},\n\t"tags": "{}"\n}", "eventTime": "2021-12-17 05:13:17", "monitorSourceId": 23463, "monitorSourceName": "标准集成" } ], "routeRuleId": "160034020", "clientToken": "7e070585-ee11-450e-8827-db353faa3419" }

返回参数

名称类型描述示例值
object

响应结构。

requestIdstring

请求 ID。

xxxxxx
dataobject

验证结果。

isValidRuleboolean

验证是否成功。

true
routeTypestring

事件或者报警。

INCIDENT、ALERT
notifySubscriptionNamesarray<object>

订阅名称。

订阅名称object

通知订阅。

subscriptionIdlong

订阅 ID。

111111
titlestring

订阅名称。

订阅名称
escalationPlansarray<object>

升级策略名称。

升级策略object

升级计划。

escalationPlanNamestring

升级计划名称。

升级计划1
escalationPlanIdlong

升级计划 ID。

111111
routeRuleFailReasonarray

流转规则验证失败的原因。

流转规则验证失败的原因string

流转规则验证失败的原因。

alertName不匹配
monitorSourceIdsarray

验证失败监控源 ID。

验证失败监控源IDlong

1000

验证失败监控源ID

{ "requestId": "gdgsdgsggsdg", "success": true, "errCode": 200, "errMessage": null, "data": { "routeRuleId": null, "isValidRule": false, "routeType": "INCIDENT", "routeRuleName": null, "assignToWhoName": null, "notifySubscriptions": [ { "subscriptionId": 80002030, "title": "【测试,勿动】全部服务" }, { "subscriptionId": 100000010, "title": "撒发色分" }, { "subscriptionId": 100000030, "title": "ceshi2190830" }, { "subscriptionId": 100000040, "title": "test121" }, { "subscriptionId": 100000070, "title": "是" }, { "subscriptionId": 110000000, "title": "全部服务-个人-优先级高" }, { "subscriptionId": 110000010, "title": "111" }, { "subscriptionId": 110000030, "title": "老数据兼容测试" }, { "subscriptionId": 110000090, "title": "测试优化功能" }, { "subscriptionId": 120000000, "title": "经 1" }, { "subscriptionId": 120000030, "title": "三级级联--全部服务" }, { "subscriptionId": 120000070, "title": "341" }, { "subscriptionId": 130000000, "title": "全部服务-服务组" }, { "subscriptionId": 130000010, "title": "222" }, { "subscriptionId": 130000030, "title": "ceshi0903" }, { "subscriptionId": 130000060, "title": "niidfads" }, { "subscriptionId": 130000070, "title": "e232" }, { "subscriptionId": 130000080, "title": "test0001" }, { "subscriptionId": 140000000, "title": "边界值测试" }, { "subscriptionId": 140000010, "title": "通知订阅啊" }, { "subscriptionId": 140000020, "title": "【不要乱动配置!!!】【新】通知订阅-全部" }, { "subscriptionId": 140000070, "title": "ceshiyixzia" }, { "subscriptionId": 150000000, "title": "24321" }, { "subscriptionId": 150000030, "title": "dscs" }, { "subscriptionId": 150000070, "title": "史蒂夫 v" }, { "subscriptionId": 150000090, "title": "121212" }, { "subscriptionId": 160000010, "title": "3333" }, { "subscriptionId": 160000030, "title": "wj 测试订阅" }, { "subscriptionId": 160000060, "title": "cdscds" }, { "subscriptionId": 160000070, "title": "ceshisd" }, { "subscriptionId": 170000000, "title": "服务--个人" }, { "subscriptionId": 170000010, "title": "4444444" }, { "subscriptionId": 170000020, "title": "测试 11" }, { "subscriptionId": 170000030, "title": "这是一个测试 0927" }, { "subscriptionId": 170000060, "title": "妖股仁东控股的背后操盘方景华,近日收到证监会的 500 万罚单。相关处罚决定书显示,这名昔日牛散在仁东控股上巨亏了近 27 亿,还向证监" }, { "subscriptionId": 170000070, "title": "吃" }, { "subscriptionId": 170000090, "title": "发发发" }, { "subscriptionId": 180000000, "title": "aa1" }, { "subscriptionId": 180000010, "title": "3" }, { "subscriptionId": 180000030, "title": "sdds" }, { "subscriptionId": 180000040, "title": "4fy" }, { "subscriptionId": 180000050, "title": "cadscds" }, { "subscriptionId": 180000060, "title": "sdc" }, { "subscriptionId": 180000090, "title": "速度" }, { "subscriptionId": 190000040, "title": "时间自定义配置测试" }, { "subscriptionId": 190000080, "title": "老数据兼容" }, { "subscriptionId": 190000090, "title": "当钉测试" } ], "escalationPlans": [], "routeRuleFailReason": [ "无告警内容匹配 Zabbix 这条规则" ], "monitorSourceIds": [ 23465 ] } }

示例

正常返回示例

JSON格式

{
  "requestId": "xxxxxx",
  "data": {
    "isValidRule": true,
    "routeType": "INCIDENT、ALERT",
    "notifySubscriptionNames": [
      {
        "subscriptionId": 111111,
        "title": "订阅名称"
      }
    ],
    "escalationPlans": [
      {
        "escalationPlanName": "升级计划1",
        "escalationPlanId": 111111
      }
    ],
    "routeRuleFailReason": [
      "alertName不匹配"
    ],
    "monitorSourceIds": [
      0
    ]
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
上一篇: UpdateRouteRule - 编辑流转规则 下一篇: 通知订阅
阿里云首页 运维事件中心 相关技术圈