[Kea-users] loggers: support for file compression with enabled rotation
Marek Hajduczenia
mxhajduczenia at gmail.com
Wed Jun 26 12:50:57 UTC 2024
Thank you, Darren
Getting the logrotate to do the correct thing has been challenging because
of (I suspect) permissions specific to /var/log/kea subfolder. I will
continue trying but it would be certainly nice to have also support for
compression added. 75% of functionality is already in place.
Marek
On Wed, Jun 26, 2024 at 4:21 AM Darren Ankney <darren.ankney at gmail.com>
wrote:
> Hi Marek,
>
> To my knowledge, Kea does not support compressing log files. Suggest
> you turn off Kea's built in log rotation and use logrotate. You can
> disable Kea's file rotation by setting "maxsize": 0
>
> Thank you,
> Darren Ankney
>
> On Mon, Jun 24, 2024 at 12:15 PM Marek Hajduczenia
> <mxhajduczenia at gmail.com> wrote:
> >
> > Thanks, logrotate has been a hit and miss so far - I suspect it is a
> combination of permissions and/or settings
> >
> > Marek
> >
> > On Mon, Jun 24, 2024 at 10:12 AM CS <cs.temp.mail at gmail.com> wrote:
> >>
> >> I am not an expert in Kea so if there are other solutions to this there
> hopefully someone better chimes in, but my first instinct would be to let
> logrotate handle this.
> https://www.linuxtechi.com/manage-linux-log-files-using-logrotate/
> >> CS, cs.Temp.Mail at gMail.com
> >>
> >>
> >> On Mon, 24 Jun 2024 at 08:28, Marek Hajduczenia <
> mxhajduczenia at gmail.com> wrote:
> >>>
> >>> As per subject, is there any way to trigger standard compression
> mechanisms against rotated log files? I have multiple files as shown below,
> with log size set to 100M, 10 files per log class, and I would like to see
> whether it was possible to trigger compression against the rotated log
> files (.1 … .10) to decrease their size on the drive. If that was possible,
> I could expand the size of individual log files and hold on to them a tad
> longer.
> >>>
> >>>
> >>>
> >>> I did check the existing documentation and it does not seem like there
> is anything accounted for. I would rather avoid platform-specific setup and
> rely on Kea logger feature, if possible.
> >>>
> >>>
> >>>
> >>> Regards
> >>>
> >>>
> >>>
> >>> Marek
> >>>
> >>>
> >>>
> >>> root at server-kea-node1:/var/log/kea# ls -lah
> >>>
> >>> total 2.9G
> >>>
> >>> drwxr-x--- 2 _kea _kea 4.0K Jun 24 14:47 .
> >>>
> >>> drwxrwxr-x 10 root syslog 4.0K Jun 24 00:00 ..
> >>>
> >>> -rw-r--r-- 1 _kea _kea 57M Jun 24 14:53 dhcp4-all.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 13:34 dhcp4-all.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 3.6M Jun 24 14:53 dhcp4-dhcpsrv.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 13:34 dhcp4-dhcpsrv.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 20M Jun 24 14:53 dhcp4-eval.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 14:47 dhcp4-eval.log.1
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 10:11 dhcp4-eval.log.10
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 14:16 dhcp4-eval.log.2
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 13:45 dhcp4-eval.log.3
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 13:14 dhcp4-eval.log.4
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 12:43 dhcp4-eval.log.5
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 12:12 dhcp4-eval.log.6
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 11:42 dhcp4-eval.log.7
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 11:11 dhcp4-eval.log.8
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 10:41 dhcp4-eval.log.9
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 13:34 dhcp4-eval.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 1.8M Jun 24 14:53 dhcp4-leases.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 13:34 dhcp4-leases.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 30M Jun 24 14:53 dhcp4-packets.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 11:20 dhcp4-packets.log.1
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 23 23:36 dhcp4-packets.log.2
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 23 11:53 dhcp4-packets.log.3
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 23 00:12 dhcp4-packets.log.4
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 22 12:27 dhcp4-packets.log.5
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 22 00:56 dhcp4-packets.log.6
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 13:34 dhcp4-packets.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 71M Jun 24 14:53 dhcp4-pad-packets.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 13:34 dhcp4-pad-packets.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 26M Jun 24 14:53 dhcp6-all.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 12:18 dhcp6-all.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 984K Jun 24 14:53 dhcp6-dhcpsrv.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 12:18 dhcp6-dhcpsrv.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 60M Jun 24 14:53 dhcp6-eval.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 11:54 dhcp6-eval.log.1
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 22 17:54 dhcp6-eval.log.10
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 07:51 dhcp6-eval.log.2
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 03:38 dhcp6-eval.log.3
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 23 23:23 dhcp6-eval.log.4
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 23 19:08 dhcp6-eval.log.5
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 23 14:06 dhcp6-eval.log.6
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 23 09:01 dhcp6-eval.log.7
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 23 04:02 dhcp6-eval.log.8
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 22 22:51 dhcp6-eval.log.9
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 12:18 dhcp6-eval.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 2.4M Jun 24 14:53 dhcp6-leases.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 12:18 dhcp6-leases.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 957K Jun 24 14:53 dhcp6-packets.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 98M Jun 24 14:11 dhcp6-packets.log.1
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 12:18 dhcp6-packets.log.lock
> >>>
> >>> -rw-r--r-- 1 _kea _kea 17K Jun 23 08:59 dhcp6-pad-packets.log
> >>>
> >>> -rw-r--r-- 1 _kea _kea 0 Jun 21 12:18 dhcp6-pad-packets.log.lock
> >>>
> >>> --
> >>> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
> >>>
> >>> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> >>>
> >>> Kea-users mailing list
> >>> Kea-users at lists.isc.org
> >>> https://lists.isc.org/mailman/listinfo/kea-users
> >
> > --
> > ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
> >
> > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> >
> > Kea-users mailing list
> > Kea-users at lists.isc.org
> > https://lists.isc.org/mailman/listinfo/kea-users
> --
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240626/a1cd5e42/attachment-0001.htm>
More information about the Kea-users
mailing list