Search code examples
zabbix

Zabbix, naming hostname in templates


Initially, I wanted a way to change when I receive a notification for free hard disk space, which I have successfully done. However, I would like to implement this rule on one of the existing templates rather than individually add it to each host. However, when I do attempt to add the trigger by using the expression {hostname:vfs.fs.size[drive:,pfree].last(0)}<5, I am confused as to what to put as the hostname, since I am trying to put this in a template for multiple hosts.

I have tried to name it the template name that consists of the hosts, but have been unsuccessful.

Thanks!


Solution

  • Trigger are associated with hosts they reference items from. To create a trigger "in" a template, reference an item from that template like so:

    {template_name:vfs.fs.size[drive:,pfree].last(0)}<5