There is an option to tag various entities in Zabbix. Tags can be defined for:
Tags have several uses, most notably, to mark events. If entities are tagged, the corresponding new events get marked accordingly:
A problem event inherits all tags from the whole chain of templates, hosts, items, web scenarios, triggers. Completely identical tag:value
combinations (after resolved macros) are merged into one rather than being duplicated, when marking the event.
Having custom event tags allows for more flexibility. Importantly, events can be correlated based on event tags. In other uses, actions can be defined based on tagged events. Item problems can be grouped based on tags.
Tagging is realized as a pair of tag name and value. You can use only the name or pair it with a value:
An entity (template, host, item, web scenario, trigger or event) may be tagged with the same name, but different values - these tags will not be considered 'duplicates'. Similarly, a tag without value and the same tag with value can be used simultaneously.
Some use cases for this functionality are as follows:
{{ITEM.VALUE<N>}.regsub()}
macro;{{ITEM.VALUE<N>}.regsub()}
macro in the tag value;Tags can be entered in a dedicated tab, for example, in trigger configuration:
The following macros may be used in trigger tags:
The following macros may be used in trigger-based notifications:
The following macros may be used in template, host, item and web scenario tags:
The following macros may be used in host prototype tags:
Substring extraction is supported for populating the tag name or tag value, using a macro function - applying a regular expression to the value obtained by the {ITEM.VALUE}, {ITEM.LASTVALUE} macro or a low-level discovery macro. For example:
{{ITEM.VALUE}.regsub(pattern, output)}
{{ITEM.VALUE}.iregsub(pattern, output)}
{{#LLDMACRO}.regsub(pattern, output)}
{{#LLDMACRO}.iregsub(pattern, output)}
Tag name and value will be cut to 255 characters if their length exceeds 255 characters after macro resolution.
See also: Using macro functions in low-level discovery macros for event tagging.
Tagging, if defined, can be seen with new events in:
Only the first three tag entries are displayed. If there are more than three tag entries, it is indicated by three dots. If you roll your mouse over these three dots, all tag entries are displayed in a pop-up window.
Note that the order in which tags are displayed is affected by tag filtering and the Tag display priority option in the filter of Monitoring → Problems or the Problems dashboard widget.