임계값 경보는 특정 Analytics 통계에 대해 임계값이 정의된 사용자정의 경보이며, 통계 값이 해당 임계값을 벗어나는 경우 경보 조치가 실행됩니다. Oracle ZFS Storage Appliance Analytics Guide, Release OS8.8.x를 참조하십시오.
다음 표에서는 Analytics 통계 지정, 해당 통계에 대한 임계값 정의, 해당 임계값 경보에 대해 경보 조치가 실행될 시기 정의를 위해 설정할 등록 정보를 설명합니다.
|
다음 요청은 구성된 임계값 경보를 모두 나열합니다.
요청 예:
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
이 예에서는 초당 데이터 링크 바이트가 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