You are here

How do I use variables in Eventhandler script

4 posts / 0 new
Last post
pkm
pkm's picture
How do I use variables in Eventhandler script

Hi

Is it possible to pass variables to event handler scripts?
My event handler script runs, but when I try to pass a variable like the following example it doesn't work:

Edit Host->Service Checks->Exceptions->Eventhandler: restart_vpn.sh %VPN_RESTART:1% %VPN_RESTART:2% %VPN_RESTART:3% %VPN_RESTART:4%

VPN_RESTART is my variable, which includes vpn router IP, username, password and remote peer IP.

The script runs, but the variable resolves the to the variable name ( etc. %VPN_RESTART:4%)

Did I miss anything?

Regards - Mads

Duncan Ferguson
dferguson's picture
I'll investigate this and let

I'll investigate this and let you know

  Duncs

Duncan Ferguson
dferguson's picture
After further investigation,

After further investigation, this is functionality that is missing from the product and is not something you have missed.

 

We think this would be a good feature to add to the product so will consider adding the variables into event handlers in a future release.  We will look to let you know when we have a release version and date for this change.

  Duncs

 

pkm
pkm's picture
Thank you. Regards - Mads

Thank you.

Regards - Mads