Page 1 of 2
How do I shutdown Nagios?
Posted: Wed Mar 18, 2015 6:05 pm
by prostak
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!
Re: How do I shutdown Nagios?
Posted: Fri Mar 20, 2015 12:26 am
by Box293
Re: How do I shutdown Nagios?
Posted: Fri Mar 20, 2015 12:52 pm
by prostak
It doesn't work:
Code: Select all
[XXXX@YYYY ~]$ service nagios stop
-bash: service: command not found
Re: How do I shutdown Nagios?
Posted: Sun Mar 22, 2015 7:17 pm
by Box293
Re: How do I shutdown Nagios?
Posted: Wed Apr 08, 2015 12:01 pm
by prostak
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
Re: How do I shutdown Nagios?
Posted: Wed Apr 08, 2015 4:38 pm
by Box293
So that command is working.
Not sure why you are getting the lock file.
After stopping nagios, are there any other nagios processes running?
Re: How do I shutdown Nagios?
Posted: Thu Apr 09, 2015 4:18 pm
by prostak
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?
Re: How do I shutdown Nagios?
Posted: Thu Apr 09, 2015 5:06 pm
by Box293
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.
Re: How do I shutdown Nagios?
Posted: Tue Apr 21, 2015 3:32 am
by lsazzad
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!
Re: How do I shutdown Nagios?
Posted: Tue Apr 28, 2015 4:00 pm
by jdalrymple
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.