Zabbix Documentation 3.4

3.04.04.24.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.4Guidelines

User Tools

Site Tools


manual:appendix:macros:supported_by_location

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:appendix:macros:supported_by_location [2017/12/04 13:52]
natalja.cernohajeva Removed 11 bookmark, {EVENT.VALUE} description added, Added "Trigger-based notifications and commands, Discovery notifications, Auto-registration notifications" instead of 11 footnote for convenience
manual:appendix:macros:supported_by_location [2019/01/18 08:31] (current)
martins-v fixing some formatting issues
Line 1: Line 1:
-==== 1 Macros supported by location ​====+==== 1 Supported macros ​====
  
 === Overview === === Overview ===
  
 The table contains a complete list of macros supported by Zabbix. The table contains a complete list of macros supported by Zabbix.
 +
 +<note tip>To see all macros supported in a location (for example, in "map URL"), you may paste the location name into the search box at the bottom of your browser window (accessible by pressing CTRL+F) and do a search for //​next//​.</​note>​
  
 ^Macro ​ ^Supported in  ^Description ​ | ^Macro ​ ^Supported in  ^Description ​ |
Line 30: Line 32:
 |{EVENT.DATE} ​                          ​|->​ Trigger-based notifications and commands\\ -> Discovery notifications\\ ​ -> Auto-registration notifications\\ ​ -> Internal notifications ​ |//Date of the event that triggered an action.// ​ | |{EVENT.DATE} ​                          ​|->​ Trigger-based notifications and commands\\ -> Discovery notifications\\ ​ -> Auto-registration notifications\\ ​ -> Internal notifications ​ |//Date of the event that triggered an action.// ​ |
 |{EVENT.ID} ​                            ​|->​ Trigger-based notifications and commands\\ -> Discovery notifications\\ ​ -> Auto-registration notifications\\ ​ -> Internal notifications ​ |//Numeric ID of the event that triggered an action.// ​ | |{EVENT.ID} ​                            ​|->​ Trigger-based notifications and commands\\ -> Discovery notifications\\ ​ -> Auto-registration notifications\\ ​ -> Internal notifications ​ |//Numeric ID of the event that triggered an action.// ​ |
-|{EVENT.RECOVERY.DATE} ​                 |-> Trigger-based notifications ​and commands\\ -> Internal notifications ​ |//Date of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only.\\ Supported since 2.2.0. ​ | +|{EVENT.RECOVERY.DATE} ​                 |-> Trigger-based notifications \\ -> Internal notifications ​ |//Date of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only.\\ Supported since 2.2.0. ​ | 
-|{EVENT.RECOVERY.ID} ​                   |-> Trigger-based notifications ​and commands\\ -> Internal notifications ​ |//Numeric ID of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only. Supported since 2.2.0. ​ | +|{EVENT.RECOVERY.ID} ​                   |-> Trigger-based notifications \\ -> Internal notifications ​ |//Numeric ID of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only. Supported since 2.2.0. ​ | 
-|{EVENT.RECOVERY.STATUS} ​               |-> Trigger-based notifications ​and commands\\ -> Internal notifications ​ |//Verbal value of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only. Supported since 2.2.0. ​ |+|{EVENT.RECOVERY.STATUS} ​               |-> Trigger-based notifications \\ -> Internal notifications ​ |//Verbal value of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only. Supported since 2.2.0. ​ |
 |{EVENT.RECOVERY.TAGS} ​                          ​|->​ Trigger-based notifications and commands ​ |//A comma separated list of recovery event tags.// Expanded to an empty string if no tags exist.\\ Supported since 3.2.0. ​ | |{EVENT.RECOVERY.TAGS} ​                          ​|->​ Trigger-based notifications and commands ​ |//A comma separated list of recovery event tags.// Expanded to an empty string if no tags exist.\\ Supported since 3.2.0. ​ |
-|{EVENT.RECOVERY.TIME} ​                 |-> Trigger-based notifications ​and commands\\ -> Internal notifications ​ |//Time of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only.\\ Supported since 2.2.0. ​ | +|{EVENT.RECOVERY.TIME} ​                 |-> Trigger-based notifications\\ -> Internal notifications ​ |//Time of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only.\\ Supported since 2.2.0. ​ | 
-|{EVENT.RECOVERY.VALUE} ​                ​|->​ Trigger-based notifications ​and commands\\ -> Internal notifications ​ |//Numeric value of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only.\\ Supported since 2.2.0. ​ |+|{EVENT.RECOVERY.VALUE} ​                ​|->​ Trigger-based notifications\\ -> Internal notifications ​ |//Numeric value of the recovery event.//\\ Can be used in [[manual:​config:​notifications:​action#​configuring_an_action|recovery]] messages only.\\ Supported since 2.2.0. ​ |
 |{EVENT.STATUS} ​                        ​|->​ Trigger-based notifications and commands\\ -> Discovery notifications\\ ​ -> Auto-registration notifications\\ ​ -> Internal notifications ​ |//Verbal value of the event that triggered an action.//\\ Supported since 2.2.0. ​ | |{EVENT.STATUS} ​                        ​|->​ Trigger-based notifications and commands\\ -> Discovery notifications\\ ​ -> Auto-registration notifications\\ ​ -> Internal notifications ​ |//Verbal value of the event that triggered an action.//\\ Supported since 2.2.0. ​ |
 |{EVENT.TAGS} ​                          ​|->​ Trigger-based notifications and commands ​ |//A comma separated list of event tags.// Expanded to an empty string if no tags exist.\\ Supported since 3.2.0. ​ | |{EVENT.TAGS} ​                          ​|->​ Trigger-based notifications and commands ​ |//A comma separated list of event tags.// Expanded to an empty string if no tags exist.\\ Supported since 3.2.0. ​ |
Line 124: Line 126:
 |{ITEM.KEY[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                       |-> Trigger-based notifications\\ -> Internal notifications ​ |//Key of the Nth item in the trigger expression that caused a notification.//​ Supported since 2.0.0.\\ ''​{TRIGGER.KEY}''​ is deprecated.| |{ITEM.KEY[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                       |-> Trigger-based notifications\\ -> Internal notifications ​ |//Key of the Nth item in the trigger expression that caused a notification.//​ Supported since 2.0.0.\\ ''​{TRIGGER.KEY}''​ is deprecated.|
 |{ITEM.KEY.ORIG[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                  ​|->​ Trigger-based notifications\\ -> Internal notifications ​ |//Original key (with macros not expanded) of the Nth item in the trigger expression that caused a notification.//​ Supported since 2.0.6.| |{ITEM.KEY.ORIG[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                  ​|->​ Trigger-based notifications\\ -> Internal notifications ​ |//Original key (with macros not expanded) of the Nth item in the trigger expression that caused a notification.//​ Supported since 2.0.6.|
-|{ITEM.LASTVALUE[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                 |-> Trigger-based notifications\\ -> Trigger names and descriptions\\ -> Event tags and values ​ |//The latest value of the Nth item in the trigger expression that caused a notification.//​\\ It will resolve to *UNKNOWN* in the frontend if the latest history value has been collected more than the //​ZBX_HISTORY_PERIOD//​ time ago (defined in [[:​manual/​web_interface/​definitions|defines.inc.php]]).\\ Supported since 1.4.3. It is alias to ''​{{HOST.HOST}:​{ITEM.KEY}.last()}''​\\ \\ [[:​manual/​config/​macros/​macro_functions|Customizing]] the macro value is supported for this macro; starting with Zabbix 3.2.0. ​ |+|{ITEM.LASTVALUE[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                 |-> Trigger-based notifications\\ -> Trigger names and descriptions\\ -> Event tags and values ​ |//The latest value of the Nth item in the trigger expression that caused a notification.//​\\ It will resolve to *UNKNOWN* in the frontend if the latest history value has been collected more than the //​ZBX_HISTORY_PERIOD//​ time ago (defined in [[:​manual/​web_interface/​definitions|defines.inc.php]]).\\ Supported since 1.4.3. It is alias to ''​%%{{%%HOST.HOST}:​{ITEM.KEY}.last()}''​\\ \\ [[:​manual/​config/​macros/​macro_functions|Customizing]] the macro value is supported for this macro; starting with Zabbix 3.2.0. ​ |
 |{ITEM.LOG.AGE[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                   |-> Trigger-based notifications ​ |//Age of the log item event.// ​ | |{ITEM.LOG.AGE[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                   |-> Trigger-based notifications ​ |//Age of the log item event.// ​ |
 |{ITEM.LOG.DATE[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                  ​|->​ Trigger-based notifications ​ |//Date of the log item event.// ​  | |{ITEM.LOG.DATE[[supported_by_location#​indexed_macros|<​1-9>​]]} ​                  ​|->​ Trigger-based notifications ​ |//Date of the log item event.// ​  |
Line 173: Line 175:
 |{TRIGGERS.PROBLEM.ACK} ​                ​|->​ Icon labels in maps<​sup>​[[supported_by_location#​footnotes|1]]</​sup> ​ |//Number of acknowledged PROBLEM triggers for a map element.//​\\ A trigger is considered to be acknowledged if all of it's PROBLEM events are acknowledged.\\ Supported since 1.8.3.| |{TRIGGERS.PROBLEM.ACK} ​                ​|->​ Icon labels in maps<​sup>​[[supported_by_location#​footnotes|1]]</​sup> ​ |//Number of acknowledged PROBLEM triggers for a map element.//​\\ A trigger is considered to be acknowledged if all of it's PROBLEM events are acknowledged.\\ Supported since 1.8.3.|
 |{USER.FULLNAME} ​                       |-> Acknowledgement notifications ​ |//Name and surname of the user// who added event acknowledgement.\\ Supported since 3.4.0. ​ | |{USER.FULLNAME} ​                       |-> Acknowledgement notifications ​ |//Name and surname of the user// who added event acknowledgement.\\ Supported since 3.4.0. ​ |
-|{host:​key.func(param)} ​                ​|->​ Trigger-based notifications\\ -> Icon/shape labels in maps<​sup>​[[supported_by_location#​footnotes|1]]</​sup>​ <​sup>​[[supported_by_location#​footnotes|4]]</​sup>​\\ -> Link labels in maps\\ -> Graph names<​sup>​[[supported_by_location#​footnotes|7]]</​sup>​\\ -> Trigger expressions<​sup>​[[supported_by_location#​footnotes|9]]</​sup> ​ |//Simple macros, as used in building trigger [[manual:​config:​triggers:​expression|expressions]]//​.\\ \\ Supported for shape labels in maps since 3.4.2. ​ |+|{host:​key.func(param)} ​                ​|->​ Trigger-based notifications\\ -> Icon/shape labels in maps<​sup>​[[supported_by_location#​footnotes|1]]</​sup>​ <​sup>​[[supported_by_location#​footnotes|4]]</​sup>​\\ -> Link labels in maps<​sup>​[[supported_by_location#​footnotes|4]]</​sup>​\\ -> Graph names<​sup>​[[supported_by_location#​footnotes|7]]</​sup>​\\ -> Trigger expressions<​sup>​[[supported_by_location#​footnotes|9]]</​sup> ​ |//Simple macros, as used in building trigger [[manual:​config:​triggers:​expression|expressions]]//​.\\ \\ Supported for shape labels in maps since 3.4.2. ​ |
 |{$MACRO} ​                              ​|->​ See: [[:​manual/​appendix/​macros/​supported_by_location_user|User macros supported by location]] ​ |//​[[:​manual/​config/​macros/​usermacros|User-definable]] macros.// ​ | |{$MACRO} ​                              ​|->​ See: [[:​manual/​appendix/​macros/​supported_by_location_user|User macros supported by location]] ​ |//​[[:​manual/​config/​macros/​usermacros|User-definable]] macros.// ​ |
 |{#​MACRO} ​                              ​|->​ See: [[:​manual/​config/​macros/​lld_macros|Low-level discovery macros]] ​ |//​Low-level discovery macros.//\\ Supported since 2.0.0. ​ | |{#​MACRO} ​                              ​|->​ See: [[:​manual/​config/​macros/​lld_macros|Low-level discovery macros]] ​ |//​Low-level discovery macros.//\\ Supported since 2.0.0. ​ |
Line 193: Line 195:
 <​sup>​**7**</​sup>​ Supported since Zabbix 2.2.0. Only the **avg**, **last**, **max** and **min** functions, with seconds as parameter are supported within this macro in graph names. The {HOST.HOST<​1-9>​} macro can be used as host within the macro. For example: <​sup>​**7**</​sup>​ Supported since Zabbix 2.2.0. Only the **avg**, **last**, **max** and **min** functions, with seconds as parameter are supported within this macro in graph names. The {HOST.HOST<​1-9>​} macro can be used as host within the macro. For example:
    * {Cisco switch:​ifAlias[{#​SNMPINDEX}].last()}    * {Cisco switch:​ifAlias[{#​SNMPINDEX}].last()}
-   * {{HOST.HOST}:​ifAlias[{#​SNMPINDEX}].last()}+   ​* ​%%{{%%HOST.HOST}:​ifAlias[{#​SNMPINDEX}].last()}
  
 <​sup>​**8**</​sup>​ Supported since 2.4.0. <​sup>​**8**</​sup>​ Supported since 2.4.0.
Line 200: Line 202:
  
 <​sup>​**10**</​sup>​ Supported since 3.0.0. <​sup>​**10**</​sup>​ Supported since 3.0.0.
- 
-<​sup>​**11**</​sup>​ //​Notifications and commands// stands for all of the following - Trigger-based notifications and commands, Discovery notifications,​ Auto-registration notifications. 
  
 === Indexed macros === === Indexed macros ===
Line 207: Line 207:
 The indexed macro syntax of {MACRO**<​1-9>​**} is limited to the context of **trigger expressions**. It can be used to reference hosts in the order in which they appear in the expression. Macros like {HOST.IP1}, {HOST.IP2}, {HOST.IP3} will resolve to the IP of the first, second and third host in the trigger expression (providing the trigger expression contains those hosts). The indexed macro syntax of {MACRO**<​1-9>​**} is limited to the context of **trigger expressions**. It can be used to reference hosts in the order in which they appear in the expression. Macros like {HOST.IP1}, {HOST.IP2}, {HOST.IP3} will resolve to the IP of the first, second and third host in the trigger expression (providing the trigger expression contains those hosts).
  
-Additionally the {HOST.HOST<​1-9>​} macro is also supported within the ''​{host:​key.func(param)}''​ macro in **graph names**. For example, ''​{{HOST.HOST2}:​key.func()}''​ in the graph name will refer to the host of the second item in the graph.+Additionally the {HOST.HOST<​1-9>​} macro is also supported within the ''​{host:​key.func(param)}''​ macro in **graph names**. For example, ''​%%{{%%HOST.HOST2}:​key.func()}''​ in the graph name will refer to the host of the second item in the graph.
  
 <note warning>​Use macros **without** index (i. e.{HOST.HOST},​ {HOST.IP}, etc) in all other contexts.</​note>​ <note warning>​Use macros **without** index (i. e.{HOST.HOST},​ {HOST.IP}, etc) in all other contexts.</​note>​