update to commands.cfg not being applied

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
milk
Posts: 3
Joined: Wed Jan 16, 2013 9:24 pm

update to commands.cfg not being applied

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: update to commands.cfg not being applied

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
milk
Posts: 3
Joined: Wed Jan 16, 2013 9:24 pm

Re: update to commands.cfg not being applied

Post 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.
milk
Posts: 3
Joined: Wed Jan 16, 2013 9:24 pm

Re: update to commands.cfg not being applied

Post 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.
Locked