question on template based objects

Giulio Chiappini karmik at infinito.it
Sat Jul 12 12:05:48 CEST 2003


At 11.43 11/07/2003 -0700, you wrote:

>I had a question regarding the use of templates.
>Say for example I have various configuration files such as:
>
>servers.cfg
>network.cfg
>ups.cfg
>
>In my network.cfg file, I have this "host definition template"
>
>define host{
>         name                            network ; common template
>         check_command                   check-host-alive
>         max_check_attempts              3       ; Max attempts
>         notifications_enabled           1       ; Host notifications are 
> enabled
>         notification_interval           5       ; Notification Interval
>         notification_period             24x7    ; Notification Period
>         notification_options            d,r,u     ; Notification Options
>         event_handler_enabled           1       ; Host event handler is 
> enabled
>         flap_detection_enabled          1       ; Flap detection is enabled
>         process_perf_data               1       ; Process performance data
>         retain_status_information       1       ; Retain status 
> information across program restarts
>         retain_nonstatus_information    1       ; Retain non-status 
> information across program restarts
>         register                        0       ; DONT REGISTER THIS 
> DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
>         }
>
>My question is would I be able to now use this host definition template in 
>my servers.cfg and ups.cfg without having to enter the text list above in 
>my servers.cfg and ups.cfg files. (Basically so that I don't have to enter 
>this host template 3 times)
>
>I'm migrating from Netsaint to Nagios and I'm trying to get use to this 
>template based setup.
>
>Many thanks.
>
>Jason T.
Of course , nagios read definitions from configuration files and load them 
in the same envinroment. This is the very own purpose of template , so you 
really have to set the template just one time. 



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
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