Skip to content

Inconsistent order of resolving ${VAR} value when running Logstash with docker #15766

@kaisecheng

Description

@kaisecheng

The value of dollar sign variable ${VAR} can be resolved from environment variable and keystore. When the same key is defined in both places, keystore takes the precedence.

However, when using logstash docker image and passing env variables with a naming convention that replace the config settings in logstash.yml from . to _, eg. log.level -> LOG_LEVEL, the startup process env2yaml overwrites logstash.yml with actual values from env regardless of existing settings in the file. In this scenario, env wins the precedence. Only the variables listed in env2yaml have inconsistent issue.

The order is confusing when configuring logstash in kubernetes especially when keystore, env and the default value ${VAR:default_value} can set the value. The ordering of resolving ${VAR} should be default_value < env < keystore where the latter takes the precedence.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions