Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Elastic Agent] Accept logs path configuration #24271

Closed
simitt opened this issue Mar 1, 2021 · 2 comments · Fixed by #24817
Closed

[Elastic Agent] Accept logs path configuration #24271

simitt opened this issue Mar 1, 2021 · 2 comments · Fixed by #24817
Assignees
Labels
bug Team:Elastic-Agent Label for the Agent team v7.13.0

Comments

@simitt
Copy link
Contributor

simitt commented Mar 1, 2021

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.

@simitt simitt added the Team:Elastic-Agent Label for the Agent team label Mar 1, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@simitt
Copy link
Contributor Author

simitt commented Mar 29, 2021

update: when passing in --path.logs and --path.config the elastic-agent logs are written to the logs path; this should not be connected to whether or not a config path is passed in.

The logs from the subprocesses are neither in the default log directory nor in the location set with the --path.logs.

updated the description accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Elastic-Agent Label for the Agent team v7.13.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants