Possible discrepancy in Documentation and Functionality of Nagios v2.0b6

Zac spdrmonkey at gmail.com
Thu Dec 29 15:32:35 CET 2005


As I understand it, the rules are to always over write the template, so if
you want the host to appear in cf-appservers as well as in cf-servers, then
you will need to put both in the hostgroup directive in the host
definition.

-Zac

On 12/29/05, Morten Werner Olsen <werner at skolelinux.no> wrote:
>
> On Thu, Dec 29, 2005 at 09:00:25AM +0100, Morten Werner Olsen wrote:
> > On Wed, Dec 28, 2005 at 06:54:31PM +0100, Andreas Ericsson wrote:
> >
> > > The hostgroup still needs to be created. There doesn't have to be a
> > > "members" line, but there has to be hosts in the hostgroup. You can
> thus
> > > create a config such as this
> > >
> > > define hostgroup{
> > >     hostgroup_name  hostgrp
> > >     alias           Alias for hostgrp
> > > }
> > >
> > > define host {
> > >     use        the_template_that_includes_everything
> > >     host_name  the_host
> > >     hostgroups hostgrp
> > > }
> >
> > This works for me now after upgrading to 2.0rc1 (I believe it didn't
> > in 2.0b4), and that is great! :) But this resulted in another problem
> > with defining the hostgroups in template-hosts only:
> >
> > # cf template host (based on another global template)
> > define host {
> >        use            linux-host
> >        name           linux-host-cf
> >        hostgroups     cf-servers
> >        contact_groups cf-core
> >        register               0
> > }
> >
> > # cf-servers - host group definition
> > define hostgroup {
> >        hostgroup_name cf-servers
> >        alias          cf-servers
> > }
> >
> > # cf-app1 - application server #1
> > define host {
> >         use             linux-host-cf
> >         host_name       cf-app1
> >         alias           cf-app1
> >       hostgroups      cf-appservers
> >         address         10.0.0.21
> > }
> >
> > [a lot of hosts]
> >
> > # diffhost - last host based on linux-host-cf template
> > define host {
> >         use             linux-host-cf
> >         host_name       diffhost
> >         alias           diffhost
> >         address         10.0.0.43
> > }
> >
> > The wierd thing is that diffhost is the only host showing up
> > (webinterface) in the cf-servers hostgroup, and I also get warnings
> > during the configtest about the other hosts having no services
> > associated with them (I specify a ping-service to the cf-servers
> > hostgroup).
>
> Just noticed that diffhost is the only host not having a hostgroups
> definition, so I believe this is not so wierd afterall, but just the
> hostgroups definition from the template that is overridden for
> cf-app1? I would like to see this work out with adding hostgroups both
> in the templates and in the host definition, but it is probably
> breaking the basic rules for templating in Nagios?
>
>
> - Werner
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20051229/5abe5587/attachment.html>


More information about the Developers mailing list