수정¶
POST /api/v1/monitor/mute/{obj_uuid}/modify
개요¶
음소거 규칙 수정
경로 매개변수¶
| 매개변수명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| obj_uuid | string | Y | 음소거 설정의 ID |
Body 요청 매개변수¶
| 매개변수명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| name | string | 규칙 이름 예시: 이름 A 빈 값 허용: False |
|
| description | string | 설명 예시: 설명 A 빈 값 허용: False 빈 문자열 허용: True |
|
| tags | json | 태그 집합 빈 값 허용: False |
|
| filterString | string | 이벤트 속성 빈 값 허용: False 빈 문자열 허용: True 최대 길이: 2048 |
|
| muteRanges | array | 음소거 범위 예시: 모니터 A 빈 값 허용: False |
|
| notifyTargets | array | 알림 대상 빈 값 허용: False |
|
| notifyMessage | string | 알림 메시지 빈 값 허용: False 최대 길이: 3000 |
|
| notifyTimeStr | string | 알림 시간, %Y/%m/%d %H:%M:%S 예시: 2023/08/21 19:19:00 빈 값 허용: False 빈 문자열 허용: True |
|
| startTime | string | 시작 시간 %Y/%m/%d %H:%M:%S 예시: 2023/08/21 19:19:00 빈 값 허용: False |
|
| endTime | string | 종료 시간 %Y/%m/%d %H:%M:%S 예시: 2023/08/21 19:19:00 빈 값 허용: False 빈 문자열 허용: True |
|
| repeatTimeSet | int | Y | 반복 설정 값은 1, 음소거 시간이 단일인 경우 0 예시: 0 빈 값 허용: False |
| repeatCrontabSet | None | 반복 crontab 설정 빈 값 허용: False |
|
| repeatCrontabSet.min | string | 분 예시: 10 빈 값 허용: False |
|
| repeatCrontabSet.hour | string | 시 예시: 10 빈 값 허용: False |
|
| repeatCrontabSet.day | string | 일 예시: * 빈 값 허용: False |
|
| repeatCrontabSet.month | string | 월 예시: * 빈 값 허용: False |
|
| repeatCrontabSet.week | string | 주 예시: 1,3 빈 값 허용: False |
|
| crontabDuration | int | 종료 시간에서 시작 시간을 뺀 값, 양의 정수, 단위는 초 예시: 3600 빈 값 허용: False |
|
| repeatExpireTime | string | 반복 종료 시간 %Y/%m/%d %H:%M:%S 예시: 빈 값 허용: False 빈 문자열 허용: True |
|
| timezone | str | Y | 음소거 규칙 시간대 예시: Asia/Shanghai 빈 값 허용: False |
| type | str | Y | 음소거 규칙 유형 예시: custom 빈 값 허용: False 선택 가능한 값: ['checker', 'alertPolicy', 'tag', 'custom'] |
| declaration | json | 사용자 정의 선언 정보 빈 값 허용: False |
매개변수 추가 설명¶
데이터 설명.*
- 요청 매개변수 설명
| 매개변수명 | type | 설명 |
|---|---|---|
| muteRanges | list | 음소거 범위, 모니터, 지능형 점검, 자체 점검, SLO, 알림 정책 포함 |
| name | str | 규칙 이름 |
| description | str | 설명 |
| tags | dict | 태그 |
| filterString | str | 이벤트 속성(표현식 형태로 전달) |
| notifyTargets | list | to: 목록은 알림 대상, type은 알림 유형 |
| repeatTimeSet | int | 반복 음소거 여부, 1은 반복 음소거 활성화, 0은 한 번만 |
| repeatCrontabSet | dict | 반복 음소거 규칙의 시간 설정 |
| crontabDuration | int | 해당 예약 작업 시작 후 음소거가 지속되는 시간 |
| notifyTargets | list | to: 목록은 알림 대상, type은 알림 유형 | |
| notifyTimeStr | str | 알림 시간, %Y/%m/%d %H:%M:%S |
| startTime | str | 음소거 시작 시간 %Y/%m/%d %H:%M:%S |
| endTime | str | 음소거 종료 시간 %Y/%m/%d %H:%M:%S |
| repeatExpireTime | str | 반복 음소거 만료 시간 %Y/%m/%d %H:%M:%S |
| timezone | str | 해당 작업 시간대 기본값 Asia/Shanghai |
| type | str | 해당 음소거 규칙 유형 checker:monitor:tag:custom |
| repeatExpire | int | 반복 음소거 만료 시간 (2023-08-24 폐기) |
| start | int | 음소거 시작 시간 (2023-08-24 폐기) |
| end | int | 음소거 종료 시간 (2023-08-24 폐기) | |
| notifyTime | int | 알림 시간, 시간에 해당하는 초 단위 타임스탬프, -1은 즉시 알림 (2023-08-24 폐기) |
| declaration | dict | 사용자 정의 선언 정보 |
요청 예시¶
curl 'https://openapi.guance.com/api/v1/monitor/mute/<obj_uuid>/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"nameA","description":"descA","startTime":"2023/08/22 16:27:27","notifyTargets":[{"to":["notify_xxxx32"],"type":"notifyObject"}],"tags":{},"muteRanges":[{"name":"multi{{version}}","checkerUUID":"rul_xxxx32","type":"checker"}],"type":"checker","timezone":"Asia/Shanghai","repeatTimeSet":1,"repeatCrontabSet":{"min":"0","hour":"1","day":"*","month":"*","week":"0,5,6,4"},"crontabDuration":10800,"repeatExpireTime":"2023/09/09 00:00:00","notifyTimeStr":"","notifyMessage":"nofity message"}' \
--compressed \
--insecure
응답¶
{
"code": 200,
"content": {
"createAt": 1692771116,
"creator": "acnt_xxxx32",
"crontab": "",
"crontabDuration": 0,
"deleteAt": -1,
"description": "descA",
"end": 1692772267,
"endTime": "2023/08/23 14:31:07",
"id": 643,
"muteRanges": [
{
"checkerUUID": "rul_xxxx32",
"name": "The Memory usage rate of the Aerospike cluster [{{cluster_name}}] space [{{ns}}] is too high",
"type": "checker"
}
],
"name": "nameA",
"notifyMessage": "nofity message",
"notifyTargets": [
{
"to": [
"acnt_xxxx32"
],
"type": "mail"
}
],
"notifyTime": 1692769507,
"notifyTimeStr": "2023/08/23 13:45:07",
"repeatExpire": -1,
"repeatExpireTime": "-1",
"start": 1692770407,
"startTime": "2023/08/23 14:00:07",
"status": 0,
"tags": {},
"timezone": "Asia/Shanghai",
"type": "checker",
"updateAt": 1692771117,
"updator": "acnt_xxxx32",
"uuid": "mute_xxxx32",
"workspaceUUID": "wksp_xxxx32"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-C5BE0235-BB41-437E-801E-F925E98F8616"
}