Go to main content

Oracle® ZFS Storage Appliance RESTful API ガイド、Release OS8.8.x

印刷ビューの終了

更新: 2021 年 8 月
 
 

しきい値アラート

しきい値アラートは、しきい値が特定の分析統計に対して定義されているカスタムアラートであり、統計値がそのしきい値の範囲外になるとアラートアクションが実行されます。Oracle ZFS Storage Appliance Analytics ガイド、Release OS8.8.x も参照してください。

次の表では、分析統計の指定、その統計のしきい値の定義、およびそのしきい値アラートに対するアラートアクションの実行時期の定義を行うために設定するプロパティーについて説明します。

表 11  しきい値アラートのプロパティー
プロパティー
説明
statname
AnalyticsStatistics
必須。モニターする分析統計。
limit
PositiveInteger
必須。アラートをトリガーするしきい値。1 秒あたりのバイト、操作、アクセス、リクエストの割合または数。
type
ChooseOne
しきい値 (limit) を現在の統計値と比較する方法。
  • normal – 現在の統計値がしきい値を超えています。これはデフォルトです。

  • inverted – 現在の統計値がしきい値を下回っています。

minpost
Duration
アラートアクションを実行するまでに統計値がしきい値条件を維持する必要がある秒単位の時間の長さ。デフォルト値は 5 分です。
days
ChooseOne
これらのアラートを送信する日: all の日、weekdays、または weekends。デフォルト値は all です。
window_start
window_end
TimeOfDay
このアラートアクションを実行する期間を示す時間ウィンドウ。UTC の 00:00 から 23:30 までの時間を 30 分単位で指定します。条件が満たされたらいつでもこのアラートアクションを実行するには、開始時間または終了時間として none を指定します。デフォルト値は、window_startnonewindow_end00:00 です。
frequency
Duration
統計値がしきい値条件を維持している間にアラートアクションを再実行する秒単位の時間間隔の長さ。デフォルト値は 5 分です。
minclear
Duration
フォローアップアラートアクションを実行するまでに統計値がしきい値条件の範囲外になる必要がある秒単位の時間の長さ。デフォルト値は 5 分です。

しきい値アラートの一覧表示

次のリクエストは、構成済みのすべてのしきい値アラートを一覧表示します。

リクエストの例:

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