Shinken

$KEY$ with multi-values

It would be great if something like this was possible (in order to have very flexible host-template) :

 

 

define {

name my_wonderful_template

register 0

 

# Default value of the key (but value is a list)

_mykey [ "index.php", "http://$HOSTADDRESS$", "REGEX", "2"],

}

 

define service {

# We can use any item of the key.

duplicate_foreach

service_description test on $KEY[0]$

register 0

host_name my_wonderful_template

check_command check_foo!$KEY[1]$!KEY[2]$

business_impact $KEY[3]$

}

 

define host {

use my_wonderful_template

host_name bar

address 172.31.3.159

 

# 2 values for the key but each value is a list.

_mykey [ "ping.php", "http://$HOSTADDRESS$/ping.php", "REGEX", "2"], [ "toto", "http://toto", "REGEX", "4"]

}

Tags

Voting

1 vote
Idea No. 120