Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
prostak
Posts: 4 Joined: Wed Feb 25, 2015 2:37 pm
Post
by prostak » Wed Mar 18, 2015 6:05 pm
Nagios XI is purchases by our company, however, I wasn't able to create topic under Customer Support > Nagios XI, therefore I am submitting my question here...
We have Nagios XI installed Red Hat 5.7.
I need to shut Nagios down on that server temporally. How do I do it?
I tried:
Code: Select all
[YYYY@XXXX ~]$ ps -efa | grep nagios
nagios 3953 1 0 Feb16 ? 00:00:20 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
nagios 4105 1 0 Feb16 ? 00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
YYYY 16887 8219 0 15:50 pts/1 00:00:00 grep nagios
[YYYY@XXXX ~]$ sudo killall nagios
nagios: no process killed
I do have sudo access. Killing didn't do anything. How do I shut Nagios down? thanks!
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Fri Mar 20, 2015 12:26 am
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
prostak
Posts: 4 Joined: Wed Feb 25, 2015 2:37 pm
Post
by prostak » Fri Mar 20, 2015 12:52 pm
It doesn't work:
Code: Select all
[XXXX@YYYY ~]$ service nagios stop
-bash: service: command not found
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Sun Mar 22, 2015 7:17 pm
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
prostak
Posts: 4 Joined: Wed Feb 25, 2015 2:37 pm
Post
by prostak » Wed Apr 08, 2015 12:01 pm
Sorry for late reply.
I get this:
Code: Select all
[YYYY@XXXX ~]$ sudo /sbin/service nagios stop
Stopping nagios: No lock file found in /usr/local/nagios/var/nagios.lock
P.S. Do you know how do I get a permission to post under Customer Support > Nagios XI?
Thanks
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Wed Apr 08, 2015 4:38 pm
So that command is working.
Not sure why you are getting the lock file.
After stopping nagios, are there any other nagios processes running?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
prostak
Posts: 4 Joined: Wed Feb 25, 2015 2:37 pm
Post
by prostak » Thu Apr 09, 2015 4:18 pm
I get this:
Code: Select all
[YYYY@XXXX ~]$ ps -aef | grep nagios.cfg
YYYY 22295 22258 0 14:13 pts/0 00:00:00 grep nagios.cfg
Is the above good or bad?
What does hitting lock indicate to you?
Box293
Too Basu
Posts: 5126 Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:
Post
by Box293 » Thu Apr 09, 2015 5:06 pm
prostak wrote: P.S. Do you know how do I get a permission to post under Customer Support > Nagios XI?
Send an email to
[email protected]
prostak wrote: I get this:
Code: Select all
[YYYY@XXXX ~]$ ps -aef | grep nagios.cfg
YYYY 22295 22258 0 14:13 pts/0 00:00:00 grep nagios.cfg
Is the above good or bad?
This is good. It shows that nagios is not running.
prostak wrote: What does hitting lock indicate to you?
The lock file is a file created when Nagios starts which includes the PID of the nagios process. When Nagios is stopped this file is deleted. You should not normally get the message No lock file found.
When Nagios is running, this will confirm the file exists:
Code: Select all
cat /usr/local/nagios/var/nagios.lock
If this doesn't produce output then something else is wrong.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
lsazzad
Posts: 72 Joined: Tue Apr 07, 2015 6:52 am
Location: Osnabrück, Deutschland
Contact:
Post
by lsazzad » Tue Apr 21, 2015 3:32 am
It seems your lock file needs to be unlocked! I was having same problem. If there is already a lock file then please increase your lock files's permission.
chmod 664 nagios.lock
chown root:nagiosops nagios.lock
If its not there please create one & then increase permission:
Location of file:
cd /usr/local/nagios/var
touch nagios.lock
chmod 664 nagios.lock
chown root:nagiosops nagios.lock
I hope it could solve your problem!
Regards
Sazzad
jdalrymple
Skynet Drone
Posts: 2620 Joined: Wed Feb 11, 2015 1:56 pm
Post
by jdalrymple » Tue Apr 28, 2015 4:00 pm
prostak wrote: I tried:
Code: Select all
[YYYY@XXXX ~]$ ps -efa | grep nagios
nagios 3953 1 0 Feb16 ? 00:00:20 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
nagios 4105 1 0 Feb16 ? 00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
YYYY 16887 8219 0 15:50 pts/1 00:00:00 grep nagios
[YYYY@XXXX ~]$ sudo killall nagios
nagios: no process killed
It wasn't running when you started.
If you don't have `/sbin/service` - `/etc/init.d/nagios stop` should work just fine.