Page 1 of 1

Hostgroup Error

Posted: Fri Feb 24, 2012 10:19 am
by Cobra1337
I was trying to setup a host after installing Nagios and I wanted to group it with localhost which is monitored by standard, but I ran into this error:

Code: Select all

Warning: Duplicate definition found for hostgroup 'linux-servers' (config file '/usr/local/nagios/etc/objects/bsc-smb.cfg', starting on line 46)
Error: Could not add object property in file '/usr/local/nagios/etc/objects/bsc-smb.cfg' on line 47.
   Error processing object config files!
I know I got this error because hostgroup_name is the same in two *.cfg files. If I want to create hosts with the same hostgroup_name do they have to be defined in the SAME config file, because right now I have them separated?

Re: Hostgroup Error

Posted: Fri Feb 24, 2012 1:32 pm
by mguthrie
Can you post your configs for this file:
/usr/local/nagios/etc/objects/bsc-smb.cfg

and

hostgroups.cfg

Re: Hostgroup Error

Posted: Mon Feb 27, 2012 5:42 pm
by kiuby
You can only declare one instance of hostgroup_name so you have to put the name of all your host group in the same config file.