Page 1 of 1

Nagios services startup issue using sudo

Posted: Thu Oct 23, 2014 6:21 pm
by rajasegar
NagiosXI 2014R1.2
RHEL 6.5 64bit
DB Offloaded
check_gearman: version 1.4_nagios4 running on libgearman 0.25

I have got a very strange problem.
Nagios services does not start up if using root or sudo.
It only works if nagios id is used or Apply Configuration is done from the gui.

The symptoms
1) gearman_top - check_results worker will be 0 if nagios is started using root.
24-10-2014 07-12-33 AM.png
2) Nagios System dashboard. The last 3 indicators will be blue which is active host checks, service checks and notification.
24-10-2014 07-12-55 AM.png
3) No relevant error messages in any logs.

Does anyone have any clue about this issue?
Did a remote support with the nagios team sometime back and they have no clue either.

Re: Nagios services startup issue using sudo

Posted: Fri Oct 24, 2014 10:55 am
by lmiltchev
Let's clarify - if you are logged in as root, you are not able to stop/start/restart service?

Code: Select all

# service nagios stop
# service nagios start
# service nagios restart
What is the output of the following commands?

Code: Select all

echo $PATH
grep root /etc/passwd

Re: Nagios services startup issue using sudo

Posted: Sun Oct 26, 2014 6:22 pm
by rajasegar
lmiltchev wrote:Let's clarify - if you are logged in as root, you are not able to stop/start/restart service?

Code: Select all

# service nagios stop
# service nagios start
# service nagios restart
What is the output of the following commands?

Code: Select all

echo $PATH
grep root /etc/passwd
If logged on using root. All the nagios service stop, start & restart executes fine without error.
However the start command does not start the services properly.
No idea what service is not started but gearman check_results will be 0.
All other services starts up fine using sudo.

Code: Select all

[nagios@nagiosprodxi1 ~]$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/nagios/bin

[root@nagiosprodxi1 ~]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

[root@nagiosprodxi1 ~]# grep root /etc/passwd
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/sbin/nologin
[root@nagiosprodxi1 ~]#


Re: Nagios services startup issue using sudo

Posted: Mon Oct 27, 2014 2:28 pm
by cmerchant
Please open an email support ticket at [email protected] and send us your profile.zip.
Admin --> System Profile --> Download Profile
Thanks.

Re: Nagios services startup issue using sudo

Posted: Mon Oct 27, 2014 6:01 pm
by rajasegar
cmerchant wrote:Please open an email support ticket at [email protected] and send us your profile.zip.
Admin --> System Profile --> Download Profile
Thanks.
I am creating a duplicate VM for troubleshooting the upgrade issue.
Will open a ticket once it is ready to troubleshoot 2 issues at the same time.
It might be related.

Re: Nagios services startup issue using sudo

Posted: Tue Oct 28, 2014 10:07 am
by sreinhardt
Sounds great, thanks raja!