TICK Script HttpPost Headers

Hi,

Is it possible to send variable headers with a HttpPost in Kapacitor? I need to make a POST-call to a rest API with the hostname and alert level of the machine that triggered the alert. (E.g. adding keys and values in the post header)

When I try the following:

|alert()
    ...
    .post()
    .header('machine', '{{ index .Tags "host" }}')
    .header('level', '{{.Level}}')

Then I get the strings ‘{{ index .Tags “host”}}’, ‘{{.Level}}’ and not the values they hold.
Is there any way to fix this?

Thanks in advance!