-
Notifications
You must be signed in to change notification settings - Fork 289
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
Reduce overly noisy logging of services #2500
Comments
Thanks for filing this issue @sgnn7, will bring this back to our team. |
What operating system is this? |
In particular on CentOS I believe we make journald logs for Flocker services not go to syslog, so one can rely on journald's log rotation; unlike syslog it's size based so you're not stuck waiting for scheduled rotation. |
Also, are most of the logs from one particular service? I would expect |
@itamarst It's Ubuntu 15.10 (systemd) and all of the services are pretty noisy - I had to manually squelch/override these units in Even if you disable things from going to syslog, I think kern.log still gets this stuff and will consume a lot of space, just on a smaller scale and might get log-rotated before it eats up the allocated space. Either way, seeing each service report "success" json each second on every machine is a bit superfluous and on the "debug" output side of things imo since signal-to-noise ratio is pretty low. |
The once a second noise is mostly driven by When we support Ubuntu with journald (likely LTS 16.04) we'll do the work to ensure we don't fill up disk, including |
@itamarst Fair enough though I suspect 16.04 LTS is going to be very close to 15.10 so fixing things on that distribution would go a long way to make it compatible :) |
On Ubuntu 15.10 I have fixed it by adding number to rsyslog config for flocker. $ sudo mv /etc/rsyslog.d/flocker.conf /etc/rsyslog.d/11-flocker.conf
$ cat /etc/rsyslog.d/11-flocker.conf
# Flocker logs will end up in journald and can be accessed via journalctl. There
# is therefore no need to duplicate them in /var/log/messages; instead they
# should be discarded by rsyslog.
if $programname == 'flocker-control' then ~
if $programname == 'flocker-dataset-agent' then ~
if $programname == 'flocker-container-agent' then ~
$ sudo service rsyslog restart |
I still can see logs using journalctl if I need. Also disk usage shows 80M not gigs like for syslog/kern.log before change.
|
flocker-docker-plugin is also chatty. So added one more line in the config:
|
Thanks @nikolaiderzhak ! Appreciate you sharing |
So I've been following the manual install method. Right now I (think) I got everything working on some vagrant boxes. I've been closely watching the logs in /var/logs/flocker. The flocker-container-agent.log file keeps spamming out these message every second:
I have no idea if this is normal. If it is, is there a way i can set the verbosity to reduce the noise? |
Hey @adaptivdesign, yes this is actually normal for now. The caveat is that we are getting rid of the need to use the container agent so we have lower priority for things like this. Future cases (and i think in master right now) you have the option to turn the container agent off. |
@adaptivdesign / @nikolaiderzhak I've created overrides for the noisy services and they work pretty well as they don't get logged while still also printing out stderr output on problems:
|
@wallnerryan I totally understand. I'll keep an eye out for new releases. If it's nothing to worry about i'll go with @sgnn7 solution for now 👍 Thank you both for your quick response! |
All services seem to create an exorbitant amount of log output on systemd machines that literally eats up almost any amount of space on a machine/VM that it's installed on:
--journald
appended to them/etc/systemd/journald.conf
hasForwardToSyslog=True
by default so it sends everything to/var/log/syslog
/var/log/syslog
is rotated daily and 7 are saved by default/var/log/kern.log
is weekly and 4 are saved defaultOptions:
--journald
and/or addition ofStandardOutput=null
in unit files (https://github.com/ClusterHQ/flocker/tree/1.9.0/admin/package-files/systemd and https://github.com/ClusterHQ/flocker/blob/1.9.0/admin/package-files/docker-plugin/systemd/flocker-docker-plugin.service).The text was updated successfully, but these errors were encountered: