liveBook · Manning

_cluster/settings endpoint

As explained in Elasticsearch in Action, Second Edition

The _cluster/settings endpoint is an Elasticsearch API endpoint for retrieving and modifying cluster-level settings.

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

Listing 14.15 Setting the log level permanently
PUT _cluster/settings
{
  "persistent": {
    "logger.org.elasticsearch.index":"DEBUG",
    "logger.org.elasticsearch.http":"TRACE"
  }
}

Inspect the request for durable logging settings across multiple Elasticsearch packages. section 14.5.2

How Elasticsearch in Action, Second Edition covers it

How deep it goes
Explains transient versus persistent storage, restart behavior, and operational caution, but does not detail settings retrieval or response formats.
Examples
Uses DEBUG and TRACE package logging requests plus an action.auto_create_index=false request.
What you can do after
Operate/configure cluster behavior through PUT requests, selecting temporary or durable settings for troubleshooting and administration.
How it connects
Connects cluster settings with logging levels, persistent settings, transient settings, and index auto-creation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elasticsearch in Action, Second Edition. The section links point to the parts of the book it draws on.