Apply configuration does not restart Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Apply configuration does not restart Nagios

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

Re: Apply configuration does not restart Nagios

Post by jdalrymple »

Can you post the output of `/usr/local/nagiosxi/scripts/reconfigure_nagios.sh`?
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Re: Apply configuration does not restart Nagios

Post by perric »

Yep, see attached. Thanks
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Apply configuration does not restart Nagios

Post 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?
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Re: Apply configuration does not restart Nagios

Post by perric »

The manage services script returns no output (and does nothing).

SELinux is disabled:

[root@cawlkl21 scripts]# sestatus
SELinux status: disabled
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Apply configuration does not restart Nagios

Post 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.
perric
Posts: 161
Joined: Fri Mar 28, 2014 10:37 am

Re: Apply configuration does not restart Nagios

Post by perric »

That did the trick! Thanks for the quick help!
Locked