Hi all,
I was wondering whether it is possible to use values of tags or fields to send them to a .exec() property of an alert node, as part of arguments to the script you are calling.
Given this portion of a tick script
|alert()
.id(’{{ index .Tags “Site” }}-{{ index .Tags “host” }}’)
.message(‘Origin cache hit ratio lower than 40% for the past 10 minutes ‘)
.warn(lambda: “chr” < warn AND !(hour(“time”) >= 2 AND hour(“time”) <= 6))
.exec(’/opt/influx/bin/tick/trapsender.sh’, ‘{{ index .Tags “Site” }}’, ‘{{ index .Tags “host” }}’)
The script trapsender.sh accepts two parameters as an input. The problem I’m facing is that it executes but it’s taking the string values instead of the tag value.
Have you ever come accross this issue? Do you know if the .exec() property works like this?
Thanks in advance