[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1000518: logcheck: separate filtering for apt term.log and or unattended-upgrades-dpkg.log etc?



Package: logcheck
Severity: wishlist
X-Debbugs-CC: apt@packages.debian.org, unattended-upgrades@packages.debian.org, cron-apt@packages.debian.org, aptitude-robot@packages.debian.org

Currently logcheck focuses on /var/log/syslog and /var/log/auth.log but
it would be nice to have separate filtering for other types of logs
that normally don't get merged into syslog or the journal.

One of those types of logs is apt upgrade logs. When apt itself is
invoked, it sends terminal output (including \r but not colours) to the
apt term.log file. If unattended-upgrades is being run then the same
output and also output of the apt hooks goes to the additional log file
unattended-upgrades-dpkg.log (which also contains \r but not colours).
The unattended-upgrades code may also send a mail with that log output
but without any \r or colors.

The unattended-upgrades wrapper around apt print various uninteresting
messages. The cron-apt/aptitude-robot alternatives probably also do the
same. apt itself prints a lot of messages that aren't interesting.
The apt hooks shipped by various packages print various uninteresting
messages. The maintainer scripts shipped by various packages print
various uninteresting messages.

I'm currently using the attached hacky script with lots of regexes to
implement apt upgrade log filtering. It seems to me that a better way
to do this would be to integrate separate apt filtering into logcheck
and then integrate into each package (including apt) logcheck ignore
configs containing the regexes that represent uninteresting messages.

There could be an apt hook to use logcheck to filter the apt term.log
to an apt term-interesting.log and an unattended-upgrades hook to
filter unattended-upgrades-dpkg.log to a corresponding file and an
option/hook to filter unattended-upgrades mails. The same could be done
for cron-apt/aptitude-robot.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: debian-filter-unattended-upgrades-report
Description: application/shellscript

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: