> Watcher Notification - Event: {0=[esclient1][10.0.0.202:9300] joined} the cluster at 2015-09-16T11:49:34.978Z
Notice fields.message and fields.cluster_name return their values. However node.name and node.ip_port do not. I have also tried {{ctx.payload.hits.hits.0._source.node.name}} yet these are returned empty.
The .marvel-* indice in kibana shows these terms filled with the desired values.
Does anyone have any idea where I have made mistakes?
Update:
If I grab a watch in .watch_history*, I get the following: > "node.name":["esclient1"],"event":["node_left"],"node.ip_port":["10.0.0.202:9300"] So the watch is grabbing the desired fields. They are just not being placed in the mail. So the problem is in:
"subject": " Watcher Notification - Event: {{ctx.payload.hits.hits.0.fields.node.name}}{{ctx.payload.hits.hits.0.fields.node.ip_port}}{{ctx.payload.hits.hits.0.fields.message}} the cluster at {{ctx.trigger.triggered_time}}", "body": "{{ctx.payload.hits.hits.0.fields.message}}{{ctx.payload.hits.hits.0.fields.node.name}}{{ctx.payload.hits.hits.0.fields.node.ip_port}} the cluster {{ctx.payload.hits.hits.0.fields.cluster_name}} "
Another issue I've noticed is that {{ctx.trigger.triggered_time}} shows UTC even when timezones have been adjusted and even after adding a timezone filter to logstash. Kibana seems to adjust the timestamp when indexing to the correct time, but it seems this does not happen when sending watch triggered mails.
Ah I missed that you specifically asking for fields. The fields option should only be used if you configure in the mappings that you store fields. If fields was left out of the search request the _source would be able to pick your values up. By default the entire _source of a hit is returned. (but that isn't the case if fields is used in the search request)
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.