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] Allow the agent to collect and send the log of endpoint. #21796

Closed
ph opened this issue Oct 14, 2020 · 9 comments · Fixed by #22526
Closed

[Elastic Agent] Allow the agent to collect and send the log of endpoint. #21796

ph opened this issue Oct 14, 2020 · 9 comments · Fixed by #22526
Assignees
Labels

Comments

@ph
Copy link
Contributor

ph commented Oct 14, 2020

We need to add support for collecting endpoint logs and send them to the following data_stream: logs-elastic_agent.endpoint-{namespace} with no configured namespace it will be logs-elastic_agent.endpoint-default.

@ferullo Are you writing JSON formatted logs or using only plaintext?

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@ph ph changed the title [Elastic Agent] Allow the agent to collect the log of endpoint. [Elastic Agent] Allow the agent to collect and send the log of endpoint. Oct 14, 2020
@ferullo
Copy link

ferullo commented Oct 14, 2020

Endpoint logs are in ECS JSON. They're placed in c:\Program Files\Elastic\Endpoint\state\log\endpoint-XXXXXX.log (Windows), /Library/Elastic/Endpoint/state/log/endpoint-XXXXXX.log (macOS), and /opt/Elastic/Endpoint/state/log/endpoint-XXXXXX.log (Linux). XXXXXX is a one up counter when log files get too big, starting at 000000. The last 4 log files are kept before Endpoint prunes them. Old log files are never compressed.

@ph
Copy link
Contributor Author

ph commented Oct 14, 2020

@ferullo Well, that's good we should be able to add that simply. cc @kevinlog

@ruflin
Copy link
Contributor

ruflin commented Oct 15, 2020

I think we should standardise on where each process writes the logs so Agent only needs to check in one place. This might be already the case but @blakerouse will know more.

@ferullo
Copy link

ferullo commented Oct 19, 2020

Endpoint can move where it writes logs if that would be useful to Agent. As long as Agent is always installed when Endpoint is (I think that's true but an not positive on the update scenario) it seems easy enough for Endpoint to just write logs into an Agent directory.

If a decision for a unified logging directory is made, just let the Endpoint team know and we'll make the change.

@ruflin
Copy link
Contributor

ruflin commented Oct 20, 2020

++ on unifying the logging directory and probably best also the format and basic content (what fields are the minimal requirement). @blakerouse @michalpristas Could you define this?

@blakerouse
Copy link
Contributor

Being that Agent installs Endpoint into its own installation directory, I think it would be better to have Endpoint place the logs in its own directory. I think its weird to place it inside of Elastic Agent directory, being it is not a direct subprocess of Agent.

@ruflin
Copy link
Contributor

ruflin commented Oct 21, 2020

We still need to define the log format / minimal content?

@dikshachauhan-qasource
Copy link

Hi @EricDavisX

We have updated 01 test case and created 01 testcase for this ticket and test cases link are as follows:

Please let us know if anything else if required to cover.

Thanks
QAS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants