Skip to content

[Elastic Agent] Accept logs path configuration #24271

@simitt

Description

@simitt

The Elastic Agent ignores the passed in --path.logs=xyz. This can be problematic for read-only environments, for example when running in a read-only docker container where all write actions are expected to go to bind mount only.

Not only the Elastic Agent logs but also the logs of the running sub processes need to be configurable.

This is related to #24160 and also required for 7.13.

Reproduce

  • change docker entrypoint to exec {{ .BeatName }} container --path.logs ${LOGS_PATH} --path.config ${CONFIG_PATH} $@"
  • run cloud command
docker run -it \
  --env LOGS_PATH=/app/logs/ \
  -v <your-path>/app:/app <image-ID>

and check that logs are not written to configured location

  • run cloud command
docker run -it \
  --env LOGS_PATH=/app/logs/ \
  --env CONFIG_PATH=/app/config \
  -v <your-path>/app:/app <image-ID>

and check that agent logs are written to configured location, but sub process logs are missing.

This is required for the elastic cloud setup.

I have only checked this with docker.

Metadata

Metadata

Assignees

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