I am using the watcher to send post request to webhook listener ,but I am failing to convert output array into json object .
"actions": { "send_alert_to_jumpstart_server": { "webhook": { "scheme": "http", "host": "*****", "port": 4455, "method": "post", "path": "/webhook", "params": {}, "headers": { "Authorization": "Bearer your_token", "Content-Type": "application/json; charset=UTF-8" }, "body": """ [ {{#ctx.payload.hits.hits}} { "timestamp" : "{{_source.@timestamp}}","cluster_name": "{{_source.cluster_id}}","gNBId" : "{{_source.gNBId}}"}, {{/ctx.payload.hits.hits}} ] """ } } },
BUT,
We are getting below error while executing watcher.
body": "\n400 Bad Request\n
Bad Request
\nFailed to decode JSON object: Expecting value: line 5 column 9 (char 345)
\n"