This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
lmiltchev
Bugs find me
Posts: 13589 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Fri Jun 10, 2016 12:11 pm
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
Post
by nagios_aws » Mon Jun 13, 2016 2:46 am
hello,
I cannot reboot this server, but the ncpd daemon is running by nagios since installation.
here are the answers :
umask :
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 ...
tgriep
Madmin
Posts: 9190 Joined: Thu Oct 30, 2014 9:02 am
Post
by tgriep » Mon Jun 13, 2016 2:20 pm
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
Post
by nagios_aws » Tue Jun 14, 2016 2:37 am
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
tgriep
Madmin
Posts: 9190 Joined: Thu Oct 30, 2014 9:02 am
Post
by tgriep » Tue Jun 14, 2016 10:07 am
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!