-
Bug
-
Resolution: Unresolved
-
Normal
-
CentOS Stream 9, rhel-9.6, rhel-10.0
-
logwatch-7.5.5-8.el9
-
No
-
Moderate
-
FutureFeature, EasyFix
-
1
-
rhel-plumbers
-
ssg_core_services
-
3
-
False
-
False
-
-
None
-
Red Hat Enterprise Linux
-
Plumbers Sprint 2
-
Pass
-
Automated
-
Unspecified
-
Unspecified
-
Unspecified
-
All
-
None
As of writing, logwatch-7.5.5-6.el9.noarch, as shipped in RHEL 9.6 and CentOS Stream 9 does not support zstd-compressed log files (only gzip, bzip2 and lzma).
From /usr/sbin/logwatch:
# Handle compressed log files using the archive codepath foreach my $lf (@{$LogFileData{$LogFile}{'logfiles'}}) { if ($lf =~ /\.(?:gz|bz2|xz)$/) { push @{$LogFileData{$LogFile}{'archives'}}, $lf; } else { push @FileList, $lf; } }
and
#Archives are cat'd without any filters then cat'd along with the normal log file my @FileStat = stat($Archive); if ($CheckTime <= ($FileStat[9])) { if (($Archive =~ m/gz$/) && (-f "$Archive") && (-s "$Archive")) { my $arguments = "'${Archive}' >> $DestFile"; system("$Config{'pathtozcat'} $arguments") == 0 or die "system '$Config{'pathtozcat'} $arguments' failed: $?" } elsif (($Archive =~ m/bz2$/) && (-f "$Archive") && (-s "$Archive")) { my $arguments = "'${Archive}' 2>/dev/null >> $DestFile"; system("$Config{'pathtobzcat'} $arguments") == 0 or die "system '$Config{'pathtobzcat'} $arguments' failed: $?" } elsif (($Archive =~ m/xz$/) && (-f "$Archive") && (-s "$Archive")) { my $arguments = "'${Archive}' 2>/dev/null >> $DestFile"; system("$Config{'pathtoxzcat'} $arguments") == 0 or die "system '$Config{'pathtoxzcat'} $arguments' failed: $?" } elsif ((-f "$Archive") && (-s "$Archive")) { my $arguments = "'${Archive}' >> $DestFile"; system("$Config{'pathtocat'} $arguments") == 0 or die "system '$Config{'pathtocat'} $arguments' failed: $?" } #End if/elsif existence } #End if $CheckTime
This leads to the issue that if /var/log/messages is compressed by logrotate using zstd, the zstd-compressed /var/log/messages is no longer evaluated by logwatch.
Please add missing support for zstd-compressed log files to logwatch.
- is cloned by
-
RHEL-102044 [RHEL10] Missing support in logwatch for zstd-compressed log files
-
- Release Pending
-
- links to
-
RHBA-2025:153486 logwatch update