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
Apply configuration does not restart Nagios
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Apply configuration does not restart Nagios
Can you post the output of `/usr/local/nagiosxi/scripts/reconfigure_nagios.sh`?
Re: Apply configuration does not restart Nagios
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
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?
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
The manage services script returns no output (and does nothing).
SELinux is disabled:
[root@cawlkl21 scripts]# sestatus
SELinux status: disabled
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
Well, that's what's broken.
Certainly you can see the problem. You can get $distro from "/usr/local/nagiosxi/var/xi-sys.cfg"
Replace:
with
Should get you rolling.
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
Replace:
Code: Select all
if [ "$distro" == "CentOS" ] || [ "$distro" == "RedHatEnterpriseServer" ]; thenCode: Select all
if [ "$distro" == "CentOS" ] || [ "$distro" == "RedHatEnterpriseServer" ] || [ "$distro" == "OracleWhatever" ]; thenRe: Apply configuration does not restart Nagios
That did the trick! Thanks for the quick help!