Nagios 4.1.2 beta reload

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
whitest
Posts: 107
Joined: Tue Dec 30, 2014 8:16 am

Nagios 4.1.2 beta reload

Post by whitest »

When I make changes in configs and execute testconfig and reload commands there are no changes in GUI, but GUI works.
Then I make restart command and see:

Code: Select all

[root@bnbnagios ~]# /etc/init.d/nagios restart
Stopping nagios:                                           [FAILED]
Starting nagios:                                           [  OK  ]
Changes applied after restart only...
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Nagios 4.1.2 beta reload

Post by jdalrymple »

When you say
whitest wrote:execute testconfig and reload commands
Do you mean

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios reload
Reload seems to care about shutting Nagios down properly a bit more than restart does. They are effectively the same though as far as getting the job done.

Code: Select all

/etc/init.d/nagios restart

Code: Select all

restart)
		if test "$checkconfig" = "true"; then
			printf "Running configuration check...\n"
			check_config
		fi

		$0 stop
		$0 start
		;;

	reload|force-reload)
		if test "$checkconfig" = "true"; then
			printf "Running configuration check...\n"
			check_config
		fi

		if test ! -f $NagiosRunFile; then
			$0 start
		else
			pid_nagios
			if status_nagios > /dev/null; then
				printf "Reloading nagios configuration...\n"
				killproc_nagios HUP
				echo "done"
			else
				$0 stop
				$0 start
			fi
		fi
		;;
whitest
Posts: 107
Joined: Tue Dec 30, 2014 8:16 am

Re: Nagios 4.1.2 beta reload

Post by whitest »

Yes, I mean:

Code: Select all

[root@nagios ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
[root@nagios ~]# /etc/init.d/nagios reload
nagios (pid 20747 20745 20743 20742 20741 20740 20739 20738) is running...
Reloading nagios:                                          [  OK  ]
[root@nagios ~]#
After reload command changes not applied, but after restart command everything is fine. It's strange and not happened befor 4.1.12-beta.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios 4.1.2 beta reload

Post by hsmith »

I'm having issues reproducing this one. I do not know how far along the 4.1.2 beta is. I would not be using it in production yet until we know it's ready for launch. The reason you were running it is for the IE map fix correct? It may just be easier to use 4.1.1 updated with a different browser right now than using a beta.
Former Nagios Employee.
me.
whitest
Posts: 107
Joined: Tue Dec 30, 2014 8:16 am

Re: Nagios 4.1.2 beta reload

Post by whitest »

The reason why I using 4.1.2-beta is becouse your teammates asked me about it when we tested new map.
I know that eisier way to avoid the problen is just using another version of nagios! I just wanted to report about this behavior of 4.1.2.
whitest
Posts: 107
Joined: Tue Dec 30, 2014 8:16 am

Re: Nagios 4.1.2 beta reload

Post by whitest »

When I do changes in configs and then apply changes I see followig:

Code: Select all

[root@nagios ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.1.2-beta
Copyright (c) 2009-present Nagios Core Development Team and Community Contributo                                                                                                                     rs
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-25-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
        Checked 881 services.
        Checked 200 hosts.
        Checked 49 host groups.
        Checked 16 service groups.
        Checked 33 contacts.
        Checked 8 contact groups.
        Checked 140 commands.
        Checked 10 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 200 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 10 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
[root@nagios ~]# 
[root@nagios ~]# 
[root@nagios ~]# /etc/init.d/nagios reload
nagios (pid 24491 24489 24488 24487 24486 24485 24484 24483) is running...
Reloading nagios:                                          [  OK  ]
[root@nagios ~]#
[root@nagios ~]#
[root@nagios ~]# /etc/init.d/nagios status
nagios dead but subsys locked
[root@nagios ~]#
[root@nagios ~]#
[root@nagios ~]# /etc/init.d/nagios restart
Stopping nagios:                                           [FAILED]
Starting nagios:                                           [  OK  ]
[root@nagios ~]#
So only after restart command nagios refresh configs. I believe something wrong in 4.1.2-beta and developers need to see.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios 4.1.2 beta reload

Post by hsmith »

Thanks for the feedback @whitest. Is there anything in the /usr/local/nagios/var/nagios.log file that would indicate what's going on?
Former Nagios Employee.
me.
whitest
Posts: 107
Joined: Tue Dec 30, 2014 8:16 am

Re: Nagios 4.1.2 beta reload

Post by whitest »

There are no new messages or errors in nagios.log after reload command.
When I make restart command nagios.log became alive - new messages arrives into nagios.log

Code: Select all

[1443018162] Nagios 4.1.2-beta starting... (PID=29865)
[1443018162] Local time is Wed Sep 23 17:22:42 FET 2015
[1443018162] LOG VERSION: 2.0
[1443018162] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1443018162] qh: core query handler registered
[1443018162] nerd: Channel hostchecks registered successfully
[1443018162] nerd: Channel servicechecks registered successfully
[1443018162] nerd: Channel opathchecks registered successfully
[1443018162] nerd: Fully initialized and ready to rock!
[1443018162] wproc: Successfully registered manager as @wproc with query handler
[1443018162] wproc: Registry request: name=Core Worker 29866;pid=29866
[1443018162] wproc: Registry request: name=Core Worker 29868;pid=29868
[1443018162] wproc: Registry request: name=Core Worker 29867;pid=29867
[1443018162] wproc: Registry request: name=Core Worker 29869;pid=29869
[1443018162] wproc: Registry request: name=Core Worker 29870;pid=29870
[1443018162] wproc: Registry request: name=Core Worker 29871;pid=29871
[1443018162] Successfully launched command file worker with pid 29874
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios 4.1.2 beta reload

Post by hsmith »

Hmm. Is there a chance I could bug you for your history output? I'd prefer that over PM, with any sensitive data edited out. As you may or may not be aware we're preparing for a major product release pretty soon, so core 4.1.2 isn't the main focus at the moment, the developers have been working to get XI5 ready(and they have done an awesome job!). I can test this and get feedback to them based on what you've done by looking at your history command, but I can't promise any super fast movement on 4.1.2 beta at this time. We have XI5 beta that was released yesterday, and the Nagios World Conference for the beginning of next week, in which the developers will be spending a lot of time doing a meet and greet. This week and the next are just kind of chaotic :)
Former Nagios Employee.
me.
Locked