Hi,
I'm struggling with setting inventory fields to static predefined values for a group of hosts.
As an example, I'm trying to set all INVENTORY.NOTES fields of a number of hosts to the same value, e.g. "This is a 24x7 SLA, please call cell phone of POC directly". This information is then added to the message field of the appropriate Action.
So far I've tried a number of things:
1) Create a template to auto-populate the inventory - This is a no-go since the items necessary to auto populate fill the Inventory should be static text and that's not possible (unless using zabbix_sender to fill zabbix_trapper item fields)
2) Create a template with user defined MACRO's and use these MACRO's in the inventory. - Not supported apparently.
3) Create an external script that populates the INVENTORY.NOTES field of all objects that are linked to a specific template - this works of course, but is not my preferred solution since it relies on an external script.
My first choice would be to add the Inventory fields to templates as well as static text fields, overwriting the host inventory.
Next best would be to be able to use user macro's in the inventory fields (derived from the template of course).
Any suggestions are very welcome!
Cheers,
Rob.
I'm struggling with setting inventory fields to static predefined values for a group of hosts.
As an example, I'm trying to set all INVENTORY.NOTES fields of a number of hosts to the same value, e.g. "This is a 24x7 SLA, please call cell phone of POC directly". This information is then added to the message field of the appropriate Action.
So far I've tried a number of things:
1) Create a template to auto-populate the inventory - This is a no-go since the items necessary to auto populate fill the Inventory should be static text and that's not possible (unless using zabbix_sender to fill zabbix_trapper item fields)
2) Create a template with user defined MACRO's and use these MACRO's in the inventory. - Not supported apparently.
3) Create an external script that populates the INVENTORY.NOTES field of all objects that are linked to a specific template - this works of course, but is not my preferred solution since it relies on an external script.
My first choice would be to add the Inventory fields to templates as well as static text fields, overwriting the host inventory.
Next best would be to be able to use user macro's in the inventory fields (derived from the template of course).
Any suggestions are very welcome!
Cheers,
Rob.