Template Based Configuration Issues

Andreas Ericsson ae at op5.se
Sat Feb 26 16:29:01 CET 2005


Adams, Russell L. wrote:
> I'm migrating from a Netsaint 0.0.7 installation to Nagios 1.2, and
> was frustrated by portions of the template based configuration. I
> thought I'd check here for advice.
> 

Nagios 2 is out.

> I love the new inheritance features using templates and being able to
> apply services across hostgroups. In Netsaint I was using some
> elaborate custom perl scripting to accomplish similar tasks and was
> hoping to avoid similar scripts for Nagios by utilizing the templates.
> 
> One problem I'm having is that wildcards cannot contain glob patterns
> (ie: members server* ). I did a quick test to see if it worked,
> which failed for me. Is this correct that a wildcard can mean all
> hosts, and only all hosts?
> 

Sort of. Nagios 2 has regex support for referencing though.

> Secondly, it appears that the template definitions cannot be squeezed
> into one line, for example:
> 
> define host{ host_name host ; alias hostalias ; use Template };
> 
> Is there a format for this I missed in the documentation, or must each
> template based record truly be newline separated?
> 

Each template based record must truly be newline separated. ; marks rest 
of the line as a comment, so that's a no go for variable separation.

> Third, I'm frustrated by the fact that I have to list every member
> host in the hostgroup definition. For automation purposes I was hoping
> to be able to define which hostgroup to join in the host definition,
> reducing the hostgroup definition to specifying the contact group for
> the hostgroup. Are there any workarounds for this?
> 

Nagios 2 supports this.

> I'm trying to automate our Nagios configuration to a degree to keep up
> with our constantly changing network without constant manual
> intervention. 
> 
> I'm doing a domain transfer and matching hostnames in order to create
> host records for Nagios, which is why having to collect all of the
> hosts for a hostgroup definition is so problematic. However, defining
> services by the hostgroup and using host templates works wonderfully!
> 
> Any suggestions are appreciated.
> 

Upgrade to nagios 2 while you're at it. Seems it would solve at least 
some of your problems.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list