Inconsistent newlines in email body text


(Jamie Burks) #1

I'm using this Watcher code to send myself emails:

"body": {
  "text": "{{#ctx.payload.hits.hits}}{{_source.@timestamp}} {{_source.message}}\n{{/ctx.payload.hits.hits}}"

But I don't get a newline in the email body between hits. But when I add some extra characters around the newline like this:

    "body": {
      "text": "{{#ctx.payload.hits.hits}}{{_source.@timestamp}} {{_source.message}} *\n* {{/ctx.payload.hits.hits}}"

The newline magically appears between the asterisks. This is the latest ELK stack with Kibana 6.4.

Why is this inconsistent? I just want a simple list of my hits in the email body.


(Alexander Reelsen) #2


I suppose you are hitting this one:


(Jamie Burks) #3

Thanks. I just switched to HTML and that seems to get me what I want.

Inconsistent newlines in watcher email body text
(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.