Hi Yun Documents

Event Notification Template Guide

Introduction

Event notification templates in Multicloud Observability Platform allow you to customize the content of alert notifications. This guide provides an overview of the available template variables, their types, descriptions, and examples of how to use them.

Template Variables

Template variables are placeholders that get replaced with actual event data when an alert is triggered. Here is a list of common template variables:

Template VariableTypeDescription
date, timestampIntegerEvent generation time in seconds
df_date_rangeIntegerEvent time range in seconds
df_check_range_startIntegerCheck range start Unix timestamp in seconds
df_check_range_endIntegerCheck range end Unix timestamp in seconds
df_statusString (Enum)Event status: critical, error, warning, ok, notanodata
df_event_idStringEvent unique ID
df_event_linkStringEvent detail page link address
df_dimension_tagsStringEvent dimension tags, e.g., {host:"web-001"}
df_monitor_idStringAlarm policy ID
df_monitor_nameStringAlarm policy name
df_monitor_checker_idStringMonitor ID
df_monitor_checker_nameStringMonitor name
df_monitor_checker_valueStringValue checked by the monitor
df_monitor_checker_event_refStringMonitor-Event reference key
df_fault_idStringFault ID, value of the first failure event's df_event_id
df_fault_statusString (Enum)Fault status: ok, fault
df_fault_start_timeIntegerFault start Unix timestamp in seconds
df_fault_durationIntegerFault duration in seconds
df_user_idStringUser ID of manual event recovery
df_user_nameStringUser name of manual event recovery
df_user_emailStringUser email of manual event recovery
df_crontab_exec_modeString (Enum)Execution mode of the monitor: crontab, manual
df_site_nameStringMulticloud Observability Platform site or node name
df_workspace_nameStringCurrent workspace name
df_workspace_uuidStringCurrent workspace ID
df_labelListLabel list of the monitor
df_label[#]StringEach label of the monitor
df_check_conditionDictCheck condition met
df_check_condition.operatorStringOperator of the check condition met, e.g., >, >=, etc.
df_check_condition.operandsListOperand list of the check condition met
df_check_condition.operands[#]Integer, FloatEach operand of the check condition met
ResultInteger, FloatInstrumented value detected when the event was generated
{Key-values in df_dimension_tags}StringKey-values in df_dimension_tags abstracted here
df_eventDictEntire event data

Template Variables Example

Suppose there is a monitor with by option configured with region and host, and the template is shown below:

Event name:

Monitor {{ df_monitor_checker_name }} found a fault with {{ df_dimension_tags }}

Event content:

- Region: {{ region }}
- Host: {{ host }}
- Status: {{ df_status }}
- Result: {{ Result }}
- Monitor: {{ df_monitor_checker_name }} (Alarm policy: {{ df_monitor_name }})

Then, once an error event occurs, the rendered output is shown below:

Output event name:

Monitor monitor001 found a fault with {"region":"southeastasia", "host":"web-001"}

Output event content:

- Region: southeastasia
- Host: web-001
- Status: error
- Result: 90.12345
- Monitor: monitor001 (Alarm policy: Team001)

Fields Containing Special Characters

In some cases, the dimension tag key may contain special characters such as -, @, etc., e.g., host-name, @level.

According to the template syntax, such field names can't be used as normal variable names, resulting in rendering failure.

In this case, {{ df_event['host-name'] }}, {{ df_event['@level'] }} can be used instead of {{ host-name }}, {{ @level }}.

@2025 All rights reserved. Produced by First Wave Technology.