跳转至

获取



GET /api/v1/checker/{rule_uuid}/get

概述

获取监控器

路由参数

参数名 类型 必选 说明
rule_uuid string Y 检查项的ID

参数补充说明

请求例子

curl 'https://openapi.guance.com/api/v1/checker/rul_xxx/get' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--compressed 

响应

{
    "code": 200,
    "content": {
        "workspaceUUID": "wksp_f303d8be15c04c8bba567e0ccb1f33ab",
        "monitorUUID": "monitor_9a7a4a33c6cf4e77a133be9b5f6c32fe",
        "updator": "acnt_349ee5f70a89442fa94b4f754b5acbfe",
        "type": "trigger",
        "refKey": "",
        "secret": "",
        "jsonScript": {
            "name": "新通知对象产生告警事件",
            "type": "simpleCheck",
            "every": "1h",
            "title": "新通知对象产生告警事件",
            "groupBy": [
                "host"
            ],
            "message": "{{Result}}\n{{df_dimension_tags}}",
            "targets": [
                {
                    "dql": "M::cpu:(avg(`load5s`)) BY `host`",
                    "alias": "Result",
                    "qtype": "dql"
                }
            ],
            "channels": [],
            "interval": 86400,
            "atAccounts": [],
            "checkerOpt": {
                "rules": [
                    {
                        "status": "fatal",
                        "conditions": [
                            {
                                "alias": "Result",
                                "operands": [
                                    "0"
                                ],
                                "operator": ">="
                            }
                        ],
                        "matchTimes": 1,
                        "conditionLogic": "and"
                    }
                ],
                "infoEvent": false,
                "combineExpr": "A && B",
                "openMatchTimes": false,
                "openOkConditions": false,
                "disableLargeScaleEventProtect": false
            },
            "eventCharts": [],
            "noDataTitle": "",
            "noDataAction": "noDataEvent",
            "noDataMessage": "",
            "noDataInterval": 86400,
            "atNoDataAccounts": [],
            "eventChartEnable": false,
            "disableCheckEndTime": false,
            "notificationMessage": "",
            "recoverNeedPeriodCount": 2,
            "openNotificationMessage": false,
            "noDataNotificationMessage": "",
            "openNoDataNotificationMessage": false
        },
        "crontabInfo": {
            "id": "cron-Iaxii7HVmKjG",
            "crontab": "0 0 */1 * * *"
        },
        "extend": {
            "rules": [
                {
                    "status": "fatal",
                    "conditions": [
                        {
                            "alias": "Result",
                            "operands": [
                                "0"
                            ],
                            "operator": ">="
                        }
                    ],
                    "matchTimes": 1,
                    "conditionLogic": "and"
                }
            ],
            "manager": [],
            "funcName": "",
            "querylist": [
                {
                    "uuid": "435da4db-c582-4a1d-b644-7a12bc3e656a",
                    "qtype": "dql",
                    "query": {
                        "q": "M::cpu:(avg(`load5s`)) BY `host`",
                        "code": "A",
                        "type": "simple",
                        "alias": "",
                        "field": "load5s",
                        "groupBy": [
                            "host"
                        ],
                        "funcList": [],
                        "fieldFunc": "avg",
                        "fieldType": "float",
                        "namespace": "metric",
                        "dataSource": "cpu",
                        "groupByTime": "",
                        "additionalFields": null
                    },
                    "datasource": "dataflux"
                }
            ],
            "rulesExtend": [],
            "issueLevelUUID": "",
            "needRecoverIssue": false,
            "isNeedCreateIssue": false
        },
        "createdWay": "manual",
        "isLocked": 0,
        "openPermissionSet": false,
        "permissionSet": [],
        "id": 15255,
        "uuid": "rul_f88837213aa54557bbd8504be2e2d72d",
        "status": 0,
        "creator": "acnt_349ee5f70a89442fa94b4f754b5acbfe",
        "createAt": 1767946011,
        "deleteAt": -1,
        "updateAt": 1767947977,
        "relCombinedCheckerInfos": [],
        "monitorName": "default",
        "alertPolicyInfos": [
            {
                "uuid": "altpl_ca767f2bc9e9482385c78aa3c9ed4748",
                "name": "Google Chat 告警"
            }
        ],
        "tagInfo": [],
        "creatorInfo": {
            "uuid": "acnt_349ee5f70a89442fa94b4f754b5acbfe",
            "status": 0,
            "wsAccountStatus": 0,
            "username": "xxx@guance.com",
            "name": "88测试账号测试账号1",
            "iconUrl": "http://testing-static-res.dataflux.cn/icon/acnt_349ee5f70a89442fa94b4f754b5acbfe.png",
            "email": "xxx@guance.com",
            "mobile": "12343543422",
            "acntWsNickname": ""
        },
        "updatorInfo": {
            "uuid": "acnt_349ee5f70a89442fa94b4f754b5acbfe",
            "status": 0,
            "wsAccountStatus": 0,
            "username": "xxx@guance.com",
            "name": "88测试账号测试账号1",
            "iconUrl": "http://testing-static-res.dataflux.cn/icon/acnt_349ee5f70a89442fa94b4f754b5acbfe.png",
            "email": "xxx@guance.com",
            "mobile": "12343543422",
            "acntWsNickname": ""
        },
        "allow_operation": null,
        "levelInfo": {},
        "channelInfo": {}
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "6ad84987b29600775990e33ff3fdda0e"
} 

文档评价

文档内容是否对您有帮助? ×