This is my action part of my watcher:
"actions" : {
"email_admin" : {
"email" : {
"to" : "vishnumk@company.com",
"subject" : "Priority : High State : Down ",
"body": {
"text": "Portal_URL:{{#ctx.payload.hits.hits}} {{_source.http.url}} {{/ctx.payload.hits.hits}} Time:{{#ctx.payload.hits.hits}} {{_source.@timestamp}} {{/ctx.payload.hits.hits}} Error:{{#ctx.payload.hits.hits}} {{_source.error.message}} {{/ctx.payload.hits.hits}}"
}
}
}
}
Im getting email as follows
Portal_URL: http://172.24.12.124:9204 Time: 2019-05-09T09:28:51.090Z Error: 401 Unauthorized
But i want email in below format:
Portal_URL: http://172.24.12.124:9204
Time: 2019-05-09T09:28:51.090Z
Error: 401 Unauthorized