update-settings.asciidoc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. [role="xpack"]
  2. [[watcher-api-update-settings]]
  3. === Update Watcher index settings
  4. ++++
  5. <titleabbrev>Update Watcher settings</titleabbrev>
  6. ++++
  7. .New API reference
  8. [sidebar]
  9. --
  10. For the most up-to-date API details, refer to {api-es}/group/endpoint-watcher[{watcher} APIs].
  11. --
  12. This API allows a user to modify the settings for the Watcher internal index (`.watches`). Only a subset of settings
  13. are allowed to be modified. This includes:
  14. - `index.auto_expand_replicas`
  15. - `index.number_of_replicas`
  16. - Any setting with the prefix `index.routing.allocation.exclude.`
  17. - Any setting with the prefix `index.routing.allocation.include.`
  18. - Any setting with the prefix `index.routing.allocation.require.`
  19. Modification of `index.routing.allocation.include._tier_preference` is an exception and is not allowed as the Watcher
  20. shards must always be in the `data_content` tier.
  21. An example of modifying the Watcher settings:
  22. [source,console]
  23. ----------------------------------------------------------------
  24. PUT /_watcher/watch/test_watch
  25. {
  26. "trigger": {
  27. "schedule": {
  28. "hourly": {
  29. "minute": [ 0, 5 ]
  30. }
  31. }
  32. },
  33. "input": {
  34. "simple": {
  35. "payload": {
  36. "send": "yes"
  37. }
  38. }
  39. },
  40. "condition": {
  41. "always": {}
  42. }
  43. }
  44. ----------------------------------------------------------------
  45. // TESTSETUP
  46. [source,console]
  47. -----------------------------------------------------------
  48. PUT /_watcher/settings
  49. {
  50. "index.auto_expand_replicas": "0-4"
  51. }
  52. -----------------------------------------------------------
  53. The configurable settings can be retrieved using the <<watcher-api-get-settings,Get Watcher index settings>> API.