Go to main content

Oracle® ZFS Storage Appliance RESTful API 설명서, 릴리스 OS8.8.x

인쇄 보기 종료

업데이트 날짜: 2021년 8월
 
 

임계값 경보

임계값 경보는 특정 Analytics 통계에 대해 임계값이 정의된 사용자정의 경보이며, 통계 값이 해당 임계값을 벗어나는 경우 경보 조치가 실행됩니다. Oracle ZFS Storage Appliance Analytics Guide, Release OS8.8.x를 참조하십시오.

다음 표에서는 Analytics 통계 지정, 해당 통계에 대한 임계값 정의, 해당 임계값 경보에 대해 경보 조치가 실행될 시기 정의를 위해 설정할 등록 정보를 설명합니다.

표 11  임계값 경보 등록 정보
등록 정보
유형
설명
statname
AnalyticsStatistics
필수입니다. 모니터할 Analytics 통계입니다.
limit
PositiveInteger
필수입니다. 경보를 트리거하는 임계값입니다. 초당 바이트, 작업, 액세스 또는 요청의 퍼센트나 개수입니다.
type
ChooseOne
임계값(limit)과 현재 통계 값을 비교하는 방법입니다.
  • normal – 현재 통계 값이 임계값을 초과합니다. 이는 기본값입니다.

  • inverted – 현재 통계 값이 임계값 미만입니다.

minpost
Duration
경보 조치가 실행되기 전 통계 값이 임계값 조건으로 유지되어야 할 기간(초)입니다. 기본값은 5분입니다.
days
ChooseOne
해당 경보를 전송할 일 수(all days, weekdays 또는 weekends)입니다. 기본값은 all입니다.
window_start
window_end
TimeOfDay
이 경보 조치를 실행할 시간 범위입니다. 30분 증분 간격으로 00:00부터 23:30 UTC까지의 시간을 지정합니다. 조건이 충족될 때 이 경보 조치를 실행하려면 시작 시간 또는 종료 시간으로 none을 지정합니다. 기본값은 none(window_start의 경우) 및 00:00(window_end의 경우)입니다.
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

임계값 경보 만들기

이 예에서는 초당 데이터 링크 바이트가 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