Duplicate Services Showing in Service Details

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
chicjo01
Posts: 194
Joined: Tue Jul 28, 2015 2:52 pm

Duplicate Services Showing in Service Details

Post by chicjo01 »

I am seeing a number of duplicate services showing up in the Service Detail. Is there a way to correct it, there should be only 1 service.

Nagios XI Version: 5.2.8
[root@<Nagios Server> etc]# cat <Server>.cfg
define host {
host_name 010 N ADL <Server>
use <Template>
alias xxx.xxx.xxx.xxx
address <DNS Name>
hostgroups app+adl+esp
register 1
}
[root@<Nagios Server> etc]# cat <Service>.cfg
define service {
service_description ESP URL /WsADL/ComprehensiveADL
use <Template>
hostgroup_name app+adl+esp
check_command <Http Check>
contact_groups app+adl+esp
register 1
}
010 N ADL <Server>
ESP URL /WsADL/ComprehensiveADL Ok 27d 23h 54m 7s 1/2 2016-06-14 09:46:32 HTTP OK: HTTP/1.1 200 OK - 452 bytes in 0.106 second response time
ESP URL /WsADL/ComprehensiveADL Ok 27d 23h 54m 7s 1/2 2016-06-14 09:46:32 HTTP OK: HTTP/1.1 200 OK - 452 bytes in 0.106 second response time
ESP URL /WsADL/ComprehensiveADL Ok 27d 23h 54m 7s 1/2 2016-06-14 09:46:32 HTTP OK: HTTP/1.1 200 OK - 452 bytes in 0.106 second response time
ESP URL /WsADL/ComprehensiveADL Ok 27d 23h 54m 7s 1/2 2016-06-14 09:46:32 HTTP OK: HTTP/1.1 200 OK - 452 bytes in 0.106 second response time
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Duplicate Services Showing in Service Details

Post by bwallace »

By any chance are there multiple Nagios processes running?
What does the output of ps -aef | grep nagios.cfg reveal?
Be sure to check out the Knowledgebase for helpful articles and solutions!
User avatar
chicjo01
Posts: 194
Joined: Tue Jul 28, 2015 2:52 pm

Re: Duplicate Services Showing in Service Details

Post by chicjo01 »

Holy Smoke. How many are supposed to be running?

[root@<Nagios Server ~]# ps -aef | grep nagios.cfg
nagios 1267 1 9 11:32 ? 00:00:01 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 1469 1267 0 11:32 ? 00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 37805 1 0 Jun13 ? 00:00:17 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 37954 37805 0 Jun13 ? 00:00:05 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 66634 1 0 Jun10 ? 00:00:08 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 66741 66634 0 Jun10 ? 00:00:14 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 95626 1 0 Jun10 ? 00:00:08 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 95737 95626 0 Jun10 ? 00:00:13 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 129932 1 0 Jun11 ? 00:00:15 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 130050 129932 0 Jun11 ? 00:00:10 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 138664 1 0 Jun13 ? 00:00:08 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 138801 138664 0 Jun13 ? 00:00:04 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 141078 1 0 Jun12 ? 00:00:15 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 141196 141078 0 Jun12 ? 00:00:08 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Duplicate Services Showing in Service Details

Post by bwallace »

Multiple parent (PPID) processes are what we need to be concerned about - the Nagios process forks itself to run checks therefor sub-processes are normal.
That being said, you have multiple Nagios processes running, which can cause problems. To resolve, run these commands and after a period of monitoring,
let us know of the outcome.

Code: Select all

killall -9 nagios
service nagios start
Be sure to check out the Knowledgebase for helpful articles and solutions!
User avatar
chicjo01
Posts: 194
Joined: Tue Jul 28, 2015 2:52 pm

Re: Duplicate Services Showing in Service Details

Post by chicjo01 »

There is something which is causing the Nagios services to start back up. I used the below command to kill all the nagios processes.
ps -ef | grep nagios | awk '{print $2}' | xargs kill -9

After the restart:
[root@<Nagios Server> ~]# ps -ef | grep nagios.cfg
nagios 92835 1 4 13:03 ? 00:00:01 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 92891 92835 0 13:03 ? 00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
User avatar
chicjo01
Posts: 194
Joined: Tue Jul 28, 2015 2:52 pm

Re: Duplicate Services Showing in Service Details

Post by chicjo01 »

The issue with the duplicate in the service details is still there.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Duplicate Services Showing in Service Details

Post by tgriep »

Having 2 nagios processes is OK, one parent and one child is normal.

It could be that having multiple processes running, the configs became out of sync, try going through this process and see if that removes the duplicates for you.

Go to the Core Config Manager
Under "Tools", click "Write Config Files"
Click the "Delete" button then click the "Write" button and then the "Verify" button
If you get any errors, resolve them and click on the "Write", "Verify" until all of the errors are resolved.
Click the Apply Configuration link and click the "Apply Configuration" button
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
chicjo01
Posts: 194
Joined: Tue Jul 28, 2015 2:52 pm

Re: Duplicate Services Showing in Service Details

Post by chicjo01 »

I have followed the instructions, but I am still seeing 4 entries.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Duplicate Services Showing in Service Details

Post by lmiltchev »

Try stopping/starting services to see if this is going to solve your issue.

Code: Select all

service nagios stop
service ndo2db stop
service ndo2db start
service nagios start
If you continue to have issues, send your profile to [email protected]. This will open a new support ticket in our email ticketing system.

Admin->System Profile->Download Profile
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked