[Logcheck-devel] Bug#869415: logcheck-database: Improve systemd timer rules - support milliseconds
Enrico Troeger
enrico.troeger at uvena.de
Sun Jul 23 10:35:16 UTC 2017
Package: logcheck-database
Version: 1.3.18
Severity: normal
The current regex for systemd timers works for time deltas in
hours, minutes and seconds.
But systemd also has timedeltas with milliseconds, e.g.
apt-daily-upgrade.timer: Adding 18min 121.163ms random time.
apt-daily-upgrade.timer: Adding 21min 821.192ms random time.
apt-daily-upgrade.timer: Adding 2min 460.118ms random time.
apt-daily-upgrade.timer: Adding 46min 970.573ms random time.
apt-daily-upgrade.timer: Adding 50min 277.252ms random time.
I adjusted the regex to support those as well:
^[[:alpha:]]{3} [ :[:digit:]]{11} [._[:alnum:]\-]+ systemd\[[0-9]+\]: [-_[:alnum:]]+.timer: Adding ([0-9]+h )?([0-9]{1,2}min )?[0-9]{1,3}\.[0-9]{3,6}m?s random time\.$
There are three changes to the original regex:
- add an optional "m" as prefix to the "s" for seconds
- allow up to three digits in the non-fractional part of (milli)seconds
- allow precision between 3 and 6 as it seems milliseconds deltas
are always given with a precision of 3.
For now, I added a local-systemd rule on my system but it would be
nice to be included in the package as well.
Thanks.
Regards,
Enrico
-- System Information:
Debian Release: 9.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
-- no debconf information
More information about the Logcheck-devel
mailing list