cls_describe_alarm_records
Query historical alarm records to analyze triggers, identify causes, and monitor resolution status for Tencent Cloud Log Service.
Instructions
查询告警历史记录。查看最近的告警触发记录,了解告警发生的时间、原因和处理状态。
参数说明
start_time: 起始时间,Unix 时间戳(毫秒),如 1700000000000(必填)
end_time: 结束时间,Unix 时间戳(毫秒)(必填)
offset: 分页偏移量,默认 0
limit: 每页条数,默认 20
alarm_id: 按告警策略 ID 过滤(可选)
topic_id: 按监控对象(日志主题)ID 过滤(可选)。如不确定 ID,可先通过 cls_describe_topics 按名称搜索
status: 按告警状态过滤(可选):0=未恢复,1=已恢复,2=已失效
alarm_level: 按告警等级过滤(可选):0=警告,1=提醒,2=紧急
适用场景
排查某个告警策略的历史触发情况
查看某个日志主题关联的所有告警记录
按状态或等级筛选告警记录
了解最近告警的总体趋势
注意事项
⏰ start_time/end_time 为毫秒时间戳,请先调用 cls_convert_time 工具转换,不要手动计算
region: 地域(可选),如 ap-guangzhou、na-ashburn,不传则使用默认地域,可通过 cls_describe_regions 查询所有可用地域
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start_time | Yes | ||
| end_time | Yes | ||
| offset | No | ||
| limit | No | ||
| alarm_id | No | ||
| topic_id | No | ||
| status | No | ||
| alarm_level | No | ||
| region | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |