Howto configure logrotate capabilities for proxy

(Yuri) #1

Hi, I am wandering if there is any way to configure logrotate for logs which are generated by proxy. Under the load it could generate quite a bit, and run out of space.




That would be a logrotate issue. You would need to edit the appropriate file in /etc/logrotate.d/ for your proxy. You can specify to rotate the logs daily.

You can also specify hourly, but by default cron runs daily. Therefore, for hourly to work, you need to get logrotate to get invoked hourly as well (hint: see /etc/cron.hourly).

(Yuri) #3

Thanks for your replay.
Do we have any way to generate appropriate logrotate configuration automatically with proxy forward creation. Otherwise the lifecycle of the whole ‘proxy’ system could be complicated, especially if i’ll be moving containers around cluster for example.

(Stéphane Graber) #4

Hmm, we should make the proxy only log errors, I don’t think we really want to log every new connection in there.

@monstermunchkin if you have a few minutes to spare

(Yuri) #5

Completely agree, but even in this case it should be manageable and configurable, as it seems to me. Either to have flag to dump every error into syslog, instead of separate file. otherwise it makes a lot of complexity for house keeping


Which proxy is it? LXD’s or something like HAProxy?

(Stéphane Graber) #7

(Yuri) #8

LXD of course.

(Yuri) #9

Thank you! i saw it’s already merged.