Hi,
I have a working watcher alert which I would like to update and include the hostname and path info within the same message - but I can't seem to get the correct syntax!!
Currently, I have the following working:
"body": {
"html": "There were {{ctx.payload.hits.total}} matches of \"some error string\" within the last N minutes at {{ctx.execution_time}}.<br><br>Here is an example message found:<br><br> {{ctx.payload.hits.hits.0._source.message}}<br><br>."
}
Supposing, if {{host}} and {{path}} would work, I'd like the above message to read as: "There were {{ctx.payload.hits.total}} matches of "some error string" within the last N minutes on {{host}} at {{ctx.execution_time}}.
Here is an example message found:
{{ctx.payload.hits.hits.0._source.message}}
Please check the {{path}}."
Can someone please suggest how it can be done? Thanks in advance!