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

Do not expose Elasticsearch's logging config #95295

Open
pgomulka opened this issue Apr 17, 2023 · 1 comment
Open

Do not expose Elasticsearch's logging config #95295

pgomulka opened this issue Apr 17, 2023 · 1 comment
Labels
:Core/Infra/Logging Log management and logging utilities >enhancement Team:Core/Infra Meta label for core/infra team

Comments

@pgomulka
Copy link
Contributor

pgomulka commented Apr 17, 2023

Description

it is not uncommon for users to forget about logging config when upgrading a cluster. This means that when upgrading to a next major version users can end up with a broken log4j config. We changed configs from 6 ->7 and 7-> 8
Some of those changes are related to a code changes. For instance a 8.x ES cluster with 7.x config does not have a correctly deduplicated deprecation logs (#61474). This in pair with indexing deprecation logs can results with increased indexing traffic in that cluster.

Users might also want to tweak logging configuration in a way we did not test this before. Some of the changes in that config we envisioned (logging levels changes) are possibly and encouraged to be done via cluster settings api. https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html#configuring-logging-levels

Others like changes in log file sizes might cause cluster nodes to run out of disc space quicker than we anticipated in our sizing guidelines.

I think we should not expose log4j.properties file and keep it internal. The documentation on how to tweak that file should also be removed.

BWC considerations:
We should keep SHAs of the previously known config files and ignore the old config. This should not be considered breaking because as mentioned earlier, running a new cluster with old 'unchanged' config is a incorrect.

Users who tweaked their config (we don't know sha of the config they have) should get a bootstrap warning on startup and send that information via telemetry to Elastic

@pgomulka pgomulka added >enhancement :Core/Infra/Logging Log management and logging utilities labels Apr 17, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Apr 17, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@pgomulka pgomulka changed the title Do not expose log4j config Do not expose Elasticsearch's logging config Apr 17, 2023
rjernst added a commit to rjernst/elasticsearch that referenced this issue Nov 27, 2024
This commit adds an explicit setting for disabling console logging,
instead only writing to the main application log file. The setting name
chosen sets up a pattern for future logging configuration of files,
using the `logging.` prefix, followed by the log, and then the log
specific setting, in this case whether it is enabled.

see elastic#95295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Logging Log management and logging utilities >enhancement Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

No branches or pull requests

2 participants