跳转到主要内容
告警与响应相关接口/告警规则

获取告警内置规则模板列表

列表内置告警规则模板创建新规则。

GET/api/v1/alerting/rules/builtin-templates

操作 ID

GetAlertBuiltinRuleTemplates

起始版本

1.0.0

执行模式

同步

认证信息

需要认证

认证信息

调用该 API 时需要在请求头中携带以下认证信息。

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

此接口无需请求参数。

响应状态

200 OK
200 OK

该 API 成功时返回以下响应结构。

  • items
    List

    条目列表。

    示例: (nested array)

    • id
      String

      资源ID。

      示例: btmpl-001

    • name
      String

      资源名称。

      示例: VM CPU Alert

    • description
      String

      资源的详细描述。

      示例: Alert when VM CPU exceeds threshold

    • category
      String

      类型分类。

      示例: infrastructure

    • resourceType
      String

      资源类型。

      示例: vm

    • metricName
      String

      监控项名称。

      示例: cpu_usage_percent

    • operator
      String

      比较运算符。

      示例: >

    • threshold
      Long

      阈值。

      示例: 90

    • duration
      Integer

      持续时间。

      示例: 300

    • severity
      String

      告警级别。

      示例: critical

    • impactScope
      String

      影响范围。

      示例: cluster

  • total
    Integer

    返回结果总数。

    示例: 15

  • limit
    Integer

    最大返回条目数。

    示例: 20

  • offset
    Integer

    查询起始偏移量。

    示例: 20