Skip to content

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 The 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
Example:
Allow empty: False
Allow empty string: True
Max length: 2048
muteRanges array Mute ranges
Example: Monitor A
Allow empty: False
notifyTargets array Notification targets
Allow empty: False
notifyMessage string Notification message
Allow empty: False
Max 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 Pass 1 for repeat configuration value, pass 0 for one-time Mute time
Example: 0
Allow empty: False
repeatCrontabSet None Repeat crontab configuration
Allow empty: False
repeatCrontabSet.min string Minute
Example: 10
Allow empty: False
repeatCrontabSet.hour string Hour
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 expiration time %Y/%m/%d %H:%M:%S
Example:
Allow empty: False
Allow empty string: True
timezone str Y Mute rule timezone
Example: Asia/Shanghai
Allow empty: False
type str Y Mute rule type
Example: custom
Allow empty: False
Allowed values: ['checker', 'alertPolicy', 'tag', 'custom']
declaration json Custom declaration information
Allow empty: False

Parameter Supplementary Description

Data description.*

  • Request parameter description
Parameter Name type Description
muteRanges list Mute ranges, includes monitors, Intelligent Inspection, self-built inspections, SLO, Alert Strategies
name str Rule name
description str Description
tags dict Tags
filterString str Event attributes (input in expression form)
notifyTargets list to: list is the notification targets, type is their notification type
repeatTimeSet int Whether to repeat Mute, 1 means enable repeat Mute, 0 means only once
repeatCrontabSet dict Time configuration for the repeat Mute rule
crontabDuration int Represents the duration of the Mute after the scheduled task starts
notifyTargets list to: list is the notification targets, type is their notification type |
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 Repeat Mute expiration time %Y/%m/%d %H:%M:%S
timezone str Corresponding task timezone, default Asia/Shanghai
type str Corresponding Mute rule type checker:monitor:tag:custom
repeatExpire int Repeat Mute expiration time (Deprecated on 2023-08-24)
start int Mute start time (Deprecated on 2023-08-24)
end int Mute end time (Deprecated on 2023-08-24) |
notifyTime int Notification time, the second-level timestamp corresponding to the time point, -1 means notify immediately (Deprecated on 2023-08-24)
declaration dict Custom declaration 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":"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

Response

{
    "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"
} 

Feedback

Is this page helpful? ×