Page 3 of 3

Re: Nagios XI Installation

Posted: Fri Jun 10, 2016 12:11 pm
by lmiltchev
What user npcd is running as on reboot?

I believe that when you stop/start npcd from the web UI, the "/usr/local/nagiosxi/scripts/manage_services.sh" script is used. What is the output of the following commands?

Code: Select all

umask
ll /usr/local/nagiosxi/scripts/manage_services.sh
grep manage_services.sh /etc/sudoers
Are you using ldap sudoers by chance?

Re: Nagios XI Installation

Posted: Mon Jun 13, 2016 2:46 am
by nagios_aws
hello,
I cannot reboot this server, but the ncpd daemon is running by nagios since installation.

here are the answers :

umask :

Code: Select all

0022
ll /usr/local/nagiosxi/scripts/manage_services.sh :

Code: Select all

-rwxr-xr-x 1 nagios nagios 2303 Jun  6 16:36 /usr/local/nagiosxi/scripts/manage_services.sh
grep manage_services.sh /etc/sudoers :

Code: Select all

NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
My sudoers are part of an AD group, and I'm not sure that the lines added in /etc/sudoers have the right to launch sudo ...

Re: Nagios XI Installation

Posted: Mon Jun 13, 2016 2:20 pm
by tgriep
If NPCD is running but the Nagios XI GUI, says it is not, it could be a permission problem reading the npcd pid file.
Can you run the following and post the output?

Code: Select all

ls -l /usr/local/nagiosxi/var/subsys/

Re: Nagios XI Installation

Posted: Tue Jun 14, 2016 2:37 am
by nagios_aws
Thank you @tgriep,

yes, it's a problem of owner of the .pid file, just like the post I linked.

I restarted the daemon and do a chown on this .pid file and it works.
But if a do a reboot, this change is lost.
So I need to know what to modify to take care of this, since I used the offline installation script for an enterprise version.

thank you

Re: Nagios XI Installation

Posted: Tue Jun 14, 2016 10:07 am
by tgriep
Edit the /etc/init.d/npcd file and around line 42 "under the start)" add the following line
umask 022

This will set the permissions of the npcd.pid file when the service is created but if you upgrade Nagios XI, it could be over written.