告警模板:查询列表(1) 接口功能介绍 调用此接口可查询告警模板列表。 接口约束 无。 URI POST /v4/monitor/queryalarmtemplates 路径参数 无 Query参数 无 请求参数 请求头header参数 无 请求体body参数 参数 是否必填 参数类型 说明 示例 下级对象 regionID 是 String ctyun资源池ID 81f7728662dd11ec810800155d307d5b queryContent 否 String 名称模糊搜索 temp services 否 Array of Strings 本参数表示展示出来的服务。默认返回所有服务。取值范围: ecs:云主机。 evs:云硬盘。 pms:物理机。 ... 详见"云监控:查询服务维度及监控项"接口返回。 templateType 否 String 本参数表示模板类型。默认all。取值范围: system:系统默认。 custom:自定义。 all:所有。 根据以上范围取值。 all pageNo 否 Integer 页码,默认为1 1 page 否 Integer 页码,默认为1,建议使用pageNo,该参数后续会下线 1 pageSize 否 Integer 页大小,默认为10 2 响应参数 参数 参数类型 说明 示例 下级对象 statusCode Integer 返回状态码(800为成功,900为失败),默认值:800 800 errorCode String 失败时的错误代码,参见公共错误码说明 message String 失败时的错误描述,一般为英文描述 Success msgDesc String 失败时的错误描述,一般为中文描述 成功 error String 错误码,请求成功时,不返回该字段 Openapi.Parameter.Error returnObj Object 返回参数 returnObj 表 returnObj 参数 参数类型 说明 示例 下级对象 templateList Array of Objects 告警模板列表 templateList totalCount Integer 总记录数 2 templateQuota Integer 用户告警模板配额数 50 currentCount Integer 当前页记录数 14 totalPage Integer 总页数 1 pageNo Integer 页码 1 pageSize Integer 页大小 10 表 templateList 参数 参数类型 说明 示例 下级对象 templateID String 告警模板ID 315c7f8c3e4311ed8ef2005056898fe0 name String 告警模板名称 ctyunalarmtemplate service String 服务 ecs dimension String 维度 ecs desc String 告警模板描述 demo conditions Array of Objects 告警规则 conditions createTime Integer 创建时间,时间戳,精确到毫秒 1667459789000 updateTime Integer 最近更新时间, 时间戳,精确到毫秒 1667459789000 表 conditions 参数 参数类型 说明 示例 下级对象 evaluationCount Integer 持续次数,当规则执行结果持续多久符合条件时报警(防抖) 2 metric String 监控指标 cpuutil metricCnName String 监控指标中文描述 cpu使用率 fun String 本参数表示告警采用算法。取值范围: last:原始值算法。 avg:平均值算法。 max:最大值算法。 min:最小值算法。 sum:求和算法。 根据以上范围取值。 min operator String 本参数表示比较符。取值范围: eq:等于。 gt:大于。 ge:大于等于。 lt:小于。 le:小于等于。 rg:环比上升。 cf:环比下降。 rc:环比变化。 根据以上范围取值。 le value String 告警阈值 80 period String 本参数表示算法统计周期。 参数fun为last时无效。 本参数格式为“数字+单位”。单位取值范围: m:分钟。 h:小时。 d:天。 根据以上范围取值。 5m unit String 单位 KB/s level Integer 本参数表示告警等级。取值范围: 1:紧急。 2:警示。 3:普通。 根据以上范围取值。 3
来自: