I am setting up a watcher in Kibana and the watcher needs to extract different fields from the ctx.payload.
So I tried this for extracting message field from the first hit
{{ctx.payload.hits.hits.0._source.message}}
This gave me an error
"actions": [
{
"id": "notify-slack",
"type": "slack",
"status": "failure",
"reason": "GeneralScriptException[Error running inline script [Message is {{ctx.payload.hits.hits.0._source.message}}] using lang [mustache]]; nested: MustacheException[Failed to get value for ctx.payload.hits.hits.0._source.message @[query-template:1]]; nested: MustacheException[0 @[query-template:1]]; nested: IndexOutOfBoundsException[0]; "
}
How can I extract the message field from this JSON response?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.