Howto configure logrotate capabilities for proxy

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.

Thanks,

~yuri

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).

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.

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

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?

1 Like

LXD of course.

Thank you! i saw it’s already merged.