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.
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Wed Jun 19, 2019 11:04 am
Can you show the output of the following
Code: Select all
grep lock /etc/init.d/nagios
grep lock /usr/local/nagios/etc/nagios.cfg
shivangi
Posts: 32 Joined: Mon Mar 25, 2019 2:01 am
Post
by shivangi » Thu Jun 20, 2019 3:25 am
Should i execute these commands after stopping nagios ?
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Thu Jun 20, 2019 6:35 am
shivangi wrote: Should i execute these commands after stopping nagios ?
Either way, they are just going to show is it the lock file location is the same in both locations like it should be
shivangi
Posts: 32 Joined: Mon Mar 25, 2019 2:01 am
Post
by shivangi » Fri Jun 21, 2019 5:36 am
please find the output of the commands in the below attached attachment .
Thanks .
Attachments
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Fri Jun 21, 2019 2:30 pm
Do you get any errors when you stop nagios?
After the stop is complete does this still show processes?
shivangi
Posts: 32 Joined: Mon Mar 25, 2019 2:01 am
Post
by shivangi » Mon Jun 24, 2019 2:58 am
Hi,
No i donot find any issues while stopping Nagios and yes even after stopping Nagios after running the command ps -ef | grep Nagios .cfg some processes can stiil be seen as running .
please find the attachment .
Processes running when Nagios service is in on state is 16 and after stopping it is 8 when it should be 0 .sometimes processes running is more than 8 .
Attachments
tgriep
Madmin
Posts: 9181 Joined: Thu Oct 30, 2014 9:02 am
Post
by tgriep » Mon Jun 24, 2019 3:29 pm
How many Hosts and Services is the server monitoring?
Can you post the nagios init script here so we can view it's settings?
Try this to stop all of the nagios processes.
Run this as root
Code: Select all
service nagios stop
killall -9 nagios
Check to see if all of the Nagios processes are stopped and then start it up.
Be sure to check out our
Knowledgebase for helpful articles and solutions!
shivangi
Posts: 32 Joined: Mon Mar 25, 2019 2:01 am
Post
by shivangi » Wed Jun 26, 2019 2:49 am
Hi ,
Approx 248 servers are under monitoring
Below attached is the Nagios init script .
Thanks.
Attachments
nagios init script.txt
(9.7 KiB) Downloaded 165 times
shivangi
Posts: 32 Joined: Mon Mar 25, 2019 2:01 am
Post
by shivangi » Wed Jun 26, 2019 3:24 am
Hi ,
Whenever I stop the Nagios process do I have to manually create the lock file ( nagios.lock , which is available in /usr/local/nagios/var )
because after executing the start command it shows no lock file found .
Thanks.
tgriep
Madmin
Posts: 9181 Joined: Thu Oct 30, 2014 9:02 am
Post
by tgriep » Wed Jun 26, 2019 8:24 am
You said earlier that you have a cron job that is making changes and restarting nagios. Show us what that job is doing and running.
You should not have to create the lock file as the nagios init script should create it when you issue a nagios start.
Run the following commands and post the full output.
Code: Select all
service nagios stop
killall -9 nagios
ps -ef |grep nagios.cfg
service nagios start
service nagios status
tail -50 /usr/local/nagios/var/nagios.log
ps -ef |grep nagios.cfg
Be sure to check out our
Knowledgebase for helpful articles and solutions!