Update Watcher index settings

edit

Update Watcher index settings

edit

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:

  • index.auto_expand_replicas
  • index.number_of_replicas

An example of modifying the Watcher settings:

PUT /_watcher/watch/test_watch
{
  "trigger": {
    "schedule": {
      "hourly": {
        "minute": [ 0, 5 ]
        }
      }
  },
  "input": {
    "simple": {
      "payload": {
        "send": "yes"
      }
    }
  },
  "condition": {
    "always": {}
  }
}
response = client.watcher.update_settings(
  body: {
    "index.auto_expand_replicas": '0-4'
  }
)
puts response
PUT /_watcher/settings
{
  "index.auto_expand_replicas": "0-4"
}

The configurable settings can be retrieved using the Get Watcher index settings API.