Updated on 2025-08-15 GMT+08:00

Configuring Message Templates

AOM allows you to customize notification content by creating message templates. When an alarm notification policy is triggered, the system sends alarm information to specified recipients through emails, SMS, voice calls, HTTP/HTTPS, Lark, WeCom, DingTalk, or WeLink.

Scenario

O&M personnel of an e-commerce platform want to use AOM's alarm center to customize alarm notifications for better troubleshooting in complex service scenarios.

Creating a Message Template

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane, choose Alarm Center > Alarm Notification.
  3. On the Message Templates tab page, click Create.

    Table 1 Parameters

    Parameter

    Description

    Example Value

    Template Name

    Message template name. Enter 1 to 100 characters. Only digits, letters, underscores (_), hyphens (-), and periods (.) are allowed. Do not start or end with an underscore, hyphen, or period.

    aom_mon

    Description

    Description of the template. Enter up to 1,024 characters. In this example, leave this parameter blank.

    -

    Template Type

    Type of the message template. Option: Prometheus monitoring or Log monitoring.

    Prometheus monitoring

    Enterprise Project

    Enterprise project.

    • If Enterprise Project is set to All on the global settings page, select an enterprise project from the drop-down list here.
    • If you have already selected an enterprise project on the global settings page, this option will be grayed and cannot be changed.

    default

    Message Header

    Default header to be added in a message.

    English

    Message Content

    -

  4. Click Confirm.

Prometheus Monitoring Message Templates

When you create a Prometheus monitoring message template, default fields are automatically filled. Notifications can be sent through emails, SMS, voice calls, HTTP/HTTPS, Lark, WeCom, DingTalk, and WeLink.

Table 2 Variables in Prometheus monitoring message templates

Variable

Description

Definition

Alarm Name/Name/Alarm Rule Name

Name of the alarm rule that is triggered.

${event_name_alias}

Original Rule Name

Original name of the triggered alarm rule.

${event_name}

User name

User corresponding to the triggered alarm rule.

${domain_name}

Alarm ID

ID of the alarm rule that is triggered.

${id}

Notification Rule

Name of the rule based on which a notification is sent.

${action_rule}

Occurred

Time when the alarm or event is triggered.

${starts_at}

Severity/Alarm Severity/Event Severity

Alarm or event severity. Options: Critical, Major, Minor, and Warning.

${event_severity}

Alarm Info

Detailed alarm information.

${alarm_info}

Resource Identifier

Resource for which the alarm or event is triggered.

${resources_new}

Suggestion

Suggestion on handing the alarm. For non-custom reporting, "NA" is displayed.

${alarm_fix_suggestion_zh}

Notification Type

Type of the sent alarm notification.

${event_type}

Source

Source that triggers the event.

$event.metadata.resource_provider

Resource Type

Type of the resource that triggers the alarm or event.

$event.metadata.resource_type

Possible Cause

Possible cause of the alarm or event.

${alarm_probableCause_zh}

Additional Info

Additional information/message of the triggered alarm rule.

${message}

Report Type

Report type of the triggered alarm rule.

${clear_type}

Area Name

Name of the area where the alarm or event is triggered.

${region_name}

Alarm Source

Alarm source that triggers the alarm.

${resource_provider}

Resource Type

Type of the resource that triggers the alarm or event.

${resource_type}

Resources

Resource that triggers the alarm or event.

${resources}

Notes

Notes about the triggered alarm rule.

${annotation}

Log Source

Log source that triggers the alarm or event.

${ltsResource}

current_data

Latest value of the metric that triggers the alarm or event.

${current_data}

TMS Tag

The TMS Tag: $event.annotations.tms_tags variable in the message template takes effect only after TMS Tag Display under Global Configuration has been enabled.

$event.annotations.tms_tags

Custom tag

Extended tag.

$event.metadata.key1

Custom annotation

Extended annotation.

$event.annotations.key2

Log Monitoring Message Templates

Table 3 Variables in log monitoring message templates

Type

Variable

Definition

Remarks

-

Original Rule Name

${event_name}

-

Severity

${event_severity}

-

Occurred

${starts_at}

-

Region

${region_name}

-

Huawei Cloud Account

${domain_name}

-

Source

$event.metadata.resource_provider

-

Resource Type

$event.metadata.resource_type

-

Resource Identifier

${resources}

-

Status

$event.annotations.alarm_status

-

Condition Expression

$event.annotations.condition_expression

-

Current Value

$event.annotations.current_value

-

Query frequency

$event.annotations.frequency

-

Rule Name

$event.annotations.alarm_rule_alias

-

Keyword variables

Query Time

$event.annotations.results[0].time

-

Query Log

$event.annotations.results[0].raw_results

-

Query URL

$event.annotations.results[0].url

-

Log Group/Stream Name

$event.annotations.results[0].resource_id

Only the original name of the log group or stream created for the first time can be added.

SQL variables

Chart 0 Log Group/Stream Name

$event.annotations.results[0].resource_id

Only the original name of the log group or stream created for the first time can be added.

Chart 0 SQL Expression

$event.annotations.results[0].sql

-

Chart 0 Query Time

$event.annotations.results[0].time

-

Chart 0 URL

$event.annotations.results[0].url

-

Chart 0 Query Log

$event.annotations.results[0].raw_results

-