Page 1 of 1

update to commands.cfg not being applied

Posted: Wed Jan 16, 2013 9:39 pm
by milk
i'm using check_by_ssh to run check_load (on nagios 3.0.6). as the number of cores per host has started to vary it has become clear that a single set of values for monitoring the load is not reasonable. i came across the '-r' option which divides the load by the number of CPU cores. perfect!

i verified that the plugin installed on the servers supports the '-r' option by running it locally, so i made the following change to commands.cfg:

from:
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -l nagios -C'/usr/lib64/nagios/plugins/check_load -w 3,3,3 -c 6,6,6'

to:
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -l nagios -C'/usr/lib64/nagios/plugins/check_load -w .75,.75,.75 -c 1,1,1 -r'

hit my trusty /etc/init.d/nagios reload

nagios is still polling using the old command. i've been searching forums, thumbing through manuals and banging my head against my desk on this for the last 4 hours. someone, please tell me that i am missing something simple here.

Re: update to commands.cfg not being applied

Posted: Thu Jan 17, 2013 11:12 am
by abrist
First, make sure you don't have 2 nagios processes running, if so kill them with fire:

Code: Select all

ps -aef | grep nagios
/etc/init.d/nagios stop
killall -9 nagios
/etc/init.d/nagios start
Next, check/grep the nagios log for the host in question.

Re: update to commands.cfg not being applied

Posted: Thu Jan 17, 2013 1:30 pm
by milk
i wish it was that simple. there are no rogue nagios procs and the hosts in question are being polled, just with the old parameters intact.

Re: update to commands.cfg not being applied

Posted: Thu Jan 17, 2013 1:58 pm
by milk
SOLVED - a fellow engineer has hard coded the check_load command with the old options into the authorized_keys file via a 'command=' entry.