Modify¶
POST /api/v1/monitor/mute/{obj_uuid}/modify
Overview¶
Modify a mute rule
Route Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
obj_uuid | string | Y | ID of the mute configuration |
Body Request Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
name | string | Rule name Example: Name A Allow empty: False |
|
description | string | Description Example: Description A Allow empty: False Allow empty string: True |
|
tags | json | Tag set Allow empty: False |
|
filterString | string | Event attributes Allow empty: False Allow empty string: True Maximum length: 2048 |
|
muteRanges | array | Mute range Example: Monitor A Allow empty: False |
|
notifyTargets | array | Notification targets Allow empty: False |
|
notifyMessage | string | Notification message Allow empty: False Maximum length: 3000 |
|
notifyTimeStr | string | Notification time, %Y/%m/%d %H:%M:%S Example: 2023/08/21 19:19:00 Allow empty: False Allow empty string: True |
|
startTime | string | Start time %Y/%m/%d %H:%M:%S Example: 2023/08/21 19:19:00 Allow empty: False |
|
endTime | string | End time %Y/%m/%d %H:%M:%S Example: 2023/08/21 19:19:00 Allow empty: False Allow empty string: True |
|
repeatTimeSet | int | Y | Repeat configuration value pass 1, mute time for single pass 0 Example: 0 Allow empty: False |
repeatCrontabSet | None | Repeat crontab configuration Allow empty: False |
|
repeatCrontabSet.min | string | Minutes Example: 10 Allow empty: False |
|
repeatCrontabSet.hour | string | Hours Example: 10 Allow empty: False |
|
repeatCrontabSet.day | string | Day Example: * Allow empty: False |
|
repeatCrontabSet.month | string | Month Example: * Allow empty: False |
|
repeatCrontabSet.week | string | Week Example: 1,3 Allow empty: False |
|
crontabDuration | int | End time minus start time, positive integer, unit is s Example: 3600 Allow empty: False |
|
repeatExpireTime | string | Repeat end time %Y/%m/%d %H:%M:%S Example: Allow empty: False Allow empty string: True |
|
timezone | str | Y | Time zone of the mute rule Example: Asia/Shanghai Allow empty: False |
type | str | Y | Type of the mute rule Example: custom Allow empty: False Optional values: ['checker', 'alertPolicy', 'tag', 'custom'] |
declaration | json | Custom claim information Allow empty: False |
Additional Parameter Explanation¶
Data Explanation.*
- Request parameter explanation
Parameter Name | type | Description |
---|---|---|
muteRanges | list | Mute ranges, includes monitors, intelligent inspections, self-built inspections, SLOs, alert strategies |
name | str | Rule name |
description | str | Description |
tags | dict | Tags |
filterString | str | Event attributes (expression form input) |
notifyTargets | list | to: List as notification objects, type as their notification types |
repeatTimeSet | int | Whether to repeat mute, 1 represents enabling repeat mute, 0 represents only once |
repeatCrontabSet | dict | Repeat mute rule time configuration |
crontabDuration | int | Represents the duration after the scheduled task starts, mute time |
notifyTargets | list | to: List as notification objects, type as their notification types |
notifyTimeStr | str | Notification time, %Y/%m/%d %H:%M:%S |
startTime | str | Mute start time %Y/%m/%d %H:%M:%S |
endTime | str | Mute end time %Y/%m/%d %H:%M:%S |
repeatExpireTime | str | Expiration time of repeated mute %Y/%m/%d %H:%M:%S |
timezone | str | Corresponding task time zone default Asia/Shanghai |
type | str | Corresponding mute rule type checker: monitor: tag: custom |
repeatExpire | int | Expiration time of repeated mute (discontinued on 2023-08-24) |
start | int | Mute start time (discontinued on 2023-08-24) |
end | int | Mute end time (discontinued on 2023-08-24) |
notifyTime | int | Notification time, timestamp in seconds, -1 represents immediate notification (discontinued on 2023-08-24) |
declaration | dict | Custom claim information |
Request Example¶
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":"Name A","description":"Description A","startTime":"2023/08/22 16:27:27","notifyTargets":[{"to":["notify_xxxx32"],"type":"notifyObject"}],"tags":{},"muteRanges":[{"name":"Multiple points {version}","checkerUUID":"rul_xxxx32","type":"Monitor"}],"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":"dcscsadcsdacasdcsdacsdac"}' \
--compressed \
--insecure
Response¶
{
"code": 200,
"content": {
"createAt": 1692771116,
"creator": "acnt_xxxx32",
"crontab": "",
"crontabDuration": 0,
"deleteAt": -1,
"description": "Description A",
"end": 1692772267,
"endTime": "2023/08/23 14:31:07",
"id": 643,
"muteRanges": [
{
"checkerUUID": "rul_xxxx32",
"name": "Aerospike cluster 【{cluster_name}】 space 【{{ ns }}】 Memory usage rate too high",
"type": "Monitor"
}
],
"name": "Name A",
"notifyMessage": "cjkackcnkjcklasc",
"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"
}