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] Use data subfolder as default for process logs #17960

Merged
merged 13 commits into from
Apr 29, 2020

Conversation

michalpristas
Copy link
Contributor

@michalpristas michalpristas commented Apr 24, 2020

What does this PR do?

This PR changes default path for process logs from /var/log to {path.data}/logs

this will conflict with paths CLI PR will need to rebase then

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.

@michalpristas michalpristas added review needs_backport PR is waiting to be backported to other branches. [zube]: In Review Project:fleet Ingest Management:alpha1 Group issues for ingest management alpha1 labels Apr 24, 2020
@michalpristas michalpristas self-assigned this Apr 24, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Project:fleet)

@michalpristas
Copy link
Contributor Author

Jenkins test this

@ruflin
Copy link
Contributor

ruflin commented Apr 27, 2020

Will this have any effect on where the logs from the processes go? Would be nice if it does as currently it is hard to find the logs for metricbeat for example.

@michalpristas
Copy link
Contributor Author

@ruflin yes this changes the location and logs will go to {where_agent_is_installed}/data/logs/{pipeline_name}

e.g: /Users/me/agent/data/logs/default

@ph
Copy link
Contributor

ph commented Apr 27, 2020

Is there any reason why we do not use {where_agent_is_installed}/data/{pipeline_name}/logs_ ?

pipeline_name is the name of the output now.

This would ensure that a single place contains everything?

@michalpristas
Copy link
Contributor Author

@ph i can change it like this. i did it in this way so we end up with data containing
download install logs
instead of
download install default something-pretty something-else

@ruflin
Copy link
Contributor

ruflin commented Apr 28, 2020

pipeline = output name? If yes, sounds confusing to me that we talk in the config about outputs but here about pipline?

@michalpristas
Copy link
Contributor Author

we call it still PipelineID internally in the code, but what it is it is just and output type out of config e.g default/monitoring/elasticsearch/

@ruflin
Copy link
Contributor

ruflin commented Apr 28, 2020

Is it type or the name of the output? https://github.com/elastic/beats/blob/master/x-pack/elastic-agent/elastic-agent.yml#L10 The part that is here default or elasticsearch

@michalpristas
Copy link
Contributor Author

in the config you posted it would be default. it is the same value you use when specifying output using use_output in streams.
my bad, sorry for confusion i need to slow down window switching

@ph
Copy link
Contributor

ph commented Apr 28, 2020

Its is the output name that create an internal pipeline, we ccould do some renaming internally so it's more consistant. but I don't think its a priority now.

@ph
Copy link
Contributor

ph commented Apr 28, 2020

@ph i can change it like this. i did it in this way so we end up with data containing
download install logs
instead of
download install default something-pretty something-else

I see your point and I think it's valid, @ruflin wdyt?

@ruflin
Copy link
Contributor

ruflin commented Apr 28, 2020

On your last comment, no preference as long as the logs are easy accessible.

@ph
Copy link
Contributor

ph commented Apr 28, 2020

@michalpristas let's keep it your way :)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 28, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

@michalpristas michalpristas merged commit 185f202 into elastic:master Apr 29, 2020
michalpristas added a commit to michalpristas/beats that referenced this pull request Apr 30, 2020
…ic#17960)

[Elastic-Agent] Use data subfolder as default for process logs (elastic#17960)
michalpristas added a commit that referenced this pull request May 4, 2020
…logs (#18120)

* [Elastic-Agent] Use data subfolder as default for process logs (#17960)

[Elastic-Agent] Use data subfolder as default for process logs (#17960)

* [Elastic-Agent] Use /tmp for default monitoring endpoint location for libbeat (#18131)

* default tmp socket

* changelog

* Update x-pack/elastic-agent/CHANGELOG.asciidoc

Co-authored-by: Pier-Hugues Pellerin <[email protected]>

Co-authored-by: Pier-Hugues Pellerin <[email protected]>

* Update CHANGELOG.asciidoc

* conflicts

* go.sum

Co-authored-by: Pier-Hugues Pellerin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingest Management:alpha1 Group issues for ingest management alpha1 needs_backport PR is waiting to be backported to other branches. review [zube]: In Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants