This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

4 Using macros in messages

Overview

In message subjects and message text you can use macros for more efficient problem reporting.

A full list of macros supported by Zabbix is available.

Examples

Examples here illustrate how you can use macros in messages.

Example 1

Message subject:

{TRIGGER.NAME}: {TRIGGER.STATUS}

When you receive the message, the message subject will be replaced by something like:

Processor load is too high on server zabbix.zabbix.com: PROBLEM
Example 2

Message:

Processor load is: {zabbix.zabbix.com:system.cpu.load[,avg1].last(0)}

When you receive the message, the message will be replaced by something like:

Processor load is: 1.45
Example 3

Message:

Latest value: {{HOST.HOST}:{ITEM.KEY}.last(0)}
       MAX for 15 minutes: {{HOST.HOST}:{ITEM.KEY}.max(900)}
       MIN for 15 minutes: {{HOST.HOST}:{ITEM.KEY}.min(900)}

When you receive the message, the message will be replaced by something like:

Latest value: 1.45
       MAX for 15 minutes: 2.33
       MIN for 15 minutes: 1.01
Example 4

Informing about values from several hosts in a trigger expression.

Message:

Trigger: {TRIGGER.NAME}
       Trigger expression: {TRIGGER.EXPRESSION}
        
       1. Item value on {HOST.NAME1}: {ITEM.VALUE1} ({ITEM.NAME1})
       2. Item value on {HOST.NAME2}: {ITEM.VALUE2} ({ITEM.NAME2})

When you receive the message, the message will be replaced by something like:

Trigger: Processor load is too high on a local host
       Trigger expression: {Myhost:system.cpu.load[percpu,avg1].last(0)}>5 | {Myotherhost:system.cpu.load[percpu,avg1].last(0)}>5
       
       1. Item value on Myhost: 0.83 (Processor load (1 min average per core))
       2. Item value on Myotherhost: 5.125 (Processor load (1 min average per core))