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

Implement a sub-command to show or follow the Elastic Agent logs #114

Closed
Tracked by #26930
ruflin opened this issue Apr 28, 2021 · 3 comments · Fixed by #2745
Closed
Tracked by #26930

Implement a sub-command to show or follow the Elastic Agent logs #114

ruflin opened this issue Apr 28, 2021 · 3 comments · Fixed by #2745
Labels
8.8-candidate debugging Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@ruflin
Copy link
Member

ruflin commented Apr 28, 2021

Debugging Elastic Agent is currently not as easy as it should be. In case of issue, the right paths for the logs have to be found and read one by one. It would be very convenient if elastic agent would offer a command to get the logs and metrics.

To tail all the logs, something like the following would be useful:

elastic-agent logs -f

Maybe later support for filtering logs from only a specific process could be added. One step further would be, that on the fly the logging level could be changed.

The same is true for metrics. Would be nice of a snapshot of the metrics could be gathered with something like the following:

elastic-agent metrics
@ruflin ruflin added the Team:Elastic-Agent Label for the Agent team label Apr 28, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@jlind23 jlind23 transferred this issue from elastic/beats Mar 7, 2022
@cmacknz
Copy link
Member

cmacknz commented Jan 24, 2023

With the new unified log file we should be able to implement elastic-agent logs -f. Not being able to do this has annoyed me on many occasions now.

Getting the metrics might be a bit trickier but we can definitely do this for logs.

@cmacknz cmacknz changed the title [elastic-agent] logs and metrics command Implement a sub-command to show or follow the Elastic Agent logs Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.8-candidate debugging Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants