首页 运维事件中心 开发参考 API参考 API目录 服务组 ListServiceGroupMonitorSourceTemplates - 查询服务组消息模板列表

ListServiceGroupMonitorSourceTemplates - 查询服务组消息模板列表

更新时间: 2024-10-18 13:59:21

查询服务组消息模板列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

POST /services/group/listServiceGroupMonitorSourceTemplates HTTP/1.1

请求参数

名称类型必填描述示例值
bodyobject

请求 Body。

clientTokenstring

幂等号。

xxxx
requestIdstring

请求 ID。

xxxxx
serviceGroupIdlong

服务组 ID。

1000

{"serviceGroupId":"180030020"}

返回参数

名称类型描述示例值
object

响应结构。

requestIdstring

请求 ID。

xxxx
dataarray<object>

模板列表。

监控源模版object

模板列表。

monitorSourceIdlong

监控源 ID。

1000
templateIdlong

消息模板 ID。

1000
monitorSourceNamestring

监控报警源名字。

zabbix
templateContentstring

模板内容。

""
fieldsarray

字段。

字段集合string

字段。

字段

{

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

}

示例

正常返回示例

JSON格式

{
  "requestId": "xxxx",
  "data": [
    {
      "monitorSourceId": 1000,
      "templateId": 1000,
      "monitorSourceName": "zabbix",
      "templateContent": "\"\"",
      "fields": [
        "字段"
      ]
    }
  ]
}

错误码

访问错误中心查看更多错误码。

"data":{ "requestId":"550DB2BE-98DE-0368-A52C-8F6BC78CD113" }

上一篇: 服务组 下一篇: ListDataReportForServiceGroup - 查询服务组事件统计报表
阿里云首页 运维事件中心 相关技术圈