check_nagios nagios and nagiostats not updating

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
nagtech2
Posts: 30
Joined: Tue Dec 17, 2013 2:09 pm

check_nagios nagios and nagiostats not updating

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: check_nagios nagios and nagiostats not updating

Post 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
nagtech2
Posts: 30
Joined: Tue Dec 17, 2013 2:09 pm

Re: check_nagios nagios and nagiostats not updating

Post by nagtech2 »

Here is the output from command line.
NAGIOS CRITICAL: Could not locate a running Nagios process!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_nagios nagios and nagiostats not updating

Post by ssax »

What is the output of this command?

Code: Select all

ps ax | grep 'nagios -d' | grep -v grep
nagtech2
Posts: 30
Joined: Tue Dec 17, 2013 2:09 pm

Re: check_nagios nagios and nagiostats not updating

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_nagios nagios and nagiostats not updating

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
nagtech2
Posts: 30
Joined: Tue Dec 17, 2013 2:09 pm

Re: check_nagios nagios and nagiostats not updating

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_nagios nagios and nagiostats not updating

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
nagtech2
Posts: 30
Joined: Tue Dec 17, 2013 2:09 pm

Re: check_nagios nagios and nagiostats not updating

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_nagios nagios and nagiostats not updating

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked