Skip to content

journald feature: log as many as mainlog #9597

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

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

journald feature: log as many as mainlog #9597

wants to merge 7 commits into from

Conversation

Al2Klimov
Copy link
Member

@Al2Klimov Al2Klimov commented Nov 24, 2022

It's our new default logger on Linux.

fixes #8857
refs #9282

TODO

  • log less garbage

It's our new default logger on Linux.
@Al2Klimov Al2Klimov added this to the 2.14.0 milestone Nov 24, 2022
@Al2Klimov Al2Klimov self-assigned this Nov 24, 2022
@cla-bot cla-bot bot added the cla/signed label Nov 24, 2022
@icinga-probot icinga-probot bot added area/log Logging related enhancement New feature or request needs feedback We'll only proceed once we hear from you again labels Nov 24, 2022
…per endpoint

using a flag whether already done. That's reset on successful connection.

In a randomly picked customer mainlog there are 1241932 lines
starting with "[". 70222 of them say "Reconnecting to endpoint".
@Al2Klimov
Copy link
Member Author

At best read the individual commit messages.

@julianbrost
Copy link
Contributor

With some agents gone, the log is still flooded with messages like these:

critical/ApiListener: Timeout while reconnecting to endpoint '...' via host '...' and port '...', cancelling attempt
critical/ApiListener: Cannot connect to host '...' on port '...': Operation canceled

@Al2Klimov
Copy link
Member Author

Once or recurring?

@julianbrost
Copy link
Contributor

With every attempt.

…r endpoint+error

by remembering the last prominently logged one.
That's forgotten on successful connection.

In a randomly picked customer mainlog there are 1241932 lines
starting with "[". 68357 of them say "Cannot connect to host".
… only once per checkable

using a flag whether already done. That's reset on valid perfdata.

In a randomly picked customer mainlog there are 1241932 lines starting
with "[". 56817 of them say "Ignoring invalid perfdata for checkable".
by moving some messages to notice.
@julianbrost
Copy link
Contributor

fixes #9282

How does this PR fix this? It maybe makes the log message less prominent, but if what's given in that issue is valid perfdata, it should not generate a log message saying the opposite in the first place.

@julianbrost
Copy link
Contributor

In general, I wouldn't pursue changing the default logging in this PR. I fear this will just result in addressing the worst offenders that show in a somewhat standard configuration and once we release, there will be complaints about all the cases we missed, resulting in overall frustration for users and developers.

Instead, I think we should start by cleaning up and improving log messages (that involved more than just changing the severity) step by step until we are confident that the log file is great and is suitable for also logging into syslog/journald. This simply involves more work than will realistically be done in a single PR and is a process over some time that also means opening issues whenever you notice unhelpful log messages and addressing these.

I'm aware that this probably implies that we won't switch the default logging for 2.14, but the longer I think about, the more utopian this sounds. That release should feature lots of improved logging nonetheless, this will allow finding further places for improvement from logs we receive that were written by newer version.

@Al2Klimov
Copy link
Member Author

Then I'll outsource the log less garbage part to another PR once you consider it OK as-is or request any changes. (Hello GHA!) This PR is for the utopia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/log Logging related cla/signed enhancement New feature or request needs feedback We'll only proceed once we hear from you again
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discuss logging (default configuration on Linux, use of systemd-journald)
3 participants