原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/managing-watches.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/managing-watches.html
本地英文版地址: ../en/managing-watches.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Managing watchesedit
Watcher provides as set of APIs you can use to manage your watches:
- Use the put watch API to add or update watches
- Use the get watch API to retrieve watches
- Use the delete watch API to delete watches
- Use the activate watch API to activate watches
- Use the deactivate watch API to deactivate watches
- Use the ack watch API to acknowledge watches
Listing watchesedit
Currently there is not dedicated API for listing the stored watches. However,
since Watcher stores its watches in the .watches
index, you can list them
by executing a search on this index.
You can only perform read actions on the .watches
index. You must
use the Watcher APIs to create, update, and delete watches. If Elasticsearch
security features are enabled, we recommend you only grant users
read
privileges on the .watches
index.
For example, the following returns the first 100 watches:
GET .watches/_search { "size" : 100 }