Skip to content

Message templates

The Message field of a rule, and the Subject and Message body fields of email destinations, can include both text and templates. Before Zenoss Cloud sends a message, it replaces templates with values from the context of an action:

  • The trigger that identified the conditions for the action.
  • The conditions the trigger identified.
  • The destination or destinations specified in the rule.
  • The rule itself.

Template syntax is either {{{object.property}}} or {{{destination.type.property}}}. After you enter the leading curly brackets, object names autocomplete. After the full stop character, type or property names autocomplete.

General templates

{{{clear}}}
Whether the conditions that triggered a notification have changed significantly (true) or have not changed significantly (false).
{{{id}}}
The unique identifier of an action.
{{{link}}}
An HTML-formatted link to the history page showing an action.
{{{tenant}}}
The name of your organization.
{{{tenant_domain}}}
The FQDN of your organization's Zenoss Cloud environment.
{{{tenant_link}}}
An HTML-formatted link to your organization's Zenoss Cloud environment.
{{{tenant_url}}}
An unformatted link to your organization's Zenoss Cloud environment.
{{{timestamp}}}
The date and time (UTC) at which an action was initiated.
{{{timestamp_ms}}}
The time at which an action was initiated, in milliseconds since the epoch (January 1, 1970 at 00:00:00 UTC).
{{{timestamp_since}}}
The relative time between the {{{timestamp}}} value and the time at which an action is inititated. Example format: “1h30m”.
{{{url}}}
An unformatted link to the history page showing an action.

Anomaly templates

{{{anomaly.score}}}
The value assigned to a data point on a scale of 0 to 100%.
{{{anomaly.score_raw}}}
The value assigned to a data point on a scale of 0.0 to 1.0.
{{{anomaly.timestamp}}}
The date and time (UTC) at which the anomaly occurred.
{{{anomaly.timestamp_ms}}}
The time at which the anomaly occurred, in milliseconds since the epoch (January 1, 1970 at 00:00:00 UTC).
{{{anomaly.timestamp_since}}}
The relative time between the {{{anomaly.timestamp}}} value and the time at which the anomaly occurred. Example format: “1h30m”.

Entity templates

{{{entity.id}}}
The unique identifier of an entity.
{{{entity.name}}}
The name of an entity.
{{{entity.parent}}}
The category including sub-fields for the associated entity's parent, if available.
{{{entity.smartview_link}}}
An HTML-formatted link to an entity's Smart View page.
{{{entity.smartview_url}}}
An unformatted link to an entity's Smart View page.
{{{entity.source}}}
The value of the source metadata field of an entity.
{{{entity.source-type}}}
The value of the source-type metadata field of an entity.
{{{entity.type}}}
The value of the type metadata field of an entity.

Parent entity templates

If the trigger has an associated parent entity, the same entity.* fields are available under entity.parent.*.

{{{entity.parent.id}}}
The unique identifier of an entity's parent entity.
{{{entity.parent.name}}}
The name of an entity's parent entity.
{{{entity.parent.smartview_link}}}
An HTML-formatted link to the Smart View page of an entity's parent entity.
{{{entity.parent.smartview_url}}}
An unformatted link to the Smart View page of an entity's parent entity.
{{{entity.parent.source}}}
The value of the source metadata field of an entity's parent entity.
{{{entity.parent.source-type}}}
The value of the source-type metadata field of an entity's parent entity.
{{{entity.parent.type}}}
The value of the type metadata field of an entity's parent entity.

Event templates

{{{event.acknowledged}}}
Whether an event has been acknowledged (true) or has not been acknowledged (false).
{{{event.body}}}
The text of an event.
{{{event.headline}}}
A short summary of common event types: the event's name field, if available, otherwise the summary. If the name and summary are not available, the value is "indescribable event".
{{{event.id}}}
The event identifier.
{{{event.name}}}
The event name.
{{{event.severity}}}

The event severity, one of the following values:

SEVERITY_DEFAULT Unknown at this time
SEVERITY_DEBUG By default, not severe enough to display in an events console
SEVERITY_INFO Most likely, no action is required
SEVERITY_WARNING Action may be required in the future
SEVERITY_ERROR Entity is degraded but not down
SEVERITY_WARNING Entity is down

{{{event.status}}}

The event status, one of the following values:

STATUS_DEFAULT Unknown at this time
STATUS_OPEN Known to be in progress at this time
STATUS_SUPPRESSED Should be ended
STATUS_CLOSED Known to be ended

{{{event.summary}}}
A brief description of an event.
{{{event.tenant}}}
The name of your Zenoss Cloud organization.
{{{event.timestamp}}}
The date and time (UTC) of an event.
{{{event.timestamp_ms}}}
The time at which the event occurred, in milliseconds since the epoch (January 1, 1970 at 00:00:00 UTC).
{{{event.timestamp_since}}}
The relative time between the {{{event.timestamp}}} value and the time at which the event occurred. Example format: “1h30m”.
{{{event.type}}}
A label that classifies an event.

Stale data triggers

In addition to the following stale data trigger fields, all entity and parent entity fields are available for stale data trigger notifications. Also, the metric fields are available for stale metric triggers and event fields are available for stale event triggers.

{{{trigger.stale_age}}}
The duration of the stale data. Example format: “1h30m”.
{{{trigger.query_type}}}
The type of stale data. The value is either metric (metric stale data) or event (event stale data).
{{{trigger.query}}}
The query specified in a trigger.

Maintenance templates

{{{maintenance.name}}}
The name of the maintenance window.
{{{maintenance.description}}}
The description of the maintenance window.
{{{maintenance.start_time}}}
The time the maintenance window started.
{{{maintenance.start_reason}}}
The reason the maintenance window started.
{{{maintenance.end_time}}}
The time the maintenance window ended.
{{{maintenance.end_reason}}}
The reason the maintenance window ended.
{{{maintenance.duration}}}
The duration of the maintenance window.
{{{maintenance.started_by}}}
The name of the user who started the maintenance window.
{{{maintenance.ended_by}}}
The name of the user who ended the maintenance window.
{{{maintenance.updated_by}}}
The name of the user who updated the maintenance window.
{{{maintenance.notes}}}
Notes for the maintenance window.
{{{maintenance.tags}}}
The tags associated with the maintenance window.

Destination templates

All destinations

{{{destination.description}}}
Text describing a destination.
{{{destination.link}}}
An HTML-formatted link that opens a search for a destination on the ADMIN > Actions page in Zenoss Cloud.
{{{destination.name}}}
The destination name.
{{{destination.rule_names}}}
The names of rules where a destination is used.
{{{destination.type}}}
The destination type.
{{{destination.tags}}}
The tags associated with a destination.
{{{destination.url}}}
An unformatted link that opens a search for a destination on the ADMIN > Actions page in Zenoss Cloud.

Email destinations

{{{destination.email.to}}}
The email address specified for a destination.
{{{destination.email.subject}}}
The subject line of an email message.
{{{destination.email.body}}}
The body of an email message.

ServiceNow destinations

{{{destination.servicenow.url}}}
The URL of the target ServiceNow IT Operations Management instance.
{{{destination.servicenow.description}}}
The text included in all notifications sent to a destination.

Slack destinations

{{{destination.slack.channel}}}
The name of the public channel in a Slack workspace.
{{{destination.slack.color}}}

The color to use in notifications sent to a target channel.

The color is applied to a vertical bar accompanying the message block. Standard HTML color codes are supported.

Webhook destinations

{{{destination.webhook.url}}}
The URL of a webhook receiver.

Metric templates

{{{metric.id}}}
The ID of a metric. For example, AAAAAzdkb9nEvMALcRiVb8Yrt-c=.
{{{metric.delta}}}
The calculated difference between the triggering data point and the most recent previous data point.
{{{metric.link}}}
An HTML-formatted link that opens a Smart View page with a metric pinned in the primary metric tile.
{{{metric.name}}}
The name of a metric. For example, uptime_laLoadInt5.
{{{metric.rate}}}
The calculated rate (units per second) of the triggering data point.
{{{metric.timestamp}}}
The date and time (UTC) at which a metric data point was collected.
{{{metric.timestamp_ms}}}
The time at which a metric data point was collected, in milliseconds since the epoch (January 1, 1970 at 00:00:00 UTC).
{{{metric.url}}}
An unformatted link that opens a Smart View page with the metric pinned in the primary metric tile.
{{{metric.value}}}
The metric data point value.

Trigger templates

{{{trigger.description}}}
Text describing a trigger.
{{{trigger.link}}}
An HTML-formatted link that opens a search for a trigger on the ADMIN > Actions page in Zenoss Cloud.
{{{trigger.metric}}}
The name of the metric specified in a metric threshold trigger.
{{{trigger.min_score}}}
The minimum score specified in an anomaly trigger.
{{{trigger.name}}}
The trigger name.
{{{trigger.query}}}
The query specified in a trigger.
{{{trigger.rule_names}}}
The names of rules where a trigger is used.
{{{trigger.tags}}}
The tags associated with a trigger.
{{{trigger.type}}}
The trigger type. The value is anomaly (anomaly triggers), event (event triggers) or metricThreshold (metric triggers).
{{{trigger.url}}}
An unformatted link that opens a search for a trigger on the ADMIN > Actions page in Zenoss Cloud.

Rule templates

{{{rule.description}}}
Text describing a rule.
{{{rule.destination_names}}}
The list of destinations associated with a rule.
{{{rule.enabled}}}
Whether a rule is enabled (true) or disabled (false).
{{{rule.link}}}
An HTML-formatted link that opens a search for a rule on the ADMIN > Actions page in Zenoss Cloud.
{{{rule.message}}}
The text of a rule's message.
{{{rule.name}}}
The rule name.
{{{rule.repeat}}}
Whether the repeat option is enabled (true) or not enabled (false).
{{{rule.repeat_interval}}}
The value of the repeat interval setting, in seconds.
{{{rule.send_updates}}}
Whether the send updates option is enabled (true) or not enabled (false).
{{{rule.tags}}}
The list of tags associated with a rule.
{{{rule.trigger_names}}}
The list of triggers associated with a rule.
{{{rule.url}}}
An unformatted link that opens a search for a rule on the ADMIN > Actions page in Zenoss Cloud.