查询服务组消息模版列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。
请求语法
POST /services/group/listServiceGroupMonitorSourceTemplates HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
Object | Body | 否 | A short description of struct |
||
clientToken | String | Body | 否 | xxxx | 幂等号 |
requestId | String | Body | 否 | xxxxx | 请求ID |
serviceGroupId | Long | Body | 否 | 1000 | 服务组ID |
{"serviceGroupId":"180030020","clientToken":"ca65dca3-73d1-49a9-9020-04598f4c28ab"}
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
requestId | String | xxxx | Id of the request |
data | Array of 监控源模版 | 模版列表 |
|
monitorSourceId | Long | 1000 | 监控源ID |
templateId | Long | 1000 | 消息模版ID |
monitorSourceName | String | zabbix | 监控报警源名字 |
templateContent | String | "" | 模板内容 |
fields | Array of String | 字段 | 1 |
{
"requestId": "gdgsdgsggsdg",
"data": { "templateId": 3645786, "monitorSourceId": 23463, "monitorSourceName": "标准集成", "templateContent": "暂无", "fields": [ "summary", "priority", "name", "timestamp", "region", "source", "application", "group", "class", "tags", "details"
},
{
"templateId": 3645778,
"monitorSourceId": 23465,
"monitorSourceName": "Zabbix",
"templateContent": "SSSSSSS",
"fields": "alarmContent", "eventId", "ip", "itemValue", "alarmName", "entityId", "eventType", "priority", "itemName", "entityName", "service", "host", "agentVersion"
},
{
"templateId": 3645790,
"monitorSourceId": 23466,
"monitorSourceName": "Prometheus",
"templateContent": "告警时间:${startsAt}\n告警对象:${labels.instance}\n告警名称:${labels.alertname}\n告警内容:${description}",
"fields": "alerts[.generatorURL",
"alerts.fingerprint",
"alerts.annotations.summary",
"alerts.annotations.description",
"alerts.startsAt",
"alerts.endsAt",
"alerts.status",
"alerts.labels.severity",
"alerts.labels.instance",
"alerts.labels.alertname",
"alerts.labels.job",
"commonLabels.severity",
"commonLabels.instance",
"commonLabels.alertname",
"externalURL",
"groupLabels.alertname",
"receiver",
"truncatedAlerts",
"version",
"commonAnnotations.summary",
"commonAnnotations.description",
"groupKey",
"status",
"commonLabels.job"
]
},
{
"templateId": 3645795,
"monitorSourceId": 23467,
"monitorSourceName": "Nagios",
"templateContent": "告警内容:${content}",
"fields": "notifyActionType", "hostName", "hostState", "content"
},
{
"templateId": 3645785,
"monitorSourceId": 23468,
"monitorSourceName": "阿里云云监控",
"templateContent": "告警结束时间:${timestamp}\n告警对象:${dimensions}\n告警名称:${alertName}\n告警级别:${triggerLevel}\n告警内容:当前值 ${curValue} 地域:${regionId} 应用组名: ${productGroupName}",
"fields": "alertName", "alertState", "curValue", "dimensions", "expression", "instanceName", "lastTime", "metricName", "metricProject", "namespace", "preTriggerLevel", "productGroupName", "rawMetricName", "regionId", "regionName", "ruleId", "signature", "timestamp", "triggerLevel", "userId"
},
{
"templateId": 3645787,
"monitorSourceId": 23469,
"monitorSourceName": "阿里云SLS",
"templateContent": "告警时间:${alert_time}\n告警对象:${project}\n告警名称:${alert_name}\n告警级别:${severity}\n告警内容:日志库:${logstore} 触发数据:${fire_results_as_kv} 地域:${region}",
"fields": "aliuid", "alert_instance_id", "alert_id", "alert_name", "region", "project", "alert_time", "alert_url", "query_url", "fire_time", "resolve_time", "status", "fire_results_count", "fire_results_as_kv", "labels", "annotations_title", "annotations_desc", "severity", "logstore", "fire_results"
},
{
"templateId": 3645791,
"monitorSourceId": 23470,
"monitorSourceName": "阿里云ARMS",
"templateContent": "告警内容:${content}",
"fields": "content"
},
{
"templateId": null,
"monitorSourceId": 23472,
"monitorSourceName": "腾讯云云监控",
"templateContent": null,
"fields": "recoverTime", "alarmStatus", "alarmType", "firstOccurTime", "durationTime", "sessionId", "alarmObjInfo.namespace", "alarmObjInfo.region", "alarmObjInfo.dimensions.unInstanceId", "alarmObjInfo.dimensions.objId", "alarmObjInfo.dimensions.objName", "alarmObjInfo.dimensions.deviceName", "alarmPolicyInfo.policyId", "alarmPolicyInfo.policyName", "alarmPolicyInfo.policyType", "alarmPolicyInfo.conditions.periodNum", "alarmPolicyInfo.conditions.unit", "alarmPolicyInfo.conditions.period", "alarmPolicyInfo.conditions.metricName", "alarmPolicyInfo.conditions.alarmNotifyPeriod", "alarmPolicyInfo.conditions.calcType", "alarmPolicyInfo.conditions.metricShowName", "alarmPolicyInfo.conditions.alarmNotifyType", "alarmPolicyInfo.conditions.currentValue", "alarmPolicyInfo.conditions.calcValue", "alarmPolicyInfo.policyTypeCName", "alarmPolicyInfo.policyTypeEname", "alarmObjInfo.dimensions.appid", "alarmObjInfo.dimensions.instanceid", "alarmObjInfo.dimensions.rnodeid", "alarmObjInfo.dimensions.AppId", "alarmObjInfo.dimensions.InstanceId", "alarmObjInfo.dimensions.pnodeid", "alarmObjInfo.dimensions.protocol", "alarmObjInfo.dimensions.vip", "alarmObjInfo.dimensions.port", "alarmObjInfo.dimensions.vport", "alarmObjInfo.dimensions.protocol", "alarmObjInfo.dimensions.vpcId", "alarmObjInfo.dimensions.lanIp", "alarmObjInfo.dimensions.loadBalancerPort", "alarmObjInfo.dimensions.uid", "alarmObjInfo.dimensions.clusterid", "alarmObjInfo.dimensions.target", "alarmObjInfo.dimensions.insttype", "alarmObjInfo.dimensions.ClusterId", "alarmObjInfo.dimensions.TableInstanceId", "alarmObjInfo.dimensions.cluster_name", "alarmObjInfo.dimensions.is_master", "alarmObjInfo.dimensions.set_name", "alarmObjInfo.dimensions.type", "alarmObjInfo.dimensions.zk_name", "alarmObjInfo.dimensions.function_name", "alarmObjInfo.dimensions.namespace", "alarmObjInfo.dimensions.version", "alarmObjInfo.dimensions.bucket", "alarmObjInfo.dimensions.uniq_nat_id", "alarmObjInfo.dimensions.vpnconnid", "alarmObjInfo.dimensions.directconnectgatewayid", "alarmObjInfo.dimensions.peeringconnectionid", "alarmObjInfo.dimensions.netdetectid", "alarmObjInfo.dimensions.__region__", "alarmObjInfo.dimensions.netgroup", "alarmObjInfo.dimensions.projectid", "alarmObjInfo.dimensions.domain", "alarmObjInfo.dimensions.topicid", "alarmObjInfo.dimensions.instance_id", "alarmObjInfo.dimensions.consumer_group", "alarmObjInfo.dimensions.topicname", "alarmObjInfo.dimensions.partition", "alarmObjInfo.dimensions.FileSystemId", "alarmObjInfo.dimensions.directconnectid", "alarmObjInfo.dimensions.directconnectconnid", "alarmObjInfo.dimensions.objDetail.deviceLanIp", "alarmObjInfo.dimensions.objDetail.deviceWanIp", "alarmObjInfo.dimensions.objDetail.uniqVpcId", "alarmObjInfo.dimensions.objDetail.IP", "alarmObjInfo.dimensions.objDetail.PeeringConnectionName", "alarmObjInfo.dimensions.objDetail.QosBandwidth", "alarmObjInfo.dimensions.objDetail.VpcName", "alarmObjInfo.dimensions.objDetail.VpcId", "alarmObjInfo.dimensions.objDetail.VpnGatewayName", "alarmObjInfo.dimensions.objDetail.InternetMaxBandwidthOut", "alarmObjInfo.dimensions.objDetail.ar", "alarmObjInfo.dimensions.objDetail.bandwidth", "alarmObjInfo.dimensions.objDetail.circuitNumber", "alarmObjInfo.dimensions.objDetail.dcType", "alarmObjInfo.dimensions.objDetail.connLocalIp", "alarmObjInfo.dimensions.objDetail.connPeerIp"
},
{
"templateId": null,
"monitorSourceId": 23473,
"monitorSourceName": "华为云云监控",
"templateContent": null,
"fields": "message_type", "alarm_id", "alarm_name", "alarm_status", "time", "namespace", "metric_name", "dimension", "period", "filter", "comparison_operator", "value", "unit", "count", "alarmValue[.time",
"alarmValue.value",
"sms_content",
"template_variable.AccountName",
"template_variable.Namespace",
"template_variable.DimensionName",
"template_variable.ResourceName",
"template_variable.MetricName",
"template_variable.IsAlarm",
"template_variable.IsCycleTrigger",
"template_variable.AlarmLevel",
"template_variable.Region",
"template_variable.ResourceId",
"template_variable.PrivateIp",
"template_variable.AlarmRule",
"template_variable.CurrentData",
"template_variable.AlarmTime",
"template_variable.DataPointTime",
"template_variable.AlarmRuleName",
"template_variable.AlarmId",
"template_variable.AlarmDesc",
"template_variable.MonitoringRange",
"template_variable.IsOriginalValue",
"template_variable.Period",
"template_variable.Filter",
"template_variable.ComparisonOperator",
"template_variable.Value",
"template_variable.Unit",
"template_variable.Count",
"template_variable.EventContent",
"template_variable.Link",
"template_variable.IsIEC",
"template_variable.DataPoint"
]
},
{
"templateId": 3645788,
"monitorSourceId": 23474,
"monitorSourceName": "Cacti",
"templateContent": "告警内容:${subject}",
"fields": "subject"
},
{
"templateId": 3645796,
"monitorSourceId": 23475,
"monitorSourceName": "SkyWalking",
"templateContent": "告警内容:${content}",
"fields": "content[.scopeId",
"content.scope",
"content.name",
"content.id0",
"content.id1",
"content.ruleName",
"content.alarmMessage",
"content.startTime"
]
},
{
"templateId": null,
"monitorSourceId": 23476,
"monitorSourceName": "Open-Falcon",
"templateContent": null,
"fields": "step", "priority", "status", "stra_id", "metric", "time", "tpl_id", "exp_id", "left_value", "tags", "endpoint"
},
{
"templateId": null,
"monitorSourceId": 23477,
"monitorSourceName": "阿里云EventBridge",
"templateContent": null,
"fields": "datacontenttype", "aliyunaccountid", "subject", "aliyunoriginalaccountid", "source", "type", "aliyunpublishtime", "specversion", "aliyuneventbusname", "id", "time", "aliyunregionid", "aliyunpublishaddr", "data", "data.resourceId", "data.publicIpAddress", "data.instanceName", "data.state", "data.privateIpAddress", "data.resourceType", "data.snapshotId", "data.snapshotType", "data.snapshotName", "data.diskId"
},
{
"templateId": 3645793,
"monitorSourceId": 23478,
"monitorSourceName": "Grafana",
"templateContent": "告警名称:${ruleName}\n告警内容:面板id:${panelId} 仪表盘id:${dashboardId} 指标:${evalMatches.metric} 当前值: ${evalMatches.value}",
"fields": "panelId", "dashboardId", "ruleName", "state", "ruleId", "title", "ruleUrl", "orgId", "evalMatches[.metric",
"evalMatches.value",
"evalMatches.tags.instance",
"evalMatches.tags",
"tags",
"message",
"imageUrl"
]
},
{
"templateId": 3645784,
"monitorSourceId": 23479,
"monitorSourceName": "阿里云Prometheus",
"templateContent": "告警内容:${content}",
"fields": "content"
},
{
"templateId": 3645789,
"monitorSourceId": 23480,
"monitorSourceName": "阿里云旧版SLS",
"templateContent": "告警时间:${FireTime}\n告警对象:${Project}\n告警名称:${AlertDisplayName}\n告警内容:仪表盘:${Dashboard} 触发表达式:${RawCondition}",
"fields": "Aliuid", "Project", "AlertID", "AlertName", "AlertDisplayName", "Condition", "Aliuid", "RawCondition", "Dashboard", "DashboardUrl", "FireTime", "FullResultUrl"
},
{
"templateId": 3645794,
"monitorSourceId": 23481,
"monitorSourceName": "听云",
"templateContent": "告警时间:${beginTime}\n告警对象:${targetName}\n告警级别:${eventPriority}\n告警内容:${message}",
"fields": "eventTraceId", "targetName", "extra", "eventPriority", "threshold", "value", "beginTime", "endTime", "message", "sendTime"
},
{
"templateId": 3645792,
"monitorSourceId": 23482,
"monitorSourceName": "监控宝",
"templateContent": "告警时间:${fault_time}\n告警对象:${task_summary}\n告警名称:${task_name}\n告警级别:${message_type}\n告警内容:${content}",
"fields": "task_name", "message_status", "fault_time", "task_summary", "message_type", "task_id", "msg_id", "task_user_id", "task_type", "content", "message_detail", "message_detail.compare", "message_detail.unit", "message_detail.location_list_down", "message_detail.metric", "message_detail.location_num", "message_detail.value", "message_detail.location_type"
},
{
"templateId": null,
"monitorSourceId": 23483,
"monitorSourceName": "京东云云监控",
"templateContent": null,
"fields": "resourceName", "threshold", "serviceCode", "currentValue", "requestId", "tags", "resourceId", "metric", "times", "alertTime", "region", "ipAddress"
},
{
"templateId": null,
"monitorSourceId": 23484,
"monitorSourceName": "Dynatrace",
"templateContent": null,
"fields": "ProblemID", "ProblemSeverity", "PID", "ImpactedEntities", "ImpactedEntities[.type",
"ImpactedEntities.name",
"ImpactedEntities.entity",
"ImpactedEntityNames",
"ProblemURL",
"ImpactedEntity",
"ProblemDetailsText",
"ProblemImpact",
"ProblemTitle",
"ProblemDetailsHTML",
"State",
"ProblemDetailsMarkdown",
"Tags"
]
},
{
"templateId": null,
"monitorSourceId": 23485,
"monitorSourceName": "Grafana8",
"templateContent": null,
"fields": "commonLabels", "commonLabels.alertname", "commonLabels.tag", "externalURL", "groupLabels", "receiver", "title", "message", "version", "groupKey", "alerts", "alerts[.status",
"alerts.labels",
"alerts.labels.alertname",
"alerts.labels.tag",
"alerts.annotations",
"alerts.startsAt",
"alerts.endsAt",
"alerts.generatorURL",
"alerts.fingerprint",
"alerts.silenceURL",
"alerts.dashboardURL",
"alerts.panelURL",
"alerts.valueString",
"truncatedAlerts",
"state",
"commonAnnotations",
"status"
]
},
{
"templateId": null,
"monitorSourceId": 23486,
"monitorSourceName": "邮件集成",
"templateContent": null,
"fields": "FromAddress", "SendTo", "Subject", "MessageBody"
}
]
}
示例
请求示例
POST /services/group/listServiceGroupMonitorSourceTemplates HTTP/1.1
Host:gemp.aliyuncs.com
Content-Type:application/json
{
"clientToken" : "xxxx",
"requestId" : "xxxxx",
"serviceGroupId" : 1000
}
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ListServiceGroupMonitorSourceTemplatesResponse>
<data>
<monitorSourceId>1000</monitorSourceId>
<templateId>1000</templateId>
<monitorSourceName>zabbix</monitorSourceName>
</data>
</ListServiceGroupMonitorSourceTemplatesResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"data" : [ {
"monitorSourceId" : 1000,
"templateId" : 1000,
"monitorSourceName" : "zabbix"
} ]
}
错误码
访问错误中心查看更多错误码。
访问错误中心查看更多错误码。
"data":{
"requestId":"550DB2BE-98DE-0368-A52C-8F6BC78CD113"
}