1 Macros supported by location
- 1 Macros supported by location
- Overview
- Macros supported by location
- Macro details
- Action macros
- Alert macros
- Date and time macros
- Discovery macros
- Escalation macros
- Event macros
- Cause/symptom event macros
- {EVENT.CAUSE.ACK.STATUS}
- {EVENT.CAUSE.AGE}
- {EVENT.CAUSE.DATE}
- {EVENT.CAUSE.DURATION}
- {EVENT.CAUSE.ID}
- {EVENT.CAUSE.NAME}
- {EVENT.CAUSE.NSEVERITY}
- {EVENT.CAUSE.OBJECT}
- {EVENT.CAUSE.OPDATA}
- {EVENT.CAUSE.SEVERITY}
- {EVENT.CAUSE.SOURCE}
- {EVENT.CAUSE.STATUS}
- {EVENT.CAUSE.TAGS}
- {EVENT.CAUSE.TAGSJSON}
- {EVENT.CAUSE.TAGS.<tag name>}
- {EVENT.CAUSE.TIME}
- {EVENT.CAUSE.TIMESTAMP}
- {EVENT.CAUSE.UPDATE.HISTORY}
- {EVENT.CAUSE.VALUE}
- {EVENT.SYMPTOMS}
- Recovery event macros
- Event update macros
- Function macros
Overview
The macros supported by location table contains reference of all macros (built-in, expression, and user-definable) that are supported in the specific location.
If all macros from a related group are supported, then only the group name is given. Click each macro name or group name to see full details of the macros.
The macro details list contains a detailed list of all built-in macros, grouped by application area. Note that to customize macro values (for example, shorten or extract specific substrings), you can use macro functions.
Macros supported by location
| Location | Supported macros | Comments | |
|---|---|---|---|
| Action | |||
| Time period condition, Default operation step duration, Step duration | User-definable macros (global only) | A single macro has to fill the whole field; multiple macros/mix with text are not supported | |
| Notifications and commands | |||
| Trigger-based | Action macros Date/time macros {ESC.HISTORY} Event macros, Cause/symptom event macros Event update macros: {EVENT.UPDATE.HISTORY}, {EVENT.UPDATE.STATUS} Expression macro: {?EXPRESSION} {FUNCTION.VALUE} Host macros: {HOST.CONN}, {HOST.DESCRIPTION}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Target host macros (commands only) Host inventory macros Item macros (except {ITEM.STATE}, {ITEM.STATE.ERROR}) Proxy macros Trigger macros: {TRIGGER.DESCRIPTION}, {TRIGGER.EVENTS.*}, {TRIGGER.EXPRESSION}, {TRIGGER.EXPRESSION.EXPLAIN}, {TRIGGER.EXPRESSION.RECOVERY}, {TRIGGER.ID}, {TRIGGER.HOSTGROUP.NAME}, {TRIGGER.NAME}, {TRIGGER.NAME.ORIG}, {TRIGGER.NSEVERITY}, {TRIGGER.SEVERITY}, {TRIGGER.STATUS}, {TRIGGER.TEMPLATE.NAME}, {TRIGGER.URL}, {TRIGGER.URL.NAME}, {TRIGGER.VALUE} User-definable macros | See also: Using macros in messages | |
| Problem update | Action macros Date/time macros {ESC.HISTORY} Event macros, Cause/symptom event macros, Recovery event macros Event update macros: all (except {EVENT.UPDATE.NSEVERITY}, {EVENT.UPDATE.SEVERITY}) Expression macro: {?EXPRESSION} Function macros Host macros: {HOST.CONN}, {HOST.DESCRIPTION}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Target host macros (commands only) Host inventory macros Item macros (except {ITEM.STATE}, {ITEM.STATE.ERROR}) Proxy macros Trigger macros: {TRIGGER.DESCRIPTION}, {TRIGGER.EVENTS.*}, {TRIGGER.EXPRESSION}, {TRIGGER.EXPRESSION.EXPLAIN}, {TRIGGER.EXPRESSION.RECOVERY}, {TRIGGER.ID}, {TRIGGER.HOSTGROUP.NAME}, {TRIGGER.NAME}, {TRIGGER.NAME.ORIG}, {TRIGGER.NSEVERITY}, {TRIGGER.SEVERITY}, {TRIGGER.STATUS}, {TRIGGER.TEMPLATE.NAME}, {TRIGGER.URL}, {TRIGGER.URL.NAME}, {TRIGGER.VALUE} {USER.FULLNAME} User-definable macros | ||
| Problem recovery | Recovery event macros Event macros {FUNCTION.RECOVERY.VALUE} {TRIGGER.EXPRESSION.RECOVERY.EXPLAIN} | ||
| Discovery | Action macros Date/time macros Discovery macros Event macros: {EVENT.AGE}, {EVENT.DATE}, {EVENT.ID}, {EVENT.OBJECT}, {EVENT.SOURCE}, {EVENT.TIME}, {EVENT.TIMESTAMP} Target host macros (commands only) Proxy macros | ||
| Autoregistration | Action macros Date/time macros Event macros: {EVENT.AGE}, {EVENT.DATE}, {EVENT.ID}, {EVENT.OBJECT}, {EVENT.SOURCE}, {EVENT.TIME}, {EVENT.TIMESTAMP} Host macros: {HOST.HOST}, {HOST.IP}, {HOST.PORT}, {HOST.METADATA} Target host macros (commands only) Proxy macros | ||
| Service-based | Action macros Date/time macros {ESC.HISTORY} Event macros: all except {EVENT.ACK.STATUS}, {EVENT.OPDATA} Service macros User-definable macros | ||
| Service recovery | Event macros (except {EVENT.ACK.STATUS}, {EVENT.OPDATA}), Recovery event macros | ||
| Service update | Action macros Date/time macros {ESC.HISTORY} Event macros (except {EVENT.ACK.STATUS}, {EVENT.OPDATA}) Event update macros: {EVENT.UPDATE.DATE}, {EVENT.UPDATE.NSEVERITY}, {EVENT.UPDATE.SEVERITY}, {EVENT.UPDATE.STATUS}, {EVENT.UPDATE.TIME}, {EVENT.UPDATE.TIMESTAMP} Service macros User-definable macros | ||
| Internal notifications | Action macros Date/time macros {ESC.HISTORY} Event macros (except {EVENT.NSEVERITY}, {EVENT.SEVERITY}), Recovery event macros Host macros: {HOST.CONN}, {HOST.DESCRIPTION}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Host inventory macros Item macros: {ITEM.DESCRIPTION}, {ITEM.DESCRIPTION.ORIG}, {ITEM.ID}, {ITEM.KEY}, {ITEM.KEY.ORIG}, {ITEM.NAME}, {ITEM.NAME.ORIG}, {ITEM.VALUETYPE} Proxy macros | ||
| Item-based | Item macros: {ITEM.STATE}, {ITEM.STATE.ERROR} | ||
| LLD rule-based | Low-level discovery notification macros | ||
| Trigger-based | Trigger macros: {TRIGGER.DESCRIPTION}, {TRIGGER.EXPRESSION}, {TRIGGER.EXPRESSION.RECOVERY}, {TRIGGER.HOSTGROUP.NAME}, {TRIGGER.ID}, {TRIGGER.NAME}, {TRIGGER.NAME.ORIG}, {TRIGGER.NSEVERITY}, {TRIGGER.SEVERITY}, {TRIGGER.STATE}, {TRIGGER.STATE.ERROR}, {TRIGGER.TEMPLATE.NAME}, {TRIGGER.URL}, {TRIGGER.URL.NAME} User-definable macros | ||
| Alert script parameters | Alert macros User-definable macros (global only) | ||
| Connector | |||
| URL, Username, Password, Bearer token, HTTP proxy, SSL certificate, SSL key file, SSL key password field | User-definable macros (global only) | ||
| Timeout field | User-definable macros (global only) | A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| Graph name | Expression macro: {?EXPRESSION} | Only a single avg, last, max, min function with seconds as parameter (time suffixes can be used) is supported in this macro in this location. The {HOST.HOST<1-9>} macro can be used as host within the macro (see also indexed macros). Example usage: {?avg(/{HOST.HOST}/item.key,1h)} Unsupported usage: {?last(/host/item1)/last(/host/item2)} {?last(/host/item1)*10} {?count(/host/item1,5m)} | |
| Host, host prototype | |||
| Interface IP/DNS | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME} User-definable macros 1 | 1 For IP address, a single macro has to fill the whole field; multiple macros/mix with text are not supported | |
| Interface port | User-definable macros | A single macro has to fill the whole field; multiple macros/mix with text are not supported | |
| SNMP community | User-definable macros | ||
| SNMPv3 Context name, Security name, Authentication passphrase, Privacy passphrase | |||
| IPMI username, password | |||
| Item, item prototype, LLD rule | |||
| Name | User-definable macros | Not supported in LLD rule names. | |
| Description | User-definable macros | ||
| Key parameters | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} User-definable macros | The supported {HOST.*} macros will resolve to the interface that is selected for the item. When used in items without interfaces they will resolve to either the Zabbix agent, SNMP, JMX or IPMI interface of the host in this order of priority or to 'UNKNOWN' if the host does not have any interface. Macros are not supported in the item key of Zabbix trapper items. | |
| Update interval, Custom intervals, Timeout (available for supported item types), Store up to (for history/trends) fields | User-definable macros | A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| Delete lost resources, Disable lost resources fields | User-definable macros | These fields are supported for LLD rules only. A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| Preprocessing step parameters (including custom scripts), custom error-handling parameters (Set value to and Set error to fields) | User-definable macros | ||
| Filter regular expressions | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} User-definable macros | These fields are supported for LLD rules only. | |
| Override filter regular expressions | User-definable macros | These fields are supported for LLD rules only. | |
| Override operations: Update interval, History storage period, Trend storage period (for item prototypes) | User-definable macros | These fields are supported for LLD rules only. A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| Item types | |||
| Browser item parameter names and values | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Host inventory macros Item macros: {ITEM.ID}, {ITEM.KEY}, {ITEM.KEY.ORIG} User-definable macros | ||
| Script item parameter names and values | |||
| Calculated/aggregate item formula (expression constants, function parameters, item key parameters, (aggregate item only) filter conditions (host group name and tag name)) | User-definable macros | ||
| Database monitor item Username, Password, SQL query fields | User-definable macros | ||
| HTTP agent item URL, Query fields, Request body, Headers (names and values), SSL certificate file, SSL key file fields | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Item macros: {ITEM.ID}, {ITEM.KEY}, {ITEM.KEY.ORIG} User-definable macros | URLs that contain a secret macro will not work, as the macro in them will be resolved as “**” | |
| HTTP agent item HTTP Proxy field | Item macros: {ITEM.ID}, {ITEM.KEY}, {ITEM.KEY.ORIG} User-definable macros | ||
| HTTP agent item Required status codes, HTTP authentication username/password, SSL key password fields | User-definable macros | ||
| HTTP agent item Allowed hosts field | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME} User-definable macros | ||
| JMX agent item Endpoint field | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.PORT} User-definable macros | ||
| Trapper item Allowed hosts field | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP} User-definable macros | ||
| SNMP agent item SNMP OID field | User-definable macros | ||
| SSH and Telnet item script | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} User-definable macros | ||
| SSH agent item Username, Public key file, Private key file, Password fields | User-definable macros | ||
| Telnet agent item Username, Password fields | User-definable macros | ||
| Map | |||
| URL, URL name | Host macros: {HOST.CONN}, {HOST.DESCRIPTION}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} {HOSTGROUP.ID} Host inventory macros Map macros {TRIGGER.ID} | ||
| Element label | Expression macro: {?EXPRESSION} 1 Host macros: {HOST.CONN}, {HOST.DESCRIPTION}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} {HOSTGROUP.ID} Host inventory macros Map macros Trigger macros: {TRIGGER.EVENTS.*}, {TRIGGER.ID}, {TRIGGER.PROBLEM.EVENTS.*}, {TRIGGERS.ACK}, {TRIGGERS.PROBLEM.ACK}, {TRIGGERS.PROBLEM.UNACK}, {TRIGGERS.UNACK} | 1 Only a single avg, last, max, min function with seconds as parameter (time suffixes can be used) is supported in this macro in this location. The {HOST.HOST<1-9>} macro can be used as host within the macro. Example usage: {?avg(/{HOST.HOST}/item.key,1h)} Unsupported usage: {?last(/host/item1)/last(/host/item2)} {?last(/host/item1)*10} {?count(/host/item1,5m)} | |
| Link label | Expression macro: {?EXPRESSION} 1 | ||
| Shape label | Expression macro: {?EXPRESSION} 1 | ||
| Text field in map shapes | {MAP.NAME} | ||
| Network discovery | |||
| Update interval field | User-definable macros (global only) | A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| SNMP community, SNMP OID fields | User-definable macros (global only) | ||
| SNMPv3 Context name, Security name, Authentication passphrase, Privacy passphrase fields | |||
| Proxy | |||
| Address for active agents > Port (if the proxy belongs to a group) For passive proxy mode: interface Address and Port fields Timeouts for item types fields in override mode | User-definable macros (global only) | A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| Proxy group | |||
| Failover period, Minimum number of proxies fields | User-definable macros (global only) | A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| Scripts | |||
| Commands, confirmation text (Type: script, manual host action) | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.ID} 1, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Host inventory macros 2 {MANUALINPUT} Username macros User-definable macros | 1 Confirmation text only 2 Supported for Zabbix server and Zabbix proxy | |
| Commands (Type: script, manual event action) | Date/time macros Event macros, Cause/symptom event macros, Recovery event macros (if recovery took place) Event update macros: {EVENT.UPDATE.HISTORY}, {EVENT.UPDATE.STATUS} {FUNCTION.VALUE} Host macros: {HOST.CONN}, {HOST.DESCRIPTION}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Host inventory macros Item macros (except {ITEM.STATE}, {ITEM.STATE.ERROR}) {MANUALINPUT} Proxy macros Trigger macros: {TRIGGER.DESCRIPTION}, {TRIGGER.EVENTS.*}, {TRIGGER.EXPRESSION}, {TRIGGER.EXPRESSION.EXPLAIN}, {TRIGGER.EXPRESSION.RECOVERY}, {TRIGGER.EXPRESSION.RECOVERY.EXPLAIN}, {TRIGGER.HOSTGROUP.NAME}, {TRIGGER.ID}, {TRIGGER.NAME}, {TRIGGER.NAME.ORIG}, {TRIGGER.NSEVERITY}, {TRIGGER.SEVERITY}, {TRIGGER.STATUS}, {TRIGGER.TEMPLATE.NAME}, {TRIGGER.URL}, {TRIGGER.URL.NAME}, {TRIGGER.VALUE} Username macros User-definable macros | ||
| Confirmation text (Type: script, manual event action) | Event macros: {EVENT.ID}, {EVENT.NAME}, {EVENT.NSEVERITY}, {EVENT.SEVERITY}, {EVENT.STATUS}, {EVENT.VALUE} Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Host inventory macros {MANUALINPUT} Username macros User-definable macros | ||
| URL, confirmation text (Type: URL, manual host/event action) | |||
| Tag name and value | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Host inventory macros Item macros: {ITEM.LASTVALUE*}, {ITEM.LOG.*}, {ITEM.VALUE*} Trigger macros: {TRIGGER.ID} (trigger tag value only) User-definable macros | Tag name and value macros are resolved during the event generation process only. | |
| Trigger | |||
| Name | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Item macros: {ITEM.LASTVALUE*}, {ITEM.LOG.*}, {ITEM.VALUE*} Positional macros/references: $1...$9 User-definable macros |
||
| Event name | Date/time macros: {TIME}, {TIMESTAMP} Expression macro: {?EXPRESSION} Function macros Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Item macros: {ITEM.LASTVALUE*}, {ITEM.LOG.*}, {ITEM.VALUE*} Trigger macros: {TRIGGER.EXPRESSION.EXPLAIN} | ||
| Operational data | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Item macros: {ITEM.LASTVALUE*}, {ITEM.LOG.*}, {ITEM.VALUE*} User-definable macros | ||
| Expression | {TRIGGER.VALUE} User-definable macros 1 | 1 Only in constants and function parameters; secret macros are not supported | |
| Tag for matching, Menu entry name, Menu entry URL fields | User-definable macros | URLs that contain a secret macro will not work, as the macro in them will be resolved as “**”. | |
| Description | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Item macros: {ITEM.LASTVALUE*}, {ITEM.LOG.*}, {ITEM.VALUE*} User-definable macros | ||
| URL | {EVENT.ID} Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Item macros: {ITEM.LASTVALUE*}, {ITEM.LOG.*}, {ITEM.VALUE*} {TRIGGER.ID} | ||
| User parameter commands | Positional macros/references: $1...$9 |
||
| Web scenario | |||
| Name, Agent, HTTP proxy fields | User-definable macros | ||
| Update interval field | User-definable macros | A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| Variables, Headers, SSL certificate, SSL key file fields | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} User-definable macros | ||
| User, Password, SSL key password fields | User-definable macros | ||
| Web scenario step Name, Variables (values only) fields | User-definable macros | ||
| Web scenario step Timeout, Required status codes fields | User-definable macros | A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| Web scenario step URL, Headers (names and values), Required string fields | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} User-definable macros | ||
| Web scenario step Post field | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} | ||
| Webhook media type | |||
| Parameter values | Alert macros All macros supported in trigger-based problem notifications (see above) | A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| JavaScript script, JavaScript script parameter name | User-definable macros (global only) | ||
| Menu entry name, Menu entry URL | {EVENT.TAGS.<tag name>} | ||
| Widgets | |||
| Gauge widget Description field | Host macros: {HOST.CONN}, {HOST.DESCRIPTION}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Host inventory macros Item macros (except {ITEM.STATE.ERROR}) User-definable macros (global only) | ||
| Honeycomb widget Primary/secondary label field | |||
| Item value widget Description field | |||
| Top hosts widget Text data column | Host macros: {HOST.CONN}, {HOST.DESCRIPTION}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} Host inventory macros User-definable macros (global only) | ||
| URL (Dynamic) widget URL field | Host macros: {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.ID}, {HOST.IP}, {HOST.NAME}, {HOST.PORT} User-definable macros | ||
| Other locations | |||
| Working time field | User-definable macros (global only) | A single macro has to fill the whole field; multiple macros/mix with text are not supported. | |
| Timeouts for item types field (global setting) | |||
| User media When active field | |||
| Email media type Username, Password fields | User-definable macros (global only) | Secret macros are recommended. | |
| Scheduled reports Subject, Message fields | Date/time macros: {TIME}, {TIMESTAMP} |
Macro details
This list contains details for each built-in macro grouped by application area:
- Action macros
- Alert macros
- Date/time macros
- Discovery macros
- Event macros
- Event update macros
- Cause/symptom event macros
- Recovery event macros
- Escalation macros
- Function macros
- Host macros
- Target host macros
- Host group macros
- Host inventory macros
- Item macros
- Low-level discovery notification macros
- Map macros
- Proxy macros
- Script macros
- Service macros
- Trigger macros
- Username macros
Action macros
{ACTION.ID}
The numeric ID of the triggered action.
{ACTION.NAME}
The name of the triggered action.
Alert macros
{ALERT.MESSAGE}
The Default message value from action configuration.
{ALERT.SENDTO}
The Send to value from user media configuration.
{ALERT.SUBJECT}
The Default subject value from action configuration.
Date and time macros
{DATE}
The current date in yyyy.mm.dd format.
{TIME}
The current time in hh:mm:ss format.
{TIMESTAMP}
The current time in UNIX timestamp format.
Discovery macros
{DISCOVERY.DEVICE.IPADDRESS}
The IP address of the discovered device. Available always, does not depend on host being added.
{DISCOVERY.DEVICE.DNS}
The DNS name of the discovered device. Available always, does not depend on host being added.
{DISCOVERY.DEVICE.STATUS}
The status of the discovered device (UP/DOWN).
{DISCOVERY.DEVICE.UPTIME}
The time since the last change of discovery status for a particular device. For example: 1h 29m 01s. For devices with status DOWN, this is the period of their downtime.
{DISCOVERY.RULE.NAME}
The name of the discovery rule that discovered the presence or absence of device/service.
{DISCOVERY.SERVICE.NAME}
The name of the discovered service. For example: HTTP.
{DISCOVERY.SERVICE.PORT}
The port of the discovered service. For example: 80.
{DISCOVERY.SERVICE.STATUS}
The status of the discovered service (UP/DOWN).
{DISCOVERY.SERVICE.UPTIME}
The time since the last change of discovery status for a particular service. For example: 1h 29m 01s. For services with status DOWN, this is the period of their downtime.
Escalation macros
{ESC.HISTORY}
The log of previously sent notifications, their escalation step and status (sent, in progress or failed).
Event macros
{EVENT.ACK.STATUS}
The acknowledgment status of the event (Yes/No).
{EVENT.AGE}
The age of the event that triggered an action, with precision down to a second. Useful in escalated messages. For example: 9m 13s.
{EVENT.DATE}
The date of the event that triggered an action in yyyy.mm.dd format.
For example: 2025.04.14.
{EVENT.DURATION}
The duration of the event (time difference between problem and recovery events), with precision down to a second. Useful in problem recovery messages.
{EVENT.ID}
The numeric ID of the event that triggered an action.
{EVENT.NAME}
The name of the event that triggered an action.
{EVENT.NSEVERITY}
The numeric value of the event severity. Possible values: 0 - Not classified, 1 - Information, 2 - Warning, 3 - Average, 4 - High, 5 - Disaster.
{EVENT.OBJECT}
The numeric value of the event object. Possible values: 0 - Trigger, 1 - Discovered host, 2 - Discovered service, 3 - Autoregistration, 4 - Item, 5 - Low-level discovery rule.
{EVENT.OPDATA}
The operational data of the underlying trigger of the problem.
{EVENT.SEVERITY}
The name of the event severity.
{EVENT.SOURCE}
The numeric value of the event source. Possible values: 0 - Trigger, 1 - Discovery, 2 - Autoregistration, 3 - Internal, 4 - Service.
{EVENT.STATUS}
The verbal value of the event that triggered an action.
{EVENT.TAGS}
A comma-separated list of event tags. Expanded to an empty string if no tags exist.
{EVENT.TAGSJSON}
A JSON array containing event tag objects. Expanded to an empty array if no tags exist.
{EVENT.TAGS.<tag name>}
The event tag value referenced by the tag name. A tag name containing non-alphanumeric characters (including non-English multibyte-UTF characters) must be double quoted. Quotes and backslashes inside a quoted tag name must be escaped with a backslash.
{EVENT.TIME}
The time of the event that triggered an action in hh:mm:ss format.
For example: 12:57:53.
{EVENT.TIMESTAMP}
The UNIX timestamp of the event that triggered an action.
{EVENT.VALUE}
The numeric value of the event that triggered an action. Possible values: 1 - problem, 0 - recovering.
Cause/symptom event macros
{EVENT.CAUSE.ACK.STATUS}
The acknowledgment status of the cause event (Yes/No). Used in the context of a symptom event.
{EVENT.CAUSE.AGE}
The age of the cause event, with precision down to a second. Useful in escalated messages. Used in the context of a symptom event.
{EVENT.CAUSE.DATE}
The date of the cause event in yyyy.mm.dd format.
Used in the context of a symptom event.
{EVENT.CAUSE.DURATION}
The duration of the cause event (time difference between problem and recovery events), with precision down to a second. Useful in problem recovery messages. Used in the context of a symptom event.
{EVENT.CAUSE.ID}
The numeric ID of the cause event. Used in the context of a symptom event.
{EVENT.CAUSE.NAME}
The name of the cause event. Used in the context of a symptom event.
{EVENT.CAUSE.NSEVERITY}
The numeric value of the cause event severity. Possible values: 0 - Not classified, 1 - Information, 2 - Warning, 3 - Average, 4 - High, 5 - Disaster. Used in the context of a symptom event.
{EVENT.CAUSE.OBJECT}
The numeric value of the cause event object. Possible values: 0 - Trigger, 1 - Discovered host, 2 - Discovered service, 3 - Autoregistration, 4 - Item, 5 - Low-level discovery rule. Used in the context of a symptom event.
{EVENT.CAUSE.OPDATA}
The operational data of the underlying trigger of the cause problem. Used in the context of a symptom event.
{EVENT.CAUSE.SEVERITY}
The name of the cause event severity. Possible values: Not classified, Information, Warning, Average, High, Disaster. Used in the context of a symptom event.
{EVENT.CAUSE.SOURCE}
The numeric value of the cause event source. Possible values: 0 - Trigger, 1 - Discovery, 2 - Autoregistration, 3 - Internal. Used in the context of a symptom event.
{EVENT.CAUSE.STATUS}
The verbal value of the cause event. Used in the context of a symptom event.
{EVENT.CAUSE.TAGS}
A comma-separated list of cause event tags. Expanded to an empty string if no tags exist. Used in the context of a symptom event.
{EVENT.CAUSE.TAGSJSON}
A JSON array containing cause event tag objects. Expanded to an empty array if no tags exist. Used in the context of a symptom event.
{EVENT.CAUSE.TAGS.<tag name>}
The cause event tag value referenced by the tag name. A tag name containing non-alphanumeric characters (including non-English multibyte-UTF characters) must be double quoted. Quotes and backslashes inside a quoted tag name must be escaped with a backslash. Used in the context of a symptom event.
{EVENT.CAUSE.TIME}
The time of the cause event in hh:mm:ss format.
Used in the context of a symptom event.
{EVENT.CAUSE.TIMESTAMP}
The UNIX timestamp of the cause event. Used in the context of a symptom event.
{EVENT.CAUSE.UPDATE.HISTORY}
The log of cause problem updates (acknowledgments, etc). Used in the context of a symptom event.
{EVENT.CAUSE.VALUE}
The numeric value of the cause event Possible values: 1 - Problem, 0 - Recovering. Used in the context of a symptom event.
{EVENT.SYMPTOMS}
The list of symptom events. Includes the following details: host name, event name, severity, age, service tags and values. This macro is used in the context of the cause event and returns information about symptom events.
Recovery event macros
{EVENT.RECOVERY.DATE}
The date of the recovery event in yyyy.mm.dd format.
{EVENT.RECOVERY.ID}
The numeric ID of the recovery event.
{EVENT.RECOVERY.NAME}
The name of the recovery event.
{EVENT.RECOVERY.STATUS}
The verbal value of the recovery event.
{EVENT.RECOVERY.TAGS}
A comma-separated list of recovery event tags. Expanded to an empty string if no tags exist.
{EVENT.RECOVERY.TAGSJSON}
A JSON array containing recovery event tag objects. Expanded to an empty array if no tags exist.
{EVENT.RECOVERY.TIME}
The time of the recovery event in hh:mm:ss format.
{EVENT.RECOVERY.TIMESTAMP}
The UNIX timestamp of the recovery event.
{EVENT.RECOVERY.VALUE}
The numeric value of the recovery event.
Event update macros
{EVENT.UPDATE.ACTION}
Human-readable name of the action(s) performed during problem update. Resolves to the following values: acknowledged, unacknowledged, commented, changed severity from (original severity) to (updated severity) and closed (depending on how many actions are performed in one update).
{EVENT.UPDATE.ACTIONJSON}
A JSON array containing details of the action(s) performed during problem update.
Possible JSON property values:
- true (for acknowledge, unacknowledge, close, unsuppress, cause, and symptom properties);
- <message string> (for message property);
- timestamp (for suppress_until and timestamp properties) or 0 (for suppress_until property if suppressed indefinitely);
- 0, 1, 2, 3, 4, 5 (for old and new severity properties).
For example: {“acknowledge”:true,“message”:“Monthly maintenance.”,“severity”:{“old”:2,“new”:1},“suppress_until”:1730851199,“timestamp”:1730822048}
{EVENT.UPDATE.DATE}
The date of the event update (acknowledgment, etc) in yyyy.mm.dd format.
{ACK.DATE} is deprecated and may not resolve in supported locations.
{EVENT.UPDATE.HISTORY}
The log of problem updates (acknowledgments, etc).
{EVENT.ACK.HISTORY} is deprecated and may not resolve in supported locations.
{EVENT.UPDATE.MESSAGE}
The problem update message.
{ACK.MESSAGE} is deprecated and may not resolve in supported locations.
{EVENT.UPDATE.NSEVERITY}
The numeric value of the new event severity set during problem update operation.
{EVENT.UPDATE.SEVERITY}
The name of the new event severity set during problem update operation.
{EVENT.UPDATE.STATUS}
The Numeric value of the problem update status. Possible values: 0 - Webhook was called because of problem/recovery event, 1 - Update operation.
{EVENT.UPDATE.TIME}
The time of the event update (acknowledgment, etc) in hh:mm:ss format.
{ACK.TIME} is deprecated and may not resolve in supported locations.
{EVENT.UPDATE.TIMESTAMP}
The UNIX timestamp of the event update (acknowledgment, etc)
Function macros
{FUNCTION.VALUE}
The value of the Nth item-based function in the trigger expression at the time of the event. Only functions with `/h
(本文超出站点单文档体积上限,已截断)
