-
New Feature Request
-
Resolution: Fixed
-
Major
-
None
-
Sprint 51 (Apr 2019), Sprint 52 (May 2019), Sprint 53 (Jun 2019)
-
5
Summary
Currently export files contain information about items and triggers separately, which makes editing of triggers related to an item rather difficult.
It would be great to change structure of export files so that item and simple triggers (i.e. triggers having references only to one item) are on the same page, i.e. as close to each other as possible.
Acceptance
Structure of XML/JSON export files must be modified to allow inclusion of triggers also as item attributes. Trigger prototypes will also be allowed to be attributes of item prototypes, same logic must be applied.
- <item> will support an optional attribute <triggers>
- Triggers can be placed in old location of <triggers> or under <item><triggers>
- When exporting:
- Old attribute <triggers> will be used only for complex triggers
- Simple triggers must be placed only under <item>
- No reference to item must be used, just a simple format:
- Before {host:item.func(param)} Now: {func(param)}
- When importing:
- Simple reference to item is allowed
- It is allowed to have a trigger from <item><triggers> without any references to <item> attribute
A few examples
Item definition in XML
<item>
<name>Modification time of /etc/passwd</name>
<key>vfs.file.time[/etc/passwd]</key>
<type>ZABBIX_ACTIVE</type>
<triggers>
<trigger>
<name>Some problem</name>
<expression>{fuzzytime(1h)}=1</expression>
<priority>HIGH</priority>
</trigger>
<trigger>
...
</trigger>
</triggers>
</item>
Business Use Cases
- I want to see clearly what triggers are defined for each item and edit them in a text editor if needed.