Duplicate Entry Issue
-
mindspring
- Posts: 117
- Joined: Thu Jul 19, 2012 10:24 am
Duplicate Entry Issue
My monitoring service stopped and I checked the configuration and got this message a few days after installation.
Warning: Duplicate definition found for host 'xi_host_generic' (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting on line 171)
Error: Could not add object property in file '/usr/local/nagios/etc/hosttemplates.cfg' on line 172.
Error processing object config files!
This is my second install. I had similiar duplicate entry issues which I couldn't fix and then re installed.
My question is
1)How do I resolve these duplicate entry issues. I don't even know where to start looking
2) Why are they occurring?
3) Any advice on how to post on the customer forum would be appreciated. I tried using my reseller login details but then it failed, I registered with new details but don't know how to gain post access to the customer forum section.
Thanks
1) CEntos 5.7
2) 32 bit
3) Xen Image
4) Gnome is installed on the system
5) Nagios XI 201 r 1.9
Warning: Duplicate definition found for host 'xi_host_generic' (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting on line 171)
Error: Could not add object property in file '/usr/local/nagios/etc/hosttemplates.cfg' on line 172.
Error processing object config files!
This is my second install. I had similiar duplicate entry issues which I couldn't fix and then re installed.
My question is
1)How do I resolve these duplicate entry issues. I don't even know where to start looking
2) Why are they occurring?
3) Any advice on how to post on the customer forum would be appreciated. I tried using my reseller login details but then it failed, I registered with new details but don't know how to gain post access to the customer forum section.
Thanks
1) CEntos 5.7
2) 32 bit
3) Xen Image
4) Gnome is installed on the system
5) Nagios XI 201 r 1.9
You do not have the required permissions to view the files attached to this post.
Re: Duplicate Entry Issue
There is a static config file that we retain for backwards compatibility purposes in /usr/local/nagios/etc/static/xitemplates.cfg, and I would try backing up, then removing that file from that directory and see if that lets you Apply Configuration. The xi_host_generic templates is one of the templates in that files.
Can you send me a PM with your customer information and I'll get you added to the Customer Forum.
Can you send me a PM with your customer information and I'll get you added to the Customer Forum.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Duplicate Entry Issue
The problem is you are using the import feature and importing files that shouldn't be imported.
The file /usr/local/nagios/etc/static/xitemplates.cfg for example should never be imported...
That said, you may be able to fix this this by deleting that file off of the server then going to
Configure -> CCM -> Tools -> Write Config Files
Click the top 3 items, if there are no errors click the restart option, if you get new errors about Duplicate definition do the following then repete the top 3 items in Configure -> CCM -> Tools -> Write Config Files
ONLY ONCE There are no Errors, click the 4th button. If there are errors we need to fix them and then repeat step 3).
Once there are no errors click the 4th Go button, then wait a couple minutes.
Go to Configure -> CCM -> Apply Configuration -> Apply Configuration
The file /usr/local/nagios/etc/static/xitemplates.cfg for example should never be imported...
That said, you may be able to fix this this by deleting that file off of the server then going to
Configure -> CCM -> Tools -> Write Config Files
Click the top 3 items, if there are no errors click the restart option, if you get new errors about Duplicate definition do the following then repete the top 3 items in Configure -> CCM -> Tools -> Write Config Files
ONLY ONCE There are no Errors, click the 4th button. If there are errors we need to fix them and then repeat step 3).
Once there are no errors click the 4th Go button, then wait a couple minutes.
Go to Configure -> CCM -> Apply Configuration -> Apply Configuration
-
mindspring
- Posts: 117
- Joined: Thu Jul 19, 2012 10:24 am
Re: Duplicate Entry Issue
Thanks,
I removed that file then restarted and that particular message disappeared. I then got a whole new string of errors when trying to write the config file.
Warning: Duplicate definition found for service 'Uptime' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 77)
Warning: Duplicate definition found for service 'Ping' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 62)
Warning: Duplicate definition found for service 'Memory Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 46)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 30)
Warning: Duplicate definition found for service 'CPU Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 14)
Warning: Duplicate definition found for service 'Ping' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/Tungsten.cfg', starting on line 30)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/Tungsten.cfg', starting on line 14)
Error: Invalid max_check_attempts value for host 'Cobalt'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/Cobalt.cfg', starting on line 14)
Error processing object config files!
Any idea why there are so many duplicates when all I did last week was a few hosts? how do I get rid of them?
Thanks
I removed that file then restarted and that particular message disappeared. I then got a whole new string of errors when trying to write the config file.
Warning: Duplicate definition found for service 'Uptime' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 77)
Warning: Duplicate definition found for service 'Ping' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 62)
Warning: Duplicate definition found for service 'Memory Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 46)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 30)
Warning: Duplicate definition found for service 'CPU Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 14)
Warning: Duplicate definition found for service 'Ping' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/Tungsten.cfg', starting on line 30)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/Tungsten.cfg', starting on line 14)
Error: Invalid max_check_attempts value for host 'Cobalt'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/Cobalt.cfg', starting on line 14)
Error processing object config files!
Any idea why there are so many duplicates when all I did last week was a few hosts? how do I get rid of them?
Thanks
-
mindspring
- Posts: 117
- Joined: Thu Jul 19, 2012 10:24 am
Re: Duplicate Entry Issue
Hi mguthrie,
The contact button is greyed out when I try to PM you. I think I don't have permissions perhaps.
Could you check for me please? I just added you as a friend so perhaps that helps.
The contact button is greyed out when I try to PM you. I think I don't have permissions perhaps.
Could you check for me please? I just added you as a friend so perhaps that helps.
-
mindspring
- Posts: 117
- Joined: Thu Jul 19, 2012 10:24 am
Re: Duplicate Entry Issue
Hi Mguthrie and Scott,
Thanks - removing the file got rid of the error I previously had. I now have some more dulpicate errors below.
I'm not sure why these duplicates started occurring.
Mguthrie, I tried PM'ing you but it was greyed out. I tried adding you as a friend so hopefuly that works.
Warning: Duplicate definition found for service 'Uptime' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 77)
Warning: Duplicate definition found for service 'Ping' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 62)
Warning: Duplicate definition found for service 'Memory Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 46)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 30)
Warning: Duplicate definition found for service 'CPU Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 14)
Warning: Duplicate definition found for service 'Ping' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/Tungsten.cfg', starting on line 30)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/Tungsten.cfg', starting on line 14)
Error: Invalid max_check_attempts value for host 'Cobalt'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/Cobalt.cfg', starting on line 14)
Error processing object config files!
Thanks - removing the file got rid of the error I previously had. I now have some more dulpicate errors below.
I'm not sure why these duplicates started occurring.
Mguthrie, I tried PM'ing you but it was greyed out. I tried adding you as a friend so hopefuly that works.
Warning: Duplicate definition found for service 'Uptime' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 77)
Warning: Duplicate definition found for service 'Ping' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 62)
Warning: Duplicate definition found for service 'Memory Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 46)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 30)
Warning: Duplicate definition found for service 'CPU Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/192.168.100.252.cfg', starting on line 14)
Warning: Duplicate definition found for service 'Ping' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/Tungsten.cfg', starting on line 30)
Warning: Duplicate definition found for service 'Drive C: Disk Usage' on host 'Tungsten' (config file '/usr/local/nagios/etc/services/Tungsten.cfg', starting on line 14)
Error: Invalid max_check_attempts value for host 'Cobalt'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/Cobalt.cfg', starting on line 14)
Error processing object config files!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Duplicate Entry Issue
The duplicates are likely caused by adding a a hostgroup or host to a different service.
That's not the only problem you are having though, the
Go to CCOM -> Hosts -> Cobalt -> Modify -> Check Settings Tab
Set
Max. check attempts = 5
Then
Configure -> CCM -> Tools -> Write Config Files
Click the top 3 items, if there are no errors click the restart option, if you get new errors about Duplicate definition do the following then repete the top 3 items in Configure -> CCM -> Tools -> Write Config Files
ONLY ONCE There are no Errors, click the 4th button. If there are errors we need to fix them and then repeat step 3).
Once there are no errors click the 4th Go button, then wait a couple minutes.
Go to Configure -> CCM -> Apply Configuration -> Apply Configuration
That's not the only problem you are having though, the
Go to CCOM -> Hosts -> Cobalt -> Modify -> Check Settings Tab
Set
Max. check attempts = 5
Then
Configure -> CCM -> Tools -> Write Config Files
Click the top 3 items, if there are no errors click the restart option, if you get new errors about Duplicate definition do the following then repete the top 3 items in Configure -> CCM -> Tools -> Write Config Files
ONLY ONCE There are no Errors, click the 4th button. If there are errors we need to fix them and then repeat step 3).
Once there are no errors click the 4th Go button, then wait a couple minutes.
Go to Configure -> CCM -> Apply Configuration -> Apply Configuration
-
mindspring
- Posts: 117
- Joined: Thu Jul 19, 2012 10:24 am
Re: Duplicate Entry Issue
Thanks for your help Scott, that got rid of that particular error.
Now I am getting this error:
Error: Could not find any hostgroup matching 'windows-servers' (config file '/usr/local/nagios/etc/hosts/cobalt.sam.cpt.cfg', starting on line 14)
Error processing object config files!
Yet when I check the host Cobalt, none of the hostgroups are selected and there is no such host group called windows-servers, only with description Windows Servers
Now I am getting this error:
Error: Could not find any hostgroup matching 'windows-servers' (config file '/usr/local/nagios/etc/hosts/cobalt.sam.cpt.cfg', starting on line 14)
Error processing object config files!
Yet when I check the host Cobalt, none of the hostgroups are selected and there is no such host group called windows-servers, only with description Windows Servers
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Duplicate Entry Issue
Ok, there likely used to be one.
Go to Configure -> CCM -> hosts -> cobalt.sam.cpt -> modify
Click the notepad by hostgroups
Click save (not abort)
Click Save again
Then
Configure -> CCM -> Tools -> Write Config Files
Click the top 3 items, if there are no errors click the restart option, if you get new errors about Duplicate definition do the following then repete the top 3 items in Configure -> CCM -> Tools -> Write Config Files
ONLY ONCE There are no Errors, click the 4th button. If there are errors we need to fix them and then repeat step 3).
Once there are no errors click the 4th Go button, then wait a couple minutes.
Go to Configure -> CCM -> Apply Configuration -> Apply Configuration
Go to Configure -> CCM -> hosts -> cobalt.sam.cpt -> modify
Click the notepad by hostgroups
Click save (not abort)
Click Save again
Then
Configure -> CCM -> Tools -> Write Config Files
Click the top 3 items, if there are no errors click the restart option, if you get new errors about Duplicate definition do the following then repete the top 3 items in Configure -> CCM -> Tools -> Write Config Files
ONLY ONCE There are no Errors, click the 4th button. If there are errors we need to fix them and then repeat step 3).
Once there are no errors click the 4th Go button, then wait a couple minutes.
Go to Configure -> CCM -> Apply Configuration -> Apply Configuration
-
mindspring
- Posts: 117
- Joined: Thu Jul 19, 2012 10:24 am
Re: Duplicate Entry Issue
Thanks, I tried that and I get exactly the same error
Error: Could not find any hostgroup matching 'windows-servers' (config file '/usr/local/nagios/etc/hosts/cobalt.sam.cpt.cfg', starting on line 14)
Error processing object config files!
Is there any other place this could be lurking?
Error: Could not find any hostgroup matching 'windows-servers' (config file '/usr/local/nagios/etc/hosts/cobalt.sam.cpt.cfg', starting on line 14)
Error processing object config files!
Is there any other place this could be lurking?