Skip to content

Commit 13258e0

Browse files
author
Adam Locke
authored
[DOCS] [7.7] Clarifying env variable substitution (#57370) (#57736)
* Clarifying environment variable substitution in the ES configuration YAML * Update code snippet * Remove extraneous quotes from string example * Incorporating review feedback
1 parent cd80abd commit 13258e0

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

docs/reference/setup/configuration.asciidoc

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,44 @@ path.logs: /var/log/elasticsearch
7171

7272
Environment variables referenced with the `${...}` notation within the
7373
configuration file will be replaced with the value of the environment
74-
variable, for instance:
74+
variable. For example:
7575

7676
[source,yaml]
7777
--------------------------------------------------
7878
node.name: ${HOSTNAME}
7979
network.host: ${ES_NETWORK_HOST}
8080
--------------------------------------------------
81+
82+
Values for environment variables must be simple strings. Use a comma-separated string to provide values that Elasticsearch will parse as a list. For example, Elasticsearch will split the following string into a list of values for the `${HOSTNAME}` environment variable:
83+
84+
[source,yaml]
85+
----
86+
export HOSTNAME=“host1,host2"
87+
----
88+
89+
[discrete]
90+
[[cluster-setting-types]]
91+
=== Cluster and node setting types
92+
93+
Cluster and node settings can be categorized based on how they are configured:
94+
95+
[[dynamic-cluster-setting]]
96+
Dynamic::
97+
You can configure and update dynamic settings on a running cluster using the
98+
<<cluster-update-settings,cluster update settings API>>.
99+
+
100+
You can also configure dynamic settings locally on an unstarted or shut down
101+
node using `elasticsearch.yml`.
102+
+
103+
TIP: It’s best to set dynamic, cluster-wide settings with the cluster update
104+
settings API and use `elasticsearch.yml` only for local configurations. Using
105+
the cluster update settings API ensures the setting is the same on all nodes. If
106+
you accidentally configure different settings in `elasticsearch.yml` on
107+
different nodes, it can be difficult to notice discrepancies.
108+
109+
[[static-cluster-setting]]
110+
Static::
111+
Static settings can only be configured on an unstarted or shut down node using
112+
`elasticsearch.yml`.
113+
+
114+
Static settings must be set on every relevant node in the cluster.

0 commit comments

Comments
 (0)