Hi,
I wrote a TICK script, and I need to use one of the tag present in my data to define the ID of an alert.
Nothing really complicated there (already done it a few times) but the problem is that my tag contains dots in it, so it ends up generating a problem, because (as far as I understand) the Go templating system does not allow keys to have dots.
Exemples :
|alert()
.id(’{{ index .Tags “whatever”}}’)
=> works fine
|alert()
.id(’{{ index .Tags “my.tag.with.dots”}}’)
=> does not work
I can’t really change that tag name (it’s generated by the Docker Telegraf input plugin, which collect all the labels on a container and use it as a tag for the metric. That label is put by our orchestrator, so I can’t change it).
And the fact is that a tag with dots is totally allowed in InfluxDB, but unusable in a Kapacitor AlertNode… so might be considered as a bug ?
Does somebody knows of a possible workaround ?
I thought about using an alias for the tag, but didn’t find how to do it (if possible).
Of course, I already tried to escape the dots (using single and double backslashes), without success…
Any idea ?