On Sun, Apr 16, 2017 at 11:54:37AM +0100, Stuart Henderson wrote:
> On 2017/04/16 10:45, Florian Obser wrote:
> > Hi,
> > 
> > so the icinga port @samples quite a few config files for
> > /etc/icinga/object/. Some of them are starting to get in the way.
> > 
> > printer.cfg, switch.cfg, windows.cfg, localhost.cfg:
> > 
> > I place all my hosts in a subdirectory "objects/hosts" and use
> > obj_dir=/etc/icinga/objects, also I don't monitor a printer. I can
> > delete those files, but they are put back on every update. 
> > I suspect I can just empty them. But then I have those files
> > lying around.
> > 
> > localhost.cfg is particularly anoying since I do have a host named
> > localhost defined somewhere else which then leeds to icinga not
> > starting after an upgrade because the object is defined twice.
> > 
> > My knee jerk reaction is to stop @sample'ing those files, but maybe
> > there is a better way to deal with this?
> > 
> > Thanks,
> > Florian
> > 
> > -- 
> > I'm not entirely sure you are real.
> 
> I see where you're coming from, there's a lot of junk in there, but
> think it is quite useful to have a working default config after a pkg_add
> and I don't see a different way to achieve that.

OK, you are the maintainer, your call :).

> 
> I just ignore the objects/ directory completely: copied what I wanted
> to another directory and changed the cfg_file lines in icinga.cfg.

Thanks, I'll go with this.

> 
> Otherwise leaving them as blank files would do the trick, as would
> removing/commenting the relevant icinga.cfg lines.
> 

The last part doesn't work since I use cfg_dir, and don't list files
esplicitly. Downside is it picks up everything. Upshot is I (or rather
the config managment system) drops a host file in there and everything
happens automagically.

Thanks for the pointers, I think I have my problem solved.

-- 
I'm not entirely sure you are real.

Reply via email to