PDA

View Full Version : Include one template to host many times


rekby
31-07-2010, 16:25
I need to monitor some tens servers, in each server run 3-5 web-servers.

every web-server have test domain name:
test-ServerNumber-WebServerType.domain

I have template BASE with item HttpAvailable. It is external check with key script[{$SERVER} {$TYPE}].

I create two subtemplates: CHILD-1 and CHILD-2, each link to BASE and define macros {$TYPE} (in CHILD-1 - {$TYPE} = 1, in CHILD-2 {$TYPE} = 2).

I need create host SERVER-1, link it to CHILD-1 and CHILD-2 and define macros {$SERVER}=1, but i can't do it with warning: "Template with item key [script[{$SERVER} {$TYPE}]] already linked to host.

In result i want define base template for web-server one time (with items, triggers, ...) and add it to one host many times with different parameters.

How I can do it?

richlv
11-08-2010, 20:43
i don't think you can do it currently that way. most likely you would have to create new host for each website (which isn't a huge problem usually), then override the macro on the host level - and that way you have only single template to take care of