bind9 and logrotation
Hi. Is there a clean way to have bind9 reopening it's logfiles, in order to allow clean logrotation? AFAIK, it would work with rndc reload, but that doesn't just reload the logfiles but also everything else... If not, could that be implemented? Cheers, Chris. smime.p7s Description: S/MIME cryptographic signature ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind9 and logrotation
You can use an option in named.conf to rotate the logs automatically. channel query_info { severity info; file /var/named/data/log/named.query.log versions 100 size 10m; print-time yes; print-category yes; }; The versions part tells bind how many versions it can keep before overwriting, and the size will tell it how big each log file can be prior to moving to the next one. It happens automatically...no reloads or anything is required. On Mon, Jul 29, 2013 at 3:09 PM, Christoph Anton Mitterer cales...@scientia.net wrote: Hi. Is there a clean way to have bind9 reopening it's logfiles, in order to allow clean logrotation? AFAIK, it would work with rndc reload, but that doesn't just reload the logfiles but also everything else... If not, could that be implemented? Cheers, Chris. ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users -- 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind9 and logrotation
Hi Mike. On Mon, 2013-07-29 at 15:13 -0700, Mike Hale wrote: You can use an option in named.conf to rotate the logs automatically. Thanks but... well... I don't want to do that. IMHO logrotation shouldn't be in server daemons... but rather in it's own service. Cause only then you can do real powerful things,... and things like compression is not even something really powerful. Cheers, Chris. smime.p7s Description: S/MIME cryptographic signature ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind9 and logrotation
On Jul 29, 2013, at 3:09 PM, Christoph Anton Mitterer cales...@scientia.net wrote: Is there a clean way to have bind9 reopening it's logfiles, in order to allow clean log rotation? No. If not, could that be implemented? Send a feature request to ISC, or write it in yourself and maintain a patch. Of course you know logrotate can truncate files rather than renaming them, after first copying their contents, but this leaves a small window for lost log messages. You can also configure logrotate to work with the inactive log files created by BIND's own logging facility. That is, let BIND write and rotate log files, but then process them with logrotate afterward. Another option is to send all log messages through syslog, which allows for: - asynchronous (batched) file writing - all kinds of other, more advanced features that BIND doesn't support natively Regards, Chris Buxton ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind9 and logrotation
On Mon, 2013-07-29 at 15:55 -0700, Chris Buxton wrote: Send a feature request to ISC, or write it in yourself and maintain a patch. Do they have a bug tracker? I though they only pick up stuff from here? Of course you know logrotate can truncate files rather than renaming them, after first copying their contents, but this leaves a small window for lost log messages. Sure... but as you said... rather ugly as prone to loosing messages. You can also configure logrotate to work with the inactive log files created by BIND's own logging facility. That is, let BIND write and rotate log files, but then process them with logrotate afterward. Yeah... I thought about that as well... and it would be my workaround solution... but again... it's rather ugly... Thanks, Chris. smime.p7s Description: S/MIME cryptographic signature ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind9 and logrotation
On 30 July 2013 00:08, Christoph Anton Mitterer cales...@scientia.netwrote: You can also configure logrotate to work with the inactive log files created by BIND's own logging facility. That is, let BIND write and rotate log files, but then process them with logrotate afterward. Yeah... I thought about that as well... and it would be my workaround solution... but again... it's rather ugly... You could always just configure BIND to ship to syslog and then do whatever you want to the logs (and if your syslog is configured to send them via UDP to a dedicated logging server [and not to local disk] it can give you a performance increase, especially if you have query logging enabled). Steve ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users