Oh dear... well here we go. Tried with the example log watcher, and with creating the watch I get this:
{"error":"WatcherException[failed to put watch [log_error_watch]]; nested: TypeMissingException[[.watches] type[[watch, trying to auto create mapping, but dynamic mapping is disabled]] missing]; ","status":500}
I have other indexes on the cluster that are working fine.. and have been for 10+ months, so what have I missed here? Do I actually have to create a mapping for watcher? If so, what fields are returned as normal?
yea.. seems like the mappings were deleted, do the following:
stop the node
add watcher.index.rest.direct_access: true to elasticsearc.yml
start the node
delete .watches index DELETE /.watches
now you should be able the put watches again. But before you do that, please revert the direct access setting:
stop the node
remove watcher.index.rest.direct_access: true from elasticsearch.yml
start the node
The watcher.index.rest.direct_access enables/disables direct access to the .watches index via the rest API such that you won't be able to add/delete/update documents there. We don't have this protection (yet) against mapping deletion.... we'll consider adding it (or find another way to prevent this from happening)
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.