Warning: Duplicate definition found for service (HELP))
-
Technology_Vacation
- Posts: 22
- Joined: Thu Mar 21, 2013 9:07 am
Warning: Duplicate definition found for service (HELP))
Hi Team,
I am receiving tons of error messages, its not causing an issue to the GUI or command line, however not sure if it will cause a problem in the long run.
Warning: Duplicate definition found for service 'Check Memory' on host '' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 147)
Warning: Duplicate definition found for service 'Ping' on host '' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 311)
Warning: Duplicate definition found for service 'Check Zombie Processes' on host 'T' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 293)
Warning: Duplicate definition found for service 'Check Users' on host '' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 275)
Warning: Duplicate definition found for service 'Check Total Processes' on host '' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 255)
Warning: Duplicate definition found for service 'Check Memory' on host '' (config file '/usr/local/nagios/etc/services/, starting on line 220)
Warning: Duplicate definition found for service 'Check Load' on host '' (config file '/usr/local/nagios/etc/services/', starting on line 202)
Warning: Duplicate definition found for service 'Check LDAP on PORTAL.PROD' on host '' (config file '/usr/local/nagios/etc/services/', starting on line 182)
Any assistance would be greatly appreciate as to whats causing this problem.. .
I am receiving tons of error messages, its not causing an issue to the GUI or command line, however not sure if it will cause a problem in the long run.
Warning: Duplicate definition found for service 'Check Memory' on host '' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 147)
Warning: Duplicate definition found for service 'Ping' on host '' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 311)
Warning: Duplicate definition found for service 'Check Zombie Processes' on host 'T' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 293)
Warning: Duplicate definition found for service 'Check Users' on host '' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 275)
Warning: Duplicate definition found for service 'Check Total Processes' on host '' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 255)
Warning: Duplicate definition found for service 'Check Memory' on host '' (config file '/usr/local/nagios/etc/services/, starting on line 220)
Warning: Duplicate definition found for service 'Check Load' on host '' (config file '/usr/local/nagios/etc/services/', starting on line 202)
Warning: Duplicate definition found for service 'Check LDAP on PORTAL.PROD' on host '' (config file '/usr/local/nagios/etc/services/', starting on line 182)
Any assistance would be greatly appreciate as to whats causing this problem.. .
Re: Warning: Duplicate definition found for service (HELP))
Most often this type of behavior can be attributed to a hostgroup and/or servicegroup memerbship. If you have checks set up directly for the host in the host's config, be careful that the host is not also inheriting checks from a hostgroup or servicegroup with the same checks configured.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
Technology_Vacation
- Posts: 22
- Joined: Thu Mar 21, 2013 9:07 am
Re: Warning: Duplicate definition found for service (HELP))
Thank you,
Is it possible to provide step by step instructions on how to investigate this problem and resolve? and how to prevent it from happening moving forward?
Is it possible to provide step by step instructions on how to investigate this problem and resolve? and how to prevent it from happening moving forward?
Re: Warning: Duplicate definition found for service (HELP))
The warning are oddly formatted, as it appears you do not have hostnames on these checks:
If you are not worried about exposing your config to these forums, I would suggest posting your service configuration in code wraps.
Notice the bolded pair of single quotes? There should be a hostname between those quotes. Did you remove the hostname in an effort to obfuscate for the post, or were these lines copied verbatim?Warning: Duplicate definition found for service 'Check Memory' on host '' (config file '/usr/local/nagios/etc/services/.cfg', starting on line 147)
If you are not worried about exposing your config to these forums, I would suggest posting your service configuration in code wraps.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
Technology_Vacation
- Posts: 22
- Joined: Thu Mar 21, 2013 9:07 am
Re: Warning: Duplicate definition found for service (HELP))
yes I removed the Hostname....
So for example it will be abc.xxx.com its the same for the entire output provided..
So for example it will be abc.xxx.com its the same for the entire output provided..
Re: Warning: Duplicate definition found for service (HELP))
I would check the templates and hostgroups associated with the host. Make sure the services are only defined once. This is no exact method for hunting down these types of config issues. I prefer to separate hosts configs into individual file as it make hunting down config issues a bit easier.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
Technology_Vacation
- Posts: 22
- Joined: Thu Mar 21, 2013 9:07 am
Re: Warning: Duplicate definition found for service (HELP))
Templates -checked
hostgroup-checked
Service- is only defined once..
However located the error message it states in /usr/local/nagios/etc/services/abc.juniper.com.cfg starting on line 141. I decided to go in the path /usr/local/nagios/etc/services
If i were to run the command as listed below for the problematic servers.
[TechnologyVacation@Nagios1]$ ll ABC*
-rw-r--r--. 1 apache nagios 12442 Jun 7 14:15 abc.juniper.com.cfg
-rw-r--r--. 1 apache nagios 12442 Jun 7 14:15 ABC.JUNIPER.COM.cfg
It shows a duplicate cfg file , one lower/UPPER Case.. So what could be causing this to happen? how to remove and prevent from this problem from persisting..
hostgroup-checked
Service- is only defined once..
However located the error message it states in /usr/local/nagios/etc/services/abc.juniper.com.cfg starting on line 141. I decided to go in the path /usr/local/nagios/etc/services
If i were to run the command as listed below for the problematic servers.
[TechnologyVacation@Nagios1]$ ll ABC*
-rw-r--r--. 1 apache nagios 12442 Jun 7 14:15 abc.juniper.com.cfg
-rw-r--r--. 1 apache nagios 12442 Jun 7 14:15 ABC.JUNIPER.COM.cfg
It shows a duplicate cfg file , one lower/UPPER Case.. So what could be causing this to happen? how to remove and prevent from this problem from persisting..
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Warning: Duplicate definition found for service (HELP))
I just want to be 100% certain, since I rarely have seen this as a manual configuration issue. Are you on Nagios Core or Nagios XI? Also which specific version? Otherwise, can you compare the two files, are there any configuration similarities other than capitalization? Are there any service checks with the same name?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
Technology_Vacation
- Posts: 22
- Joined: Thu Mar 21, 2013 9:07 am
Re: Warning: Duplicate definition found for service (HELP))
Nagios XI 2012R1.6
When I run a diff on both the lower & Uppercase file ( there is no difference )
Possible bug?
When I run a diff on both the lower & Uppercase file ( there is no difference )
Possible bug?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Warning: Duplicate definition found for service (HELP))
Moved this to the Nagios Xi section, since you posted in Core. Are all of your services displaying this problem? I believe there was a bug related to this, I'll check up on that awaiting your reply.