安全云脑 SECMASTER-创建告警规则:请求示例

时间:2023-12-06 18:52:41

请求示例

创建一条告警规则,告警规则所属的管道ID为772fb35b-83bc-46c9-a0b1-ebe31070a889,告警规则名称为Alert rule,查询类型为SQL,状态为启用。

{
  "pipe_id" : "772fb35b-83bc-46c9-a0b1-ebe31070a889",
  "rule_name" : "Alert rule",
  "description" : "An alert rule",
  "query" : "* | select status, count(*) as count group by status",
  "query_type" : "SQL",
  "status" : "ENABLED",
  "severity" : "TIPS",
  "custom_properties" : {
    "references" : "https://localhost/references",
    "maintainer" : "isap"
  },
  "event_grouping" : true,
  "suspression" : true,
  "schedule" : {
    "frequency_interval" : 5,
    "frequency_unit" : "MINUTE",
    "period_interval" : 5,
    "period_unit" : "MINUTE",
    "delay_interval" : 2,
    "overtime_interval" : 10
  },
  "triggers" : [ {
    "mode" : "COUNT",
    "operator" : "GT",
    "expression" : 10,
    "severity" : "TIPS"
  } ]
}
support.huaweicloud.com/api-secmaster/CreateAlertRule.html