しきい値アラートは、しきい値が特定の分析統計に対して定義されているカスタムアラートであり、統計値がそのしきい値の範囲外になるとアラートアクションが実行されます。Oracle ZFS Storage Appliance Analytics ガイド、Release OS8.8.x も参照してください。
次の表では、分析統計の指定、その統計のしきい値の定義、およびそのしきい値アラートに対するアラートアクションの実行時期の定義を行うために設定するプロパティーについて説明します。
|
次のリクエストは、構成済みのすべてのしきい値アラートを一覧表示します。
リクエストの例:
GET /api/alert/v1/thresholds HTTP/1.1 Authorization: Basic Tm8gcGVla2luZyE= Host: zfs-storage.example.com:215 Accept: application/json
結果例:
HTTP/1.1 200 OK
Date: Tue, 15 Oct 2019 10:38:40 GMT
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 689
{
"thresholds": [
{
"uuid": "threshold-uuid1",
"statname": "cpu.utilization",
"type": "normal",
"limit": 80,
"minpost": 300,
"days": "weekdays",
"window_start": "08:00",
"window_end": "19:30",
"frequency": 300,
"minclear": 300,
"threshold": "threshold-000",
"href": "/api/alert/v1/thresholds/threshold-uuid1"
},
{
"uuid": "threshold-uuid2",
"statname": "cap.meta_percentused[pool]",
"type": "normal",
"limit": 85,
"minpost": 300,
"days": "all",
"window_start": "none",
"window_end": "00:00",
"frequency": 0,
"minclear": 0,
"threshold": "threshold-001",
"href": "/api/alert/v1/thresholds/threshold-uuid2"
}
]
}
次のリクエストを使用して、指定されたしきい値アラートのみのすべてのプロパティーを一覧表示します。
GET /api/alert/v1/thresholds/threshold-uuid HTTP/1.1
この例では、1 秒あたりのデータリンクバイト数が 100000KB を超えるイベントのしきい値アラートを作成します。他のすべてのプロパティーにはデフォルト値があります。
カスタムしきい値アラートを作成するには、ユーザーは、alert スコープの allow_configure 承認が必要です。
リクエストの例:
POST /api/alert/v1/thresholds HTTP/1.1
Host: zfs-storage.example.com
X-Auth-User: root
X-Auth-Key: password
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/threshold-uuid
{
"threshold": {
"href": "/api/alert/v1/thresholds/threshold-uuid",
"uuid": "threshold-uuid",
"statname": "datalink.kilobytes",
"type": "normal",
"limit": 100000,
"minpost": 300,
"days": "all",
"window_start": "none",
"window_end": "00:00",
"frequency": 300,
"minclear": 300
}
}
このコマンドを使用して、指定されたしきい値アラートのプロパティーを変更します。
リクエストの例:
PUT /api/alert/v1/thresholds/threshold-uuid HTTP/1.1
Authorization: Basic Tm8gcGVla2luZyE=
Host: zfs-storage.example.com:215
{"days": "weekdays", "minpost": 120}
結果例:
HTTP/1.1 202 Accepted
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 326
{
"threshold": {
"href": "/api/alert/v1/thresholds/threshold-uuid",
"uuid": "threshold-uuid",
"statname": "datalink.kilobytes",
"type": "normal",
"limit": 100000,
"minpost": 120,
"days": "weekdays",
"window_start": "none",
"window_end": "00:00",
"frequency": 300,
"minclear": 300
}
}
指定されたしきい値アラートを削除します
リクエストの例:
DELETE /api/alert/v1/thresholds/threshold-uuid HTTP/1.1 Authorization: Basic Tm8gcGVla2luZyE= Host: zfs-storage.example.com:215
結果例:
HTTP/1.1 204 No Content X-Zfssa-Appliance-Api: 1.0