I have 4000ish devices that have a trigger on them instead of in a template. I would like to update that trigger. Is there a way to update a trigger in a group, or move that trigger to a template, without doing it 4000 times?
Ad Widget
Collapse
Move item/trigger from device to template
Collapse
X
-
Add item and trigger to some template and add this template to all those devices/hosts which have this untemplated trigger/item. If trigger syntax and item key will be the same this untemplated item/trigger will become automatically templated.
This is why in hosts templates is possible to unlink template without clear data. This allows, for example, prepare new template -> test it somewhere and by unlink old template and add new ones as items keys and triggers syntax will be the same you will have exactly the same items but with new descriptions and/or new graphs/screens after the whole operation.
In above scenario, if new graphs will be different before link to new template you can delete all non templated screens/graphs.
As long as these devices are not populated over LLD ->host prototype you cannot avoid repeating this operation as many times as mANY you have monitored hosts/devices.
You can automate the whole operation by use short script using zabbix API by doing this in the loop.
You can use my zapish (zabbix API SH bindings) if you want.Last edited by kloczek; 30-04-2018, 17:19.http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
https://kloczek.wordpress.com/
zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
My zabbix templates https://github.com/kloczek/zabbix-templates
Comment