Page 1 of 1

Getting alerts even when service is deleted from Nagios

Posted: Mon Sep 14, 2015 11:21 am
by yunushaikh
Hello Experts

i noticed something strange today. Yesterday I configured one service which was in critical state. Since the configuration was incorrect I removed that service from my configuration file.
I cannot see that service in the nagios web interface and even cannot find anything in logs.
But I have got lot of email notifications of that service and still the notification is coming even if service is not present.

I dont know from where this notification is coming. I tried to restart the nagios as well as ndotuils everything related to nagios.

Can you please help me in finding where this service is coming from?

Re: Getting alerts even when service is deleted from Nagios

Posted: Mon Sep 14, 2015 3:55 pm
by hsmith
When you said that you restarted Nagios, you mean you did a service nagios restart from the command line?

Re: Getting alerts even when service is deleted from Nagios

Posted: Tue Sep 15, 2015 12:39 am
by yunushaikh
Yes thats correct i did frm command line.with same command u hv written

Re: Getting alerts even when service is deleted from Nagios

Posted: Tue Sep 15, 2015 1:33 am
by Box293
grep the etc directory to find any references of it:

Code: Select all

grep -R 'centos01' /usr/local/nagios/etc/
Replace centos01 with the name of the service.

There may be multiple nagios processes running, try:

Code: Select all

service nagios stop
killall -9 nagios
service nagios start

Re: Getting alerts even when service is deleted from Nagios

Posted: Tue Sep 15, 2015 4:07 am
by yunushaikh
I think you are correct.

I just did ps -ef |grep nagios and saw that there were multiple process with
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

I kill those process manually and all other process of worker were killed automatically.

Killall -9 nagios would have killed my putty session because my username also consist of nagios.

But thanks a lot for your master mind. I have restarted my nagios again. Lets me monitor and I will update you if I dont recieve any notification of that service. Thanks a lot for your solution,

Re: Getting alerts even when service is deleted from Nagios

Posted: Tue Sep 15, 2015 5:18 am
by yunushaikh
Hello Sir,
You are brilliant. You identified problem so easily. Thanks a lot for your support. I am not getting alerts any more.
This was case with multiple service but I didnt get how can multiple service start.

I always use service nagios stop && service nagios start.
or service nagios restart.

It was very strange that it did not even tell me that nagios is already started if the process was already there.

Re: Getting alerts even when service is deleted from Nagios

Posted: Tue Sep 15, 2015 9:03 am
by hsmith
Thanks for replying with what the issue was. I will leave this thread open for a bit so we can monitor and make sure that it doesn't happen again.

Re: Getting alerts even when service is deleted from Nagios

Posted: Wed Sep 16, 2015 6:14 am
by yunushaikh
Yes this worked for me I am not getting any more alerts.
Otherwise the alerts were flooded in my inbox with 2 alerts every hour.

Re: Getting alerts even when service is deleted from Nagios

Posted: Wed Sep 16, 2015 9:13 am
by hsmith
Good to hear it's still working! I'll mark this one resolved and close it up.