Question regarding newsyslog.conf and Bind logs

J Doe general at nativemethods.com
Thu Aug 25 03:23:27 UTC 2022


Hello,

I was wondering if anyone could provide feedback on whether the 
following: newsyslog.conf file is correct to allow for daily log 
rotation for my Bind 9.16.30 logs ?

My currently logging settings in: named.conf are:

     ...
     logging {
         channel chn_file_queries {
             buffered no;
             file "/var/queries.log"
                 versions 2 size 1g suffix increment;
             print-category yes;
             print-severity yes;
             print-time yes;
             severity info;
         };
         ...
     };
     ...

newsyslog.conf examples tend to make use of: pkill but I note in the 
Bind ARM and man page that signals are deprecated in favor of: rndc.

I am *thinking* the following should work for newsyslog.conf

/var/named/var/queries.log        640    7         *    $D0  Z 
"/usr/sbin/rndc reconfig > /dev/null 2>/dev/null || true"

So settings:

     Log path:     My Bind is running in chroot
     File mode:    0640
     Log count:    7 (1 per day)
     Size limit:   none
     Frequency:    $D0 (daily)
     Flags:        z to compress
     Binary:       rndc (instead of pkill)

Is this correct ?

Thank you,

- J


More information about the bind-users mailing list