Hi everyone,
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:
define host{
use linux-server
host_name server1
alias server1.domain
_load_warning 5,5,5
_load_critical 10,8,8
}
define host{
use linux-server
host_name server2
alias server2.domain
_load_warning 9,7,7
_load_critical 12,11,11
}
Then in I’ve setup a hostgroup
define hostgroup{
hostgroup_name linux-servers
members server1, server2
}
and setup a check
define service{
use generic-service;
service_description Current Load
hostgroup_name linux-servers
check_command check_linux_load
}
and finally in commands.cfg I’ve added
# ‘check_linux_load’ command definition
define command{
command_name check_linux_load
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?
Thanks,
Simon