赛尔校园公共服务平台 Logo
平台使用
阿里云
百度云
移动云
智算服务
教育生态
登录 →
赛尔校园公共服务平台 Logo
平台使用 阿里云 百度云 移动云 智算服务 教育生态
登录
  1. 首页
  2. 阿里云
  3. 日志服务
  4. 操作指南
  5. 告警
  6. 通知策略
  7. 内容模板
  8. 默认内容模板

默认内容模板

  • 内容模板
  • 发布于 2025-04-22
  • 0 次阅读
文档编辑
文档编辑

当您所选择的内容模板中未配置通知内容时,日志服务默认使用内置的通知内容。

短信

  • 中文

    告警名称:{{ alert.alert_name }},状态:{{ alert.status | format_status }},严重度:{{ alert.severity | format_severity }},触发时间:{{ alert.fire_time | format_date }}
  • 英文

    Alert name:{{ alert.alert_name }},Status:{{ alert.status | format_status }},Severity:{{ alert.severity | format_severity }},Fire time:{{ alert.fire_time | format_date }}

语音

  • 中文

    告警名称:{{ alert.alert_name }},状态:{{ alert.status | format_status }},严重度:{{ alert.severity | format_severity }},触发时间:{{ alert.fire_time | format_date }}
  • 英文

    Alert name:{{ alert.alert_name }},Status:{{ alert.status | format_status }},Severity:{{ alert.severity | format_severity }},Fire time:{{ alert.fire_time | format_date }}

邮件

  • 中文

    <table border="1" cellpadding="8" style="width: 100%%; table-layout: fixed; border-collapse: collapse; border-color: #bbb;">
        <tbody>
            <tr>
                <th scope="row" style="width: 120px;">项目</th>
                <td>{{ alert.project }}</td>
            </tr>
            <tr>
                <th scope="row" >告警名称</th>
                <td>{{ alert.alert_name }}</td>
            </tr>
            <tr>
                <th scope="row">首次触发</th>
                <td>{{ alert.fire_time | format_date }}</td>
            </tr>
            <tr>
                <th scope="row">告警时间</th>
                <td>{{ alert.alert_time | format_date }}</td>
            </tr>
            <tr>
                <th scope="row">状态</th>
                <td>{{ alert.status | format_status }}</td>
            </tr>
            <tr>
                <th scope="row">严重度</th>
                <td>{{ alert.severity | format_severity }}</td>
            </tr>
            <tr>
                <th scope="row">标签</th>
                <td>{{ alert.labels | to_list }}</td>
            </tr>
            <tr>
                <th scope="row">标注</th>
                <td>{{ alert.annotations | annotations_to_list }}</td>
            </tr>
            <tr>
                <th scope="row">操作</th>
                <td>
                    {%- if alert.dashboard_url %}
                    <a href="{{ alert.dashboard_url }}">仪表盘</a>
                    {%- endif %}
                    {%- if alert.query_url %}
                    <a href="{{ alert.query_url }}">查询详情</a>
                    {%- endif %}
                    {%- if alert.alert_url %}
                    <a href="{{ alert.alert_url }}">规则设置</a>
                    {%- endif %}
                </td>
            </tr>
        </tbody>
    </table>
  • 英文

    <table border="1" cellpadding="8" style="width: 100%%; table-layout: fixed; border-collapse: collapse; border-color: #bbb;">
        <tbody>
            <tr>
                <th scope="row" style="width: 120px;">Project</th>
                <td>{{ alert.project }}</td>
            </tr>
            <tr>
                <th scope="row" >Alert Name</th>
                <td>{{ alert.alert_name }}</td>
            </tr>
            <tr>
                <th scope="row">Fire Time</th>
                <td>{{ alert.fire_time | format_date }}</td>
            </tr>
            <tr>
                <th scope="row">Alert Time</th>
                <td>{{ alert.alert_time | format_date }}</td>
            </tr>
            <tr>
                <th scope="row">Status</th>
                <td>{{ alert.status | format_status }}</td>
            </tr>
            <tr>
                <th scope="row">Severity</th>
                <td>{{ alert.severity | format_severity }}</td>
            </tr>
            <tr>
                <th scope="row">Labels</th>
                <td>{{ alert.labels | to_list }}</td>
            </tr>
            <tr>
                <th scope="row">Annotations</th>
                <td>{{ alert.annotations | annotations_to_list }}</td>
            </tr>
            <tr>
                <th scope="row">Actions</th>
                <td>
                    {%- if alert.dashboard_url %}
                    <a href="{{ alert.dashboard_url }}">Dashboard</a>
                    {%- endif %}
                    {%- if alert.query_url %}
                    <a href="{{ alert.query_url }}">Detail</a>
                    {%- endif %}
                    {%- if alert.alert_url %}
                    <a href="{{ alert.alert_url }}">Settings</a>
                    {%- endif %}
                </td>
            </tr>
        </tbody>
    </table>

钉钉

  • 中文

    - 所属项目: {{ alert.project }}
    - 告警名称: {{ alert.alert_name }}
    - 首次触发: {{ alert.fire_time | format_date }}
    - 告警时间: {{ alert.alert_time | format_date }}
    - 告警状态: {{ alert.status | format_status }}
    - 告警严重度: {{ alert.severity | format_severity }}
    - 告警标签:
    {{ alert.labels | to_list | blockquote }}
    - 告警标注:
    {{ alert.annotations | annotations_to_list | blockquote }}
    
    {% if alert.dashboard_url -%}
    [[仪表盘]({{ alert.dashboard_url }})]
    {% endif -%}
    {% if alert.query_url -%}
    [[查询详情]({{ alert.query_url }})]
    {% endif -%}
    {% if alert.alert_url -%}
    [[规则设置]({{ alert.alert_url }})]
    {% endif -%}
  • 英文

    - Project: {{ alert.project }}
    - Alert Name: {{ alert.alert_name }}
    - Fire Time: {{ alert.fire_time | format_date }}
    - Alert Time: {{ alert.alert_time | format_date }}
    - Status: {{ alert.status | format_status }}
    - Severity: {{ alert.severity | format_severity }}
    - Labels:
    {{ alert.labels | to_list | blockquote }}
    - Annotations:
    {{ alert.annotations | annotations_to_list | blockquote }}
    
    {% if alert.dashboard_url -%}
    [[Dashboard]({{ alert.dashboard_url }})]
    {% endif -%}
    {% if alert.query_url -%}
    [[Detail]({{ alert.query_url }})]
    {% endif -%}
    {% if alert.alert_url -%}
    [[Settings]({{ alert.alert_url }})]
    {% endif -%}

企业微信

  • 中文

    - 所属项目: {{ alert.project }}
    - 告警名称: {{ alert.alert_name }}
    - 首次触发: {{ alert.fire_time | format_date }}
    - 告警时间: {{ alert.alert_time | format_date }}
    - 告警状态: {{ alert.status | format_status }}
    - 告警严重度: {{ alert.severity | format_severity }}
    - 告警标签:
    {{ alert.labels | to_list | blockquote }}
    - 告警标注:
    {{ alert.annotations | annotations_to_list | blockquote }}
    
    {% if alert.dashboard_url -%}
    [[仪表盘]({{ alert.dashboard_url }})]
    {% endif -%}
    {% if alert.query_url -%}
    [[查询详情]({{ alert.query_url }})]
    {% endif -%}
    {% if alert.alert_url -%}
    [[规则设置]({{ alert.alert_url }})]
    {% endif -%}
  • 英文

    - Project: {{ alert.project }}
    - Alert Name: {{ alert.alert_name }}
    - Fire Time: {{ alert.fire_time | format_date }}
    - Alert Time: {{ alert.alert_time | format_date }}
    - Status: {{ alert.status | format_status }}
    - Severity: {{ alert.severity | format_severity }}
    - Labels:
    {{ alert.labels | to_list | blockquote }}
    - Annotations:
    {{ alert.annotations | annotations_to_list | blockquote }}
    
    {% if alert.dashboard_url -%}
    [[Dashboard]({{ alert.dashboard_url }})]
    {% endif -%}
    {% if alert.query_url -%}
    [[Detail]({{ alert.query_url }})]
    {% endif -%}
    {% if alert.alert_url -%}
    [[Settings]({{ alert.alert_url }})]
    {% endif -%}

飞书

  • 中文

    - 所属项目: {{ alert.project }}
    - 告警名称: {{ alert.alert_name }}
    - 首次触发: {{ alert.fire_time | format_date }}
    - 告警时间: {{ alert.alert_time | format_date }}
    - 告警状态: {{ alert.status | format_status }}
    - 告警严重度: {{ alert.severity | format_severity }}
    - 告警标签:
    {{ alert.labels | to_list | blockquote }}
    - 告警标注:
    {{ alert.annotations | annotations_to_list | blockquote }}
    
    {% if alert.dashboard_url -%}
    [[仪表盘]({{ alert.dashboard_url }})]
    {% endif -%}
    {% if alert.query_url -%}
    [[查询详情]({{ alert.query_url }})]
    {% endif -%}
    {% if alert.alert_url -%}
    [[规则设置]({{ alert.alert_url }})]
    {% endif -%}
  • 英文

    - Project: {{ alert.project }}
    - Alert Name: {{ alert.alert_name }}
    - Fire Time: {{ alert.fire_time | format_date }}
    - Alert Time: {{ alert.alert_time | format_date }}
    - Status: {{ alert.status | format_status }}
    - Severity: {{ alert.severity | format_severity }}
    - Labels:
    {{ alert.labels | to_list | blockquote }}
    - Annotations:
    {{ alert.annotations | annotations_to_list | blockquote }}
    
    {% if alert.dashboard_url -%}
    [[Dashboard]({{ alert.dashboard_url }})]
    {% endif -%}
    {% if alert.query_url -%}
    [[Detail]({{ alert.query_url }})]
    {% endif -%}
    {% if alert.alert_url -%}
    [[Settings]({{ alert.alert_url }})]
    {% endif -%}

Slack

  • 中文

    - 所属项目: {{ alert.project }}
    - 告警名称: {{ alert.alert_name }}
    - 首次触发: {{ alert.fire_time | format_date }}
    - 告警时间: {{ alert.alert_time | format_date }}
    - 告警状态: {{ alert.status | format_status }}
    - 告警严重度: {{ alert.severity | format_severity }}
    - 告警标签:
    {{ alert.labels | to_list | blockquote }}
    - 告警标注:
    {{ alert.annotations | annotations_to_list | blockquote }}
    
    {% if alert.dashboard_url -%}
    [<{{ alert.dashboard_url }}|仪表盘>]
    {%- endif -%}
    {% if alert.query_url -%}
    [<{{ alert.query_url }}|查询详情>]
    {%- endif -%}
    {% if alert.alert_url -%}
    [<{{ alert.alert_url }}|规则设置>]
    {%- endif -%}
  • 英文

    - Project: {{ alert.project }}
    - Alert Name: {{ alert.alert_name }}
    - Alert Time: {{ alert.fire_time | format_date }}
    - Fire Time: {{ alert.alert_time | format_date }}
    - Status: {{ alert.status | format_status }}
    - Severity: {{ alert.severity | format_severity }}
    - Labels:
    {{ alert.labels | to_list | blockquote }}
    - Annotations:
    {{ alert.annotations | annotations_to_list | blockquote }}
    
    {% if alert.dashboard_url -%}
    [<{{ alert.dashboard_url }}|Dashboard>]
    {%- endif -%}
    {% if alert.query_url -%}
    [<{{ alert.query_url }}|Detail>]
    {%- endif -%}
    {% if alert.alert_url -%}
    [<{{ alert.alert_url }}|Settings>]
    {%- endif -%}

Webhook

{
    "aliuid": {{ alert.aliuid | quote }},
    "alert_instance_id": {{ alert.alert_instance_id | quote }},
    "alert_id": {{ alert.alert_id | quote }},
    "alert_name": {{ alert.alert_name | quote }},
    "region": {{ alert.region | quote }},
    "project": {{ alert.project | quote }},
    "alert_time": {{ alert.alert_time }},
    "fire_time": {{ alert.fire_time }},
    "resolve_time": {{ alert.resolve_time }},
    "status": {{ alert.status | quote }},
    "results": {{ alert.results | to_json }},
    "fire_results": {{ alert.fire_results | to_json }},
    "fire_results_count": {{ alert.fire_results_count }},
    "labels": {{ alert.labels | to_json }},
    "annotations": {{ alert.annotations | to_json }},
    "severity": {{ alert.severity }},
    "fingerprint": {{ alert.fingerprint | quote }}
}

消息中心

  • 中文

    <table border="1" cellpadding="8" style="width: 100%%; table-layout: fixed; border-collapse: collapse; border-color: #bbb;">
        <tbody>
            <tr>
                <th scope="row" style="width: 120px;">项目</th>
                <td>{{ alert.project }}</td>
            </tr>
            <tr>
                <th scope="row" >告警名称</th>
                <td>{{ alert.alert_name }}</td>
            </tr>
            <tr>
                <th scope="row">首次触发</th>
                <td>{{ alert.fire_time | format_date }}</td>
            </tr>
            <tr>
                <th scope="row">告警时间</th>
                <td>{{ alert.alert_time | format_date }}</td>
            </tr>
            <tr>
                <th scope="row">状态</th>
                <td>{{ alert.status | format_status }}</td>
            </tr>
            <tr>
                <th scope="row">严重度</th>
                <td>{{ alert.severity | format_severity }}</td>
            </tr>
            <tr>
                <th scope="row">标签</th>
                <td>{{ alert.labels | to_list }}</td>
            </tr>
            <tr>
                <th scope="row">标注</th>
                <td>{{ alert.annotations | annotations_to_list }}</td>
            </tr>
            <tr>
                <th scope="row">操作</th>
                <td>
                    {%- if alert.dashboard_url %}
                    <a href="{{ alert.dashboard_url }}">仪表盘</a>
                    {%- endif %}
                    {%- if alert.query_url %}
                    <a href="{{ alert.query_url }}">查询详情</a>
                    {%- endif %}
                    {%- if alert.alert_url %}
                    <a href="{{ alert.alert_url }}">规则设置</a>
                    {%- endif %}
                </td>
            </tr>
        </tbody>
    </table>
  • 英文

    <table border="1" cellpadding="8" style="width: 100%%; table-layout: fixed; border-collapse: collapse; border-color: #bbb;">
        <tbody>
            <tr>
                <th scope="row" style="width: 120px;">Project</th>
                <td>{{ alert.project }}</td>
            </tr>
            <tr>
                <th scope="row" >Alert Name</th>
                <td>{{ alert.alert_name }}</td>
            </tr>
            <tr>
                <th scope="row">Fire Time</th>
                <td>{{ alert.fire_time | format_date }}</td>
            </tr>
            <tr>
                <th scope="row">Alert Time</th>
                <td>{{ alert.alert_time | format_date }}</td>
            </tr>
            <tr>
                <th scope="row">Status</th>
                <td>{{ alert.status | format_status }}</td>
            </tr>
            <tr>
                <th scope="row">Severity</th>
                <td>{{ alert.severity | format_severity }}</td>
            </tr>
            <tr>
                <th scope="row">Labels</th>
                <td>{{ alert.labels | to_list }}</td>
            </tr>
            <tr>
                <th scope="row">Annotations</th>
                <td>{{ alert.annotations | annotations_to_list }}</td>
            </tr>
            <tr>
                <th scope="row">Actions</th>
                <td>
                    {%- if alert.dashboard_url %}
                    <a href="{{ alert.dashboard_url }}">Dashboard</a>
                    {%- endif %}
                    {%- if alert.query_url %}
                    <a href="{{ alert.query_url }}">Detail</a>
                    {%- endif %}
                    {%- if alert.alert_url %}
                    <a href="{{ alert.alert_url }}">Mute</a>
                    {%- endif %}
                </td>
            </tr>
        </tbody>
    </table>

事件总线(EventBridge)

{
    "aliuid": {{ alert.aliuid | quote }},
    "alert_instance_id": {{ alert.alert_instance_id | quote }},
    "alert_id": {{ alert.alert_id | quote }},
    "alert_name": {{ alert.alert_name | quote }},
    "region": {{ alert.region | quote }},
    "project": {{ alert.project | quote }},
    "alert_time": {{ alert.alert_time }},
    "fire_time": {{ alert.fire_time }},
    "resolve_time": {{ alert.resolve_time }},
    "status": {{ alert.status | quote }},
    "results": {{ alert.results | to_json }},
    "fire_results": {{ alert.fire_results | to_json }},
    "fire_results_count": {{ alert.fire_results_count }},
    "labels": {{ alert.labels | to_json }},
    "annotations": {{ alert.annotations | to_json }},
    "severity": {{ alert.severity }},
    "fingerprint": {{ alert.fingerprint | quote }}
}

函数计算(FC)

{
    "aliuid": {{ alert.aliuid | quote }},
    "alert_instance_id": {{ alert.alert_instance_id | quote }},
    "alert_id": {{ alert.alert_id | quote }},
    "alert_name": {{ alert.alert_name | quote }},
    "region": {{ alert.region | quote }},
    "project": {{ alert.project | quote }},
    "alert_time": {{ alert.alert_time }},
    "fire_time": {{ alert.fire_time }},
    "resolve_time": {{ alert.resolve_time }},
    "status": {{ alert.status | quote }},
    "results": {{ alert.results | to_json }},
    "fire_results": {{ alert.fire_results | to_json }},
    "fire_results_count": {{ alert.fire_results_count }},
    "labels": {{ alert.labels | to_json }},
    "annotations": {{ alert.annotations | to_json }},
    "severity": {{ alert.severity }},
    "fingerprint": {{ alert.fingerprint | quote }}
}
相关文章

创建内容模板 2025-04-22 10:52

日志服务按照内容模板中定义的内容给您发送告警内容。

默认内容模板 2025-04-22 10:52

当您所选择的内容模板中未配置通知内容时,日志服务默认使用内置的通知内容。 短信

通知内容定制 2025-04-22 10:52

日志服务支持您在配置内容模板时,定制通知内容。 使用模板变量丰富通知内容 您在配置内容模板时,可在标题或消息内容中添加模板变量。日志

内容模板语法(新版) 2025-04-22 10:52

新版告警支持两个版本的内容模板语法。本文介绍新版内容模板语法。 概述 相对于旧版的内容模

内置模板函数 2025-04-22 10:52

新版内容模板的内置函数便于您对数据进行各种操作,丰富了通知内容的格式和展示样式。本文介绍内置模板函数的语法及示例。 通用函数

内容模板变量说明(新版) 2025-04-22 10:52

本文介绍新版内容模板的变量以及引用方式。 引用方式

目录
Copyright © 2025 your company All Rights Reserved. Powered by 赛尔网络.
京ICP备14022346号-15
gongan beian 京公网安备11010802041014号