farhany farhany - 1 year ago 167
Linux Question

Over ride max number of processes in Zabbix

I am monitoring certain FreeIPA servers that are normally forking <= 460 process (roughly). This generates the "Too many processes on {HOST.NAME}" as part of the "Template OS Linux" template.

The Expression that does the check is looking for processes greater than 300:

{Template OS Linux:proc.num[].avg(5m)}>300

What is the best way to over ride the value in another template I created particularly for these class of servers that is also inheriting "Template OS Linux" and "Template IPA Servers?"

Answer Source

Probably user macros. You would add a user macro in the original template:


And you would modify the trigger expression like this :

{Template OS Linux:proc.num[].avg(5m)}>{$TRIGGER_THRESHOLD_PROCESSES_RUNNING}

Then you could define a user macro with the same name on the lower level template - or even individual hosts - with a different value.

The user macro name is up to you, as long as it follows the syntax rules.