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] Log the container command output with LOGS_PATH #25150

Merged
merged 2 commits into from
Apr 19, 2021

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Apr 19, 2021

What does this PR do?

When the LOGS_PATH is set the container command will log all of the output of itself to the ${LOGS_PATH}/elastic-agent-startup.log file. It will continue to output over standard out and error, but will also write to that file when LOGS_PATH is set.

Why is it important?

So all information that is written by the Elastic Agent is stored for debugging.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

@blakerouse blakerouse added Team:Elastic-Agent Label for the Agent team backport-v7.13.0 Automated backport with mergify labels Apr 19, 2021
@blakerouse blakerouse self-assigned this Apr 19, 2021
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Apr 19, 2021
@botelastic
Copy link

botelastic bot commented Apr 19, 2021

This pull request doesn't have a Team:<team> label.

@blakerouse blakerouse marked this pull request as ready for review April 19, 2021 17:50
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #25150 updated

  • Start Time: 2021-04-19T17:51:51.339+0000

  • Duration: 71 min 28 sec

  • Commit: 0499a83

Test stats 🧪

Test Results
Failed 0
Passed 6740
Skipped 16
Total 6756

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 6740
Skipped 16
Total 6756

@blakerouse blakerouse merged commit 8c1b8f2 into elastic:master Apr 19, 2021
@blakerouse blakerouse deleted the fix-24897 branch April 19, 2021 20:32
mergify bot pushed a commit that referenced this pull request Apr 19, 2021
* Log the container command.

* Add changelog.

(cherry picked from commit 8c1b8f2)
simitt pushed a commit that referenced this pull request Apr 20, 2021
…) (#25155)

* Log the container command.

* Add changelog.

(cherry picked from commit 8c1b8f2)

Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
v1v added a commit to v1v/beats that referenced this pull request Apr 20, 2021
…-github-pr-comment-template

* upstream/master:
  [Ingest Manager] Keep http and logging config during enroll (elastic#25132)
  Refactor kubernetes autodiscover to avoid skipping short-living pods (elastic#24742)
  [libbeat] New decode xml wineventlog processor (elastic#25115)
  Add svc to agent k8s clusterRole (elastic#25146)
  Add awsfargate module to collect container logs from Amazon ECS on Fargate (elastic#25041)
  [Filebeat][Cisco ASA] log enhancement and performance (elastic#24744)
  Watch kubernetes namespaces for autodiscover metadata for pods (elastic#25117)
  Cyberark Privileged Access Security module (elastic#24803)
  [Elastic Agent] Log the container command output with LOGS_PATH (elastic#25150)
  Fix for tests after `device...` field has been removed (elastic#25141)
  [Ingest Manager] Restart process on output change (elastic#24907)
  Set --insecure in container when FLEET_SERVER_ENABLE and FLEET_INSECURE set. (elastic#25137)
  [filebeat] Update documentation / changelog / beta warnings for the syslog input (elastic#25047)
  Add support for ignore_inactive in filestream input (elastic#25036)
  Fix bug with annotations dedot config on k8s not used (elastic#25111)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.13.0 Automated backport with mergify Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[elastic-agent]: ensure that the enroll command also logs to file if configured
3 participants