Page 1 of 1

check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 11:33 am
by nagtech2
This service turned critical after upgrading from 4.08 to 4.11. When I checked /usr/local/nagios/bin I noticed that the nagios and nagiostats files stopped updating after the upgrade to 4.11. I'm not sure what this means or what caused this. The status.dat file is updating.

The service command is

command_line $USER1$/check_nagios -t 20 -e 5 -F /usr/local/nagios/var/status.dat -C /usr/local/nagios/bin/nagios

Thanks

Re: check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 2:03 pm
by jdalrymple
nagtech2 wrote:I noticed that the nagios and nagiostats files stopped updating after the upgrade to 4.11
I'm not sure I follow, these are binaries, they don't update.
nagtech2 wrote:The service command is

command_line $USER1$/check_nagios -t 20 -e 5 -F /usr/local/nagios/var/status.dat -C /usr/local/nagios/bin/nagios
What's the output if you run it manually?

Code: Select all

[jdalrymple@localhost ~]$ /usr/local/nagios/libexec/check_nagios -t 20 -e 5 -F /usr/local/nagios/var/status.dat -C /usr/local/nagios/bin/nagios
NAGIOS OK: 6 processes, status log updated 5 seconds ago

Re: check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 3:00 pm
by nagtech2
Here is the output from command line.
NAGIOS CRITICAL: Could not locate a running Nagios process!

Re: check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 3:23 pm
by ssax
What is the output of this command?

Code: Select all

ps ax | grep 'nagios -d' | grep -v grep

Re: check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 3:39 pm
by nagtech2
1251 ? Ss 106:32 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
1628 ? S 0:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Re: check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 4:05 pm
by tgriep
What is the version on the check_nagios plugin?
Run this and post back.

Code: Select all

/usr/local/nagios/libexec/check_nagios -V
Did it get updated when the core was updated?

Re: check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 4:40 pm
by nagtech2
I had upgraded to plugins 2.11, I re-installed plugins 2.03 just now and that issue is fixed. The other issue I had with 2.11 was all of my services that were in a unknown state because the host was down, those all went to critical with the updated check_snmp. Those are all back to unknown with plugins 2.03 installed

Re: check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 4:47 pm
by Box293
nagtech2 wrote:The other issue I had with 2.11 was all of my services that were in a unknown state because the host was down, those all went to critical with the updated check_snmp. Those are all back to unknown with plugins 2.03 installed
You can define this in the newer 2.11 version of the plugins:
-t, --timeout=INTEGER:<timeout state>
Seconds before connection times out (default: 10)
Optional ":<timeout state>" can be a state integer (0,1,2,3) or a state STRING

Code: Select all

-t 30:3

Re: check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 4:54 pm
by nagtech2
Can you think of any issue with staying with 2.03?, I would like to do that until I have time to play with these new options you mentioned. Also if I'm reading correctly, If I add the following to nagios.cfg "host_down_disable_service_checks=1" that should prevent nagios from running service checks on a host when its down correct?

Thanks

Re: check_nagios nagios and nagiostats not updating

Posted: Tue Sep 01, 2015 6:22 pm
by Box293
Staying on 2.0.3 should not be a problem.
nagtech2 wrote:Also if I'm reading correctly, If I add the following to nagios.cfg "host_down_disable_service_checks=1" that should prevent nagios from running service checks on a host when its down correct?
As long as you're on core 4.1.x then yes you are right, when the host is down HARD service checks will not be executed.