I´m trying to add a watch with a chain input. The idea: Based on the cluster health example the watch should search in the watch_history for the last result, check the current cluster state and trigger an action on change.
The watch works fine, but there is nothing wirtten to the watch_history index.
The question: Why not?
Thank you!
P.S. To verify that the watch is working, I´ve used an other index with an example document.
that sounds weird. On which Elasticsearch version are you running this?
Also could you supply us the watch, so I can reproduce it locally and debug it?
I was unable to reproduce this so far. The only thing I did was havign a search history before this runs for the first time, as otherwise sorting does not work. Might that be an issue in your case?
also, just to make sure, the exact phrase you could grep for in your master logs would be grep "failed to persist watch record" log-of-master.log - I guess there is nothing either?
so I managed to reproduce an issue creating the watch history, when you are using chained inputs. This is the example that fails for me, however it fails with a message in the logs
something new! Thanks for this This comes from my watch, executed with "record_execution : true"
[2016-05-25 08:31:50,889][INFO ][watcher.actions.logging ] [esmaster-beta03] Hello, I'm logging
[2016-05-25 08:31:50,924][DEBUG][action.admin.indices.mapping.put] [esmaster-beta03] failed to put mappings on indices [[.watch_history-2016.05.25]], type [watch_record]
MapperParsingException[Field name [trigger_event.triggered_time] cannot contain '.']
the problem is not the mapping of the types. The problem is that the sort you specified contains a dot in its fieldname. And elasticsearch tries to index this field, but this ends up being rejected...
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.