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

Logging: Reduce amount of log-messages #743

Closed
3 of 4 tasks
dmth opened this issue Oct 17, 2016 · 7 comments
Closed
3 of 4 tasks

Logging: Reduce amount of log-messages #743

dmth opened this issue Oct 17, 2016 · 7 comments
Labels
component: core documentation Indicates a need for improvements or additions to documentation feature Indicates new feature requests or new features usability
Milestone

Comments

@dmth
Copy link
Contributor

dmth commented Oct 17, 2016

Whilst running our Test-System with approx 19 collectors + parsers and ~5 experts, we've noticed that the log-file directory will get very huge in a rather short amount of time. Since beginning of July we've collected approx. 11 GB Logfiles. Logrotation and zipping of logfiles is active.

The Loglevel in our setup is quite verbose (info), and should be set to warning. We suspect that this will create much less log-messages. In addition it will filter out the "Processed i+500 messages" messages. (IMHO This message should also be a debug one)

Nevertheless, we've noticed that the logfiles can be flooded with messages like "empty message received" For instance when redis has not been started. This message is added as a warning to all bots in this case an will be added to the log every X milliseconds.

Possible ToDos:

  • The implications of a verbose log-level could be added to the user-documentation.
  • Decide if the "Processed i+500 messages" should be info or debug. There might also a chance for optimization in ll. 269 of lib/bot.py for instance by checking the configured log-level prior to the modulo operation. (For each message the modulo is calculated even if the code after the operation does not do anything)
  • Find other cases where logging is too verbose / or not sufficient
  • We should agree on a "sane" default for logging. This might be warning in case of a productive environment.
@sebix sebix added documentation Indicates a need for improvements or additions to documentation usability component: core labels Oct 17, 2016
@sebix
Copy link
Member

sebix commented Oct 17, 2016

Also see #614

In addition it will filter out the "Processed i+500 messages" messages. (IMHO This message should also be a debug one)

Or make it configurable? But it's obsolete as soon as we have #361

@sebix sebix modified the milestone: v1.0 Stable Release Nov 8, 2016
@sebix
Copy link
Member

sebix commented Nov 16, 2016

The implications of a verbose log-level could be added to the user-documentation.

9c0c55a

Find other cases where logging is too verbose / or not sufficient

#641

We should agree on a "sane" default for logging. This might be warning in case of a productive environment.

Should warning be default for packaged releases? I think INFO is still a good default, but for production environments this should be warning tough.

@dmth
Copy link
Contributor Author

dmth commented Nov 16, 2016

We should agree on a "sane" default for logging. This might be warning in case of a productive environment.

Should warning be default for packaged releases? I think INFO is still a good default, but for production environments this should be warning tough.

I agree on "Warning" as a reasonable default for productive settings.

@sebix sebix added the feature Indicates new feature requests or new features label Dec 8, 2016
@ghost
Copy link

ghost commented Feb 9, 2017

Decide if the "Processed i+500 messages" should be info or debug. There might also a chance for optimization in ll. 269 of lib/bot.py for instance by checking the configured log-level prior to the modulo operation. (For each message the modulo is calculated even if the code after the operation does not do anything)

To fix this on a short term: Could be solved by replacing the number-of-messages approach by a time-based approach. After every process() call we check when the last run did happen and if that time is bigger than a time interval of e.g. 5min (configurable), print "Processed ... messages.". This does make the process more verbose for low-volume bots and less verbose for high-volume bots.

@ghost
Copy link

ghost commented Apr 24, 2017

@certtools/intelmq-contributors Any comments on my suggested solution in #743 (comment) ?

@dmth
Copy link
Contributor Author

dmth commented Apr 28, 2017

print "Processed ... messages."

Could this be a "Processed N Messages since last logging", an not be a total count?

@ghost
Copy link

ghost commented Apr 28, 2017

Could this be a "Processed N Messages since last logging", an not be a total count?

Good idea. And also send this message at shutdown if the number is non-zero.

@ghost ghost self-assigned this May 16, 2017
@ghost ghost closed this as completed in cb244f0 Jun 7, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: core documentation Indicates a need for improvements or additions to documentation feature Indicates new feature requests or new features usability
Projects
None yet
Development

No branches or pull requests

2 participants