此操作用来导出告警信息。
请求语法
GET /rest/v1/system/alarm/file?alarmStatus=alarmStatus HTTP/1.1
Date: date
Host: ip:port
Authorization: authorization
请求参数
名称 描述 是否必须 alarmStatus 告警状态。
类型:字符串
取值:
Unresolved:告警中。
Resolved:告警已解除。
Expired:告警已失效。
默认值为Unresolved。
否
请求示例
导出告警中的告警。
GET /rest/v1/system/alarm/file HTTP/1.1
Date: Mon, 08 Jan 2024 05:47:24 GMT
Host: 192.168.0.110:1443
Authorization: HBlock userName:signature
响应示例
HTTP/1.1 204 No Content
Date: Mon, 08 Jan 2024 05:47:24 GMT
Connection: keep-alive
x-hblock-request-id: 1c631d8b1b3549d7b4959d2bfae5f13b
Content-Disposition: attachment;filename=alarm_Unresolved_20220817160233.csv
Transfer-Encoding: chunked
Server: HBlock
alarmId,instanceId,instanceSnapshot,alarmRule,severity,alarmStatus,alarmTime,alarmValue,muteStatus,muteOperations
4jlhtUel,hblock_4,"hblock_4,ecs-9689-0915141,192.168.0.202",ProtocolServiceAbnormal,Major,Unresolved,2024-01-08 10:43:03,,Normal,