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

查询告警列表

列表告警实例分页支持。

GET/api/v1/alerting/alerts

操作 ID

ListAlerts

起始版本

1.0.0

执行模式

同步

认证信息

需要认证

认证信息

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

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

application/json

查询参数

  • page
    Integer

    页码从 1 开始,0 表示不分页。

    示例: 0

    {"format":"int32"}

  • pageSize
    Integer

    每页结果数量,默认为 20,上限为 200。

    示例: 0

    {"format":"int32"}

  • platformUuid
    String

    可选的平台 UUID。省略时,列出所有 Cloud 平台中当前调用方有权访问的告警。

响应状态

200 OK

请求成功。

Content-Type: application/json

响应体根类型: object

  • items
    List

    告警实例列表。

    • uuid
      String

      告警实例的唯一标识。

      示例: alert-789xyz

    • ruleUuid
      String

      生成此告警的规则 UUID。

      示例: rule-abc123-def456

    • ruleName
      String

      生成此告警的规则名称。

      示例: High CPU Usage

    • resourceType
      String

      被监控资源的类型。

      示例: vm

    • resourceUuid
      String

      触发告警的具体资源 UUID。

      示例: res-abc123

    • metricName
      String

      参与评估的指标名称。

      示例: cpu_usage_percent

    • currentValue
      Double

      告警发生时的指标当前值。

      示例: 95.3

      {"format":"double"}

    • threshold
      Double

      被超过的阈值。

      示例: 90

      {"format":"double"}

    • operator
      String

      评估时使用的比较运算符。

      示例: >

    • severity
      String

      此告警的严重级别。

      示例: critical

    • state
      String

      告警当前状态:firing、resolved 或 acknowledged。

      示例: firing

    • message
      String

      供用户阅读的告警消息。

      示例: CPU usage is 95.3%, exceeding threshold of 90%

    • fingerprint
      String

      用于告警去重的唯一指纹。

      示例: fp-abc123def456

    • source
      String

      生成告警的来源系统。

      示例: prometheus

    • notifiedAt
      String

      通知发送时间戳。

      示例: 2026-01-15T08:00:00Z

      {"format":"date-time"}

    • resolvedAt
      String

      告警恢复时间戳。

      示例: 2026-01-15T08:00:00Z

      {"format":"date-time"}

    • acknowledgedBy
      String

      确认此告警的用户。

      示例: admin

    • acknowledgedAt
      String

      告警确认时间戳。

      示例: 2026-01-15T08:00:00Z

      {"format":"date-time"}

    • createDate
      String

      告警创建时间戳。

      示例: 2026-01-15T08:00:00Z

      {"format":"date-time"}

    • platformUuid
      String

      平台UUID。

      示例: value

    • thresholdUnit
      String

      最终告警表达式的单位。读操作响应按 Accept-Language 本地化;无单位的状态值返回空值。

      示例: value

  • total
    Integer

    返回结果总数。

    示例: 42

    {"format":"int32"}

  • limit
    Integer

    每页条数上限。

    示例: 20

    {"format":"int32"}

  • offset
    Integer

    查询起始偏移量。

    示例: 20

    {"format":"int32"}

  • 变更时间

    新增请求参数 platformUuid新增响应字段 platformUuid, thresholdUnit
    查看 API