From a6db1b0db545b2c416608a1768dac4204f24b24c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 15 Nov 2022 09:45:09 +0100 Subject: [PATCH] Backport PR #14738 to 7.17: [Doc] Document the usage of LS_JAVA_OPTS environment variable #14750 * [Doc] Document the usage of LS_JAVA_OPTS environment variable Co-authored-by: Rob Bavey (cherry picked from commit 9242105c3c31ad9d6c2a6e0f5b2b755069b3b47c) Co-authored-by: Andrea Selva --- docs/static/config-details.asciidoc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/static/config-details.asciidoc b/docs/static/config-details.asciidoc index 835edcbf3..af0bd396a 100644 --- a/docs/static/config-details.asciidoc +++ b/docs/static/config-details.asciidoc @@ -1,7 +1,8 @@ [[jvm-settings]] === JVM settings -Configure the jvm settings in the `jvm.options` <>. +Configure JVM settings in the `jvm.options` <>. JVM settings can also be set via the <> environment variable. + This file contains a line-delimited list of JVM arguments following a special syntax: * lines consisting of whitespace only are ignored @@ -100,6 +101,18 @@ java -XX:+PrintFlagsFinal -version | grep ThreadStackSize Depending on the default stack size, start by multiplying by 4x, then 8x, and then 16x until the overflow error resolves. +[[ls-java-opts]] +==== Using `LS_JAVA_OPTS` + +The `LS_JAVA_OPTS` environment variable can also be used to override JVM settings in the `jvm.options` file <>. +The content of this variable is additive to options configured in the `jvm.options` file, and will override any settings that exist in both places. + +For example to set a different locale to launch {ls} instance: + +[source,sh] +----- +LS_JAVA_OPTS="-Duser.country=DE -Duser.language=de" bin/logstash -e 'input { stdin { codec => json } }' +-----