organizing config files with templates

mail at catsnest.co.uk mail at catsnest.co.uk
Wed Aug 19 20:31:05 CEST 2009


> >>
> >> Sounds a lot like what I use... I also use host-templates for example:
> >>
> >> define host{
> >>                 use               solaris,dns,an-other-app
> >>                 address...
> >> }
> >>
> >> the solaris host-template applies standard checks like disk, cpu, SMF.
> >> the solaris-10-global template applies checks such as zone-checks
> >
> > Hmm, could you eventually explain how the "solaris host-template applies
> > standard checks (which seem to me like services) ? How do you do this ?
> >
>

Yes checks = services

Sorry i should be more careful with my terminology

...

>
>
> I think he is doing this:
>
> define service{
>        use
> server-1-hour-retry-emailonly-noticket
>        hostgroup_name                  windows
>        service_description             cpu
>        check_command                   check_nrpe_win_cpu!80!90
>        }
>
> define service{
>        use                             server-servicehours
>        hostgroup_name                  windows
>        service_description             commit charge
>        check_command                   check_nrpe_win_memory_page!90%!95%
>        }
>
> define service{
>        use                             server
>        hostgroup_name                  windows
>        service_description             uptime
>        servicegroups                   uptime
>        check_command                   check_nrpe_win_uptime!1h
>        retry_check_interval            70
>        }
>
> So, all hosts in the windows host_group will get the uptime,cpu, and
> commit charge services.


Thats right, linking the services to hostgroups
and just using a host-template to add the host to a host_group

eg, using the above example a (simplified) host-template would look like

define host{
         name                  windows
         hostgroup        +windows
         register             0
}


I actually then 'use' another host-template in the above, to set default
options such as check_command.

Ritchie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090819/bc559c9b/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
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