Hostgroup Error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
User avatar
Cobra1337
Posts: 4
Joined: Wed Feb 22, 2012 3:02 pm
Location: Toronto
Contact:

Hostgroup Error

Post 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?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Hostgroup Error

Post by mguthrie »

Can you post your configs for this file:
/usr/local/nagios/etc/objects/bsc-smb.cfg

and

hostgroups.cfg
kiuby
Posts: 2
Joined: Sat Feb 25, 2012 1:21 pm

Re: Hostgroup Error

Post 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.
Locked