Getting alerts even when service is deleted from Nagios

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.
Locked
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Getting alerts even when service is deleted from Nagios

Post 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?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Getting alerts even when service is deleted from Nagios

Post by hsmith »

When you said that you restarted Nagios, you mean you did a service nagios restart from the command line?
Former Nagios Employee.
me.
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: Getting alerts even when service is deleted from Nagios

Post by yunushaikh »

Yes thats correct i did frm command line.with same command u hv written
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Getting alerts even when service is deleted from Nagios

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: Getting alerts even when service is deleted from Nagios

Post 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,
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: Getting alerts even when service is deleted from Nagios

Post 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Getting alerts even when service is deleted from Nagios

Post 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.
Former Nagios Employee.
me.
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: Getting alerts even when service is deleted from Nagios

Post 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Getting alerts even when service is deleted from Nagios

Post by hsmith »

Good to hear it's still working! I'll mark this one resolved and close it up.
Former Nagios Employee.
me.
Locked