3

By default zabbix is able to check the total number of processes on a machine and triggers and error if these are above 300.

Clearly this doesn't work well for bigger machines. I do have a server with 32 codes and obviously 300 processes would be nothing for this machine.

I do want to change this rule to trigger a warning if the number of process per CPU is greater than 300.

This trigger is inside linux template and is named "Too many processes on {HOST.NAME}", the default values is "{Template OS Linux:proc.num[].avg(5m)}>300"

I tried to write something like {Template OS Linux:proc.num[].avg(5m)}/{Template OS Linux:system.cpu.num}>300 but it seems that zabbix (2.2) doesnt like this trigger expression.

Incorrect trigger expression. Check expression part starting from "/{Template OS Linux:system.cpu.num}>300".

What is the correct way to re-configure this check?

sorin
  • 7,668
  • 24
  • 75
  • 100

1 Answers1

4

The correct syntax for item references in trigger expressions is:

{host:item.func()}

In your particular case, the func() part is missing after system.cpu.num, so the correct expression would be:

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

Note that if you are not comfortable with editing trigger expressions by hand, you can use the "Add" button on the right of expression which brings up a simple wizard:

enter image description here

asaveljevs
  • 1,143
  • 6
  • 8
  • Thanks for clarifying this as I wasn't able to find it in the docs. Now I do have another problem, it seems that the status of this item appears to be "Not Supported", if I click it it goes to Disabled and back to Not Supported. – sorin Apr 04 '14 at 13:40
  • @sorin: The trigger expression syntax is described in detail at https://www.zabbix.com/documentation/2.2/manual/config/triggers/expression . – asaveljevs Apr 04 '14 at 15:57
  • @sorin: Regarding the item being not supported, which of these two items do you mean? Which version of Zabbix agent are you using and do you have SELinux enabled? – asaveljevs Apr 04 '14 at 16:00