Nagios XI Installation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Installation

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
nagios_aws
Posts: 76
Joined: Wed May 18, 2016 3:34 am

Re: Nagios XI Installation

Post 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 ...
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI Installation

Post 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/
Be sure to check out our Knowledgebase for helpful articles and solutions!
nagios_aws
Posts: 76
Joined: Wed May 18, 2016 3:34 am

Re: Nagios XI Installation

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI Installation

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked