Campaign: Shinken

Calculation or processing string in MACRO

I would like to add a processing string to my macro:

- basic mathematic operation ( +,- ....)

- substring

- etc ....

 

Example:

define service {

service_description SUPERSERVICE..................

check_command check_super_service!($_HOSTVAR1$-$_VAR2$)

}

 

**** other example with _HOSTWEBSITE=myapps.dev.enterprise.org:

 

define service {

service_description WEBSITE substr($_HOSTWEBSITE$,.) ; i just want hostname of FQDN

..................

check_command check_vhost!$_HOSTWEBSITE$

}

Submitted by

Tags

Voting

0 votes
Idea No. 125