Page 1 of 1
Duplicate emails being sent
Posted: Thu Jun 22, 2017 11:07 am
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
Re: Duplicate emails being sent
Posted: Thu Jun 22, 2017 12:20 pm
by lmiltchev
Did you check to see if you have multiple instances of nagios running?
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?
Re: Duplicate emails being sent
Posted: Thu Jun 22, 2017 12:26 pm
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.
Re: Duplicate emails being sent
Posted: Thu Jun 22, 2017 12:30 pm
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.
Re: Duplicate emails being sent
Posted: Thu Jun 22, 2017 12:33 pm
by snapon_admin
Ok cool, Just for future reference how do I tell the difference between parent and child with his info?
Re: Duplicate emails being sent
Posted: Thu Jun 22, 2017 12:39 pm
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
The 8865 processes have a similar pattern.
Please let us know if you have any additional questions.
Re: Duplicate emails being sent
Posted: Thu Jun 22, 2017 12:46 pm
by snapon_admin
Got it, thanks much. You can close this up.
Re: Duplicate emails being sent
Posted: Thu Jun 22, 2017 12:49 pm
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.