Page 2 of 2

Re: Apply Config will not restart

Posted: Fri Sep 07, 2012 9:34 am
by mguthrie
The write config tool does a direct write to the nagios.cmd pipe, but the Apply Configuration process uses the command described above. The Apply Configuration is a better alternative because it will roll back and keep the monitoring engine running if there's a bad config being applied. However, for debugging a config error, the Write Config Tool is probably the easiest way.

Re: Apply Config will not restart

Posted: Mon Sep 10, 2012 7:32 am
by qbdrift
Ok,

so is there anything I can do to it without changing the Linux OS?

Thanks for another reply!

Best regards,

Heiko

Re: Apply Config will not restart

Posted: Mon Sep 10, 2012 9:40 am
by mguthrie
My guess is the systemctl is highjacking the following command:

Code: Select all

/etc/init.d/nagios restart
And the above command is specified as an allowed command in the /etc/sudoers file for the Nagios user. My guess is that you'll have to add the systemctl command to that file as well. It would probably be something like:

Code: Select all

systemctl nagios restart
but you'll have to test and see if that's it. We don't have a Fedora test box to confirm on, and as of Fedora 16, XI won't install on it at all. Right now the root user can run the Nagios restart, but the Nagios user can't because it's being denied permission.

Re: Apply Config will not restart

Posted: Tue Sep 11, 2012 4:58 am
by qbdrift
Hi,

thanks for the reply. But again I am sorry this didn't worked out.

I also gave the nagios and the apache user access for everything via the sudoers files.

I would really appreciate some more advices from your side.

Thanks!

Best regards,

Heiko

Re: Apply Config will not restart

Posted: Tue Sep 11, 2012 10:34 am
by mguthrie
Here's a few useful snippets I found about systemctl.
service operates on the files in /etc/init.d and was used in conjunction with the old init system. systemctl operates on the files in /lib/systemd . If there is a file for your service in /lib/systemd it will use that first and if not it will fall back to the file in /etc/init.d
Not sure if this will work, but I saw for another service this worked to prevent the permission denied error. (Run as root).

Code: Select all

systemctl enable nagios
How long have you had this install running on Fedora? If it's a fairly new install I would consider migrating it to a RHEL or CentOS box.

Re: Apply Config will not restart

Posted: Wed Sep 12, 2012 3:58 am
by qbdrift
Thank you very much for your effort.

I checkd this too, but it did not work.

We are using nagios xi about 1,5 years now on this machine.

Re: Apply Config will not restart

Posted: Wed Sep 12, 2012 5:31 am
by qbdrift
All right.

We managed with a little hacking.

We added a sudo command for the restart here: restart_nagios_with_export.sh

Now it is working.

Thanks for your support and time!