Unable to get Kapacitor alert details property in Alerta



We are in the process of implementing TICK as a replacement for our current monitoring platform and still getting our feet wet, so bare with me :slight_smile:
We are going to leverage Alerta as our event console so we will send any Kapacitor alerts there for distribution and everything works fine with the integration unless I try to expose the details property to Alerta. We populate that property in the alert with an internal URL that has run book info in it for the on-call engineer to reference as part of our incident management process so would prefer to have this flow into Alerta, but when I configure it that way, I am getting the following in the kapacitor log

ts=2019-01-07T22:35:04.328Z lvl=error msg="failed to evaluate Alerta template" service=alerta handler=alerta topic=services err="template: value:1:3: executing \"value\" at <.Details>: can't evaluate field Details in type alert.TemplateData" value="{{ .Details }}"

The config for our topic handler for alerta looks like this:

topic: services id: alerta kind: alerta options: resource: '{{ .Name }}' event: '{{ .ID }}' environment: '{{ index .Tags "env"}}' group: '{{ .Group }}' origin: 'kapacitor' value: '{{ .Details }}' service: ['Pinger Service']

A typical alert looks like this

`var limit = 1
var escalations = 2

dbrp “telegraf”.“autogen”

var data = stream
|stateCount(lambda: “blocked_rate” > limit)

.id(‘Too many hard blocked accounts’)
.message(’{{ .Level }} alert: {{ .ID }}: current value {{ index .Fields “blocked_rate” | printf “%0.2f” }}’)
.crit(lambda: “count” > escalations)
If I change the topic handler to pass in something like {{ .ID }} or {{ .Message }} as the value option it works, so not sure what I’m doing wrong or if I’m just misunderstanding whether or not it’s possible to pass in the details property to Alerta.

We are running the following versions:
InfluxDB - 1.7.1 (OSS)
Kapacitor - 1.5.1

Any help would be greatly appreciated