Zabbix Documentation 4.0

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:config:macros:usermacros

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:config:macros:usermacros [2017/10/06 14:12]
127.0.0.1 external edit
manual:config:macros:usermacros [2020/03/16 12:56] (current)
martins-v user macros are not always resolved in the configuration section
Line 9: Line 9:
   {$MACRO}   {$MACRO}
  
-Zabbix ​resolves ​macros according to the following precedence:+Zabbix ​expands ​macros according to the following precedence:
  
   - host level macros (checked first)   - host level macros (checked first)
Line 19: Line 19:
 In other words, if a macro does not exist for a host, Zabbix will try to find it in the host templates of increasing depth. If still not found, a global macro will be used, if exists. In other words, if a macro does not exist for a host, Zabbix will try to find it in the host templates of increasing depth. If still not found, a global macro will be used, if exists.
  
-If Zabbix is unable to find a macro, the macro will not be resolved.+If Zabbix is unable to find a macro, the macro will not be expanded. 
 + 
 +<note important>​User macros are left unresolved in the Configuration section (for example, in the trigger list) by design to make complex configuration more transparent.</​note>​
  
 User macros can be used in: User macros can be used in:
  
-  * item names +  * item name 
-  * item key parameters+  * item key parameter
   * item update intervals and flexible intervals   * item update intervals and flexible intervals
-  * trigger ​names and descriptions+  * trigger ​name and description
   * trigger expression parameters and constants (see [[#​examples|examples]])   * trigger expression parameters and constants (see [[#​examples|examples]])
   * many other locations - see the [[:​manual/​appendix/​macros/​supported_by_location_user|full list]]   * many other locations - see the [[:​manual/​appendix/​macros/​supported_by_location_user|full list]]