Zabbix: Different notification threshold for a template-inherited trigger on more capable hosts

system-monitoringzabbix

I have Zabbix 3.0 managing a couple dozen or so Linux servers. All of them have the "Template OS Linux" template, which has a warning trigger of "Too many processses running" if there are more than 30 processes running. But for a handful of these machines, I decide that it's OK to have more than 30 running processes, and I would like the trigger to be, say, 50 or 60. The other machines should stay with a threshold of 30. What would be the best course of action to implement that?

Could I create an additional template which only has the altered-threshold triggers, and have it apply to the host? Relatedly, if there are two templates for a host that have different triggers for the same item, would I necesssarily have to disable the "old" trigger for each host manually?

I reiterate that "Number of processes running" is only an example. The same problem can apply to any item.

Best Answer

No, do not create another template. You wouldn't even be able to link such templates to the same host, the item keys would conflict. Two reasonable options exist:

  • modify the trigger expression so that it uses usermacros (think of them as variables). Then, manually override the value of that usermacro on specific hosts.
  • modify the trigger expression to latch onto some other value - for example, scale the threshold based on the CPU core count, which you would collect in another item