Dealing with json http posts in kapacitor

kapacitor
#1

I’ve tried message and details, but it seems that kapacitor escapes the json formatted data I need to send. Is there a way to let it be more ‘raw’ json?

I.E.:

var trigger = data
|alert()
.crit(lambda: “value” > crit)
.stateChangesOnly()
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)
.stateChangesOnly()
.details({
“gen_subject”:“TEST Alert - {{.Group}} received {{.Level}} alert”,
“alert_message”:“mytest alert- group- {{.Group}} - {{.Level}} - {{ index .Fields “value” }} at {{.Time}}”,
“application”:’{{index .Tags “custom”}}’,
“spec_link”:“http://sample.com”,
“metric_name”:’{{ index .Fields “name” }}’
})
.post(‘http://sample.com/special’)