The _cluster/settings endpoint manages settings that apply across an Elasticsearch cluster. It provides a runtime alternative to editing a node’s configuration file and restarting nodes, which is useful when changing logging or restricting index creation. section 14.5.2 section 5.1.1
Choose the settings block according to how long the change should last:
- transient stores a setting only while the cluster runs; a restart or crash removes it. section 14.5.2
- persistent stores a setting durably so it survives restarts and crashes. section 14.5.2
- Use persistent DEBUG or TRACE logging cautiously, then restore INFO after troubleshooting to avoid excessive disk output. section 14.5.2
Change cluster logging and index creation
PUT _cluster/settings { "transient": { "logger.org.elasticsearch.index": "DEBUG" } } PUT _cluster/settings { "persistent": { "logger.org.elasticsearch.index": "DEBUG", "logger.org.elasticsearch.http": "TRACE", "action.auto_create_index": "false" } } The first request enables temporary DEBUG logging for the index package. The second makes logging durable and disables automatic creation of missing indexes, requiring indexes such as my_new_index to be created deliberately. section 14.5.2 section 5.1.1
Listing 14.14 Setting the transient log level globally
PUT _cluster/settings
{
"transient": { #1
"logger.org.elasticsearch.index":"DEBUG" #2
}
}
Inspect the focused request for setting a transient cluster-wide logging level. section 14.5.2
Inspect the request for durable logging settings across multiple Elasticsearch packages. section 14.5.2
