列出警报操作命令可列出所有警报操作。要获取单个资源的数据,请向给定警报操作资源的 href 属性发送 HTTP GET 请求。
获取警报操作的请求示例:
GET /api/alert/v1/actions HTTP/1.1 Authorization: Basic abcd123MWE= Host: zfs-storage.example.com:215 Accept: application/json
响应示例:
HTTP/1.1 200 OK
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 1395
{
"actions": [
{
"action": "actions-000",
"category": "smf",
"href": "/api/alert/v1/actions/actions-000",
"service_failures": true
},
{
"action": "actions-001",
"category": "scrk",
"href": "/api/alert/v1/actions/actions-001",
"action-000": {
"handler": "snmp_trap",
"href": "/api/alert/v1/alerts/actions/actions-001
/action-000"
},
"action-001": {
"address": "Joe.Admin@acme.com",
"handler": "email",
"href": "/api/alert/v1/actions/actions-001
/action-001",
"subject": "Phone Home Alert"
},
"support_bundle_build_failed": true,
"support_bundle_sent": true,
"support_bundle_upload_failed": true
},
{
"action": "actions-002",
"category": "thresholds",
"href": "/api/alert/v1/actions/actions-002",
"action-000": {
"address": "Joe.Admin@acme.com",
"handler": "email",
"href": "/api/alert/v1/actions/actions-002
/action-000",
"subject": "CPU Busy Alert"
},
"thresholdid": "b182ca05-53d3-6604-b874-ec353335704d"
}
]
}