しきい値を設定して、カスタムの警告ウォッチを作成できます。次の表に、警告のしきい値を管理するための一般的なプロパティーを示します。詳細は、CLI のヘルプを参照してください。
|
すべての構成済みの警告しきい値を一覧表示します。
リクエストの例:
GET /api/alert/v1/thresholds HTTP/1.1 Authorization: Basic abcd123MWE= Host: zfssa.example.com:215 Accept: application/json
レスポンスの例:
HTTP/1.1 200 OK
Date: Tue, 27 Aug 2013 17:38:40 GMT
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 689
{
"thresholds": [
{
"days": "all",
"frequency": 300,
"href": "/api/alert/v1/thresholds/
bec758cb-346e-6a7d-c211-b320c09ef6a6",
"limit": 500,
"minclear": 300,
"minpost": 300,
"statname": "cpu.utilization",
"threshold": "threshold-000",
"type": "normal",
"uuid": "bec758cb-346e-6a7d-c211-b320c09ef6a6",
"window_end": 0,
"window_start": -1
},
{
"days": "all",
"frequency": 300,
"href": "/api/alert/v1/thresholds/
475799d8-32c8-6ff6-882c-aa3b66e3a5a2",
"limit": 100000,
"minclear": 600,
"minpost": 300,
"statname": "datalink.kilobytes",
"threshold": "threshold-001",
"type": "normal",
"uuid": "475799d8-32c8-6ff6-882c-aa3b66e3a5a2",
"window_end": 300,
"window_start": 1200
}
]
}
単一の警告しきい値のプロパティーを一覧表示します。
リクエストの例:
GET /api/alert/v1/thresholds/1b15d405-75c4-4c0c-e0f6-8a108165b874
HTTP/1.1
Authorization: Basic abcd123MWE=
Host: zfssa.example.com:215
Accept: application/json
結果例:
HTTP/1.1 200 OK
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 363
{
"threshold": {
"days": "weekdays",
"frequency": 300,
"href": "/api/alert/v1/thresholds/
1b15d405-75c4-4c0c-e0f6-8a108165b874",
"limit": 100000,
"minclear": 300,
"minpost": 300,
"statname": "datalink.kilobytes",
"type": "normal",
"uuid": "1b15d405-75c4-4c0c-e0f6-8a108165b874",
"window_end": 0,
"window_start": -1
}
}
警告しきい値を作成します。
リクエストの例:
POST /api/alert/v1/thresholds HTTP/1.1
Host: zfs-storage.example.com
X-Auth-User: root
X-Auth-Key: letmein
Content-Type: application/json
Content-Length: 50
{"statname": "datalink.kilobytes", "limit": 100000}
レスポンスの例:
HTTP/1.1 201 Created
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 321
Location: /api/alert/v1/thresholds
/1b15d405-75c4-4c0c-e0f6-8a108165b874
{
"threshold": {
"href": "/api/alert/v1/alerts/thresholds
/1b15d405-75c4-4c0c-e0f6-8a108165b874",
...
}
}
指定された警告しきい値のプロパティーを変更します。
リクエストの例:
PUT /api/alert/v1/thresholds/1b15d405-75c4-4c0c-e0f6-8a108165b874
HTTP/1.1
Authorization: Basic abcd123MWE=
Host: zfssa.example.com:215
{"days":"weekdays"}
レスポンスの例:
HTTP/1.1 202 Accepted
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 326
{
"threshold": {
"days": "weekdays",
...
}
}
指定された警告しきい値を削除します。
リクエストの例:
DELETE /api/alert/v1/thresholds/475799d8-32c8-6ff6-882c-aa3b66e3a5a2
HTTP/1.1
Authorization: Basic abcd123MWE=
Host: zfssa.example.com:215
レスポンスの例:
HTTP/1.1 204 No Content X-Zfssa-Appliance-Api: 1.0