Duplicate emails being sent

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Duplicate emails being sent

Post by snapon_admin »

Starting last night we've started getting duplicate Notifications sent for most, if not all, of our alerts. These alerts are time stamped 10-20 seconds apart usually but are the exact same alert. Here's a snip from the notifications report to show some examples.
notifications report.png
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Duplicate emails being sent

Post by lmiltchev »

Did you check to see if you have multiple instances of nagios running?

Code: Select all

ps -ef | grep nagios.cfg
Try stopping/starting services (nagios & ndo2db) to see if this is going to help.

What is the version of the Nagios XI that you are currently using? Is there anything custom, that is set up - failover, livestatus, mod gearman?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Duplicate emails being sent

Post by snapon_admin »

Code: Select all

[root@lisl-ngos-01-pv ~]# ps -ef | grep nagios.cfg
nagios    8865     1  9 12:24 ?        00:00:03 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios    9117  8865  0 12:24 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root     15566 28752  0 12:24 pts/0    00:00:00 grep nagios.cfg
nagios   18265     1  3 Jun21 ?        00:52:34 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   18358 18265  0 Jun21 ?        00:00:04 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Version 5.4.3 and nothing custom like that. If I stop Nagios and run that same command it still shows 2 instances:

Code: Select all

[root@lisl-ngos-01-pv ~]# ps -ef | grep nagios.cfg
nagios   18265     1  3 Jun21 ?        00:52:37 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   18358 18265  0 Jun21 ?        00:00:04 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
And then when I start Nagios it shows 4 again.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Duplicate emails being sent

Post by dwhitfield »

You have two parents. You need to kill them both (you can still one first). kill 18265 in this case. There should only be one parent. The number of children is not important.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Duplicate emails being sent

Post by snapon_admin »

Ok cool, Just for future reference how do I tell the difference between parent and child with his info?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Duplicate emails being sent

Post by dwhitfield »

Column three gives the number of the parent process. The parent will have "1" in column 3.

Here's an excerpt of columns 1, 2, and 3

Code: Select all

nagios   18265     1  
nagios   18358 18265
The 8865 processes have a similar pattern.

Please let us know if you have any additional questions.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Duplicate emails being sent

Post by snapon_admin »

Got it, thanks much. You can close this up.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Duplicate emails being sent

Post by lmiltchev »

example01.PNG
The first line is the "parent" process, the second line is the "child" process- it has the same PID as the parent (8865), and this is normal. See here:

https://support.nagios.com/kb/article/n ... hosts.html

The third line is the "grep", so it's irrelevant. The fourth line is a duplicate nagios process (parent) with PID=18265, and the fifth line is it's "child". For more info on PIDs, PPIDs, etc. see this:

https://delightlylinux.wordpress.com/20 ... -and-ppid/

Hope this helps.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked