update-settings.asciidoc 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. [role="xpack"]
  2. [[watcher-api-update-settings]]
  3. === Update Watcher index settings
  4. ++++
  5. <titleabbrev>Update Watcher settings</titleabbrev>
  6. ++++
  7. This API allows a user to modify the settings for the Watcher internal index (`.watches`). Only a subset of settings are allowed to by modified. This includes:
  8. - `index.auto_expand_replicas`
  9. - `index.number_of_replicas`
  10. An example of modifying the Watcher settings:
  11. [source,console]
  12. ----------------------------------------------------------------
  13. PUT /_watcher/watch/test_watch
  14. {
  15. "trigger": {
  16. "schedule": {
  17. "hourly": {
  18. "minute": [ 0, 5 ]
  19. }
  20. }
  21. },
  22. "input": {
  23. "simple": {
  24. "payload": {
  25. "send": "yes"
  26. }
  27. }
  28. },
  29. "condition": {
  30. "always": {}
  31. }
  32. }
  33. ----------------------------------------------------------------
  34. // TESTSETUP
  35. [source,console]
  36. -----------------------------------------------------------
  37. PUT /_watcher/settings
  38. {
  39. "index.auto_expand_replicas": "0-4"
  40. }
  41. -----------------------------------------------------------
  42. The configurable settings can be retrieved using the <<watcher-api-get-settings,Get Watcher index settings>> API.