Page 1 of 1

Apply configuration does not restart Nagios

Posted: Wed Apr 15, 2015 9:40 am
by perric
Hi all,

After upgrading to the latest release (2014R2.6) the Apply Configuration option successfully writes the config files but does not restart Nagios. Manually restarting the process causes the changes to get picked up.

I have tried all of the options in http://support.nagios.com/forum/viewtop ... 5&start=10 and have verified that calling /etc/init.d/nagios restart manually works as expected.

>Linux Distribution and version?
Oracle Enterprise Linux v6 (based on RHEL 6)
[root@cawlkl21 scripts]# uname -a
Linux cawlkl21.pramericas.com 3.8.13-55.1.5.el6uek.x86_64 #2 SMP Wed Jan 28 17:03:28 PST 2015 x86_64 x86_64 x86_64 GNU/Linux

>32 or 64bit?
64 bit

>VMware Image or Manual Install of XI?
Manual

>Are there special configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
Nope

Thanks in advance

Re: Apply configuration does not restart Nagios

Posted: Wed Apr 15, 2015 9:48 am
by jdalrymple
Can you post the output of `/usr/local/nagiosxi/scripts/reconfigure_nagios.sh`?

Re: Apply configuration does not restart Nagios

Posted: Wed Apr 15, 2015 9:51 am
by perric
Yep, see attached. Thanks

Re: Apply configuration does not restart Nagios

Posted: Wed Apr 15, 2015 10:10 am
by jdalrymple
That's definitely bizarre.

What is the output of `/usr/local/nagiosxi/scripts/manage_services.sh restart nagios`

Also - selinux didn't somehow get reenabled did it?

Re: Apply configuration does not restart Nagios

Posted: Wed Apr 15, 2015 10:53 am
by perric
The manage services script returns no output (and does nothing).

SELinux is disabled:

[root@cawlkl21 scripts]# sestatus
SELinux status: disabled

Re: Apply configuration does not restart Nagios

Posted: Wed Apr 15, 2015 11:41 am
by jdalrymple
Well, that's what's broken.

Code: Select all

# Run the command
# -----------------------

# CentOS / Red Hat

if [ "$distro" == "CentOS" ] || [ "$distro" == "RedHatEnterpriseServer" ]; then
    if [ "$dist" == "el7" ]; then
        if [ "$service" == "mysqld" ]; then
            service=$mysqld
        fi
        `which systemctl` $action $service
    elif [ ! `command -v service` ]; then
        /etc/init.d/$service $action
        return_code=$?
    else
        `which service` $service $action
        return_code=$?
    fi
fi
Certainly you can see the problem. You can get $distro from "/usr/local/nagiosxi/var/xi-sys.cfg"

Replace:

Code: Select all

if [ "$distro" == "CentOS" ] || [ "$distro" == "RedHatEnterpriseServer" ]; then
with

Code: Select all

if [ "$distro" == "CentOS" ] || [ "$distro" == "RedHatEnterpriseServer" ] || [ "$distro" == "OracleWhatever" ]; then
Should get you rolling.

Re: Apply configuration does not restart Nagios

Posted: Wed Apr 15, 2015 11:48 am
by perric
That did the trick! Thanks for the quick help!