we have a number of servers that we’re monitoring with Nagios 3.04 - linux, windows and netware.
What I’m trying to do is setup generic checks for each type of server - for example, for the linux servers I’d like to check the CPU load and alert if its above a certain level, but I need a different level for each server. For example, I might have server1, server2 and server3 each of which run with different loads.
What I’ve tried is setting up the hosts as below:
Then in I’ve setup a hostgroup
members server1, server2
and setup a check
service_description Current Load
and finally in commands.cfg I’ve added
# ‘check_linux_load’ command definition
command_line $USER1$/check_snmp_load.pl -H $HOSTNAME$ -C public -w $_HOSTload_warning$ -c $_HOSTload_critical$ -Tnetsl
however, this doesn’t work - it doesn’t seem to recognise the variables.
Should I be able to do something like this or am I just making a silly mistake somewhere?