More DRBD messages
"gulikoza" <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Attached patch adds support for more drbd messages and skips some annoying lines. Regards, gulikoza ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ Logwatch-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/logwatch-devel
logwatch-drbd.diff
(application/octet-stream, 2.1 KB)
Index: scripts/services/kernel
===================================================================
--- scripts/services/kernel (revision 197)
+++ scripts/services/kernel (working copy)
@@ -104,8 +104,12 @@
# Standard boot messages
next if $ThisLine =~ /Giving out device to /;
$EDACs{$1}++;
- } elsif ($ThisLine =~ /block (drbd\d+): Online verify found (\d+) \d+k block out of sync/) {
- $DRBDErrors{$1} = $2;
+ } elsif ($ThisLine =~ /(block drbd\d+): Online verify found (\d+) \d+k block out of sync/) {
+ $DRBDErrors{$1}{"$2 block(s) out of sync"} = 1;
+ } elsif ($ThisLine =~ /(block drbd\d+): \[.*\] sock_sendmsg time expired/) {
+ $DRBDErrors{$1}{"sock_sendmsg time expired"}++;
+ } elsif ($ThisLine =~ /(block drbd\d+): Began resync as (SyncSource|SyncTarget)/) {
+ $DRBDErrors{$1}{"Began resync as $2"}++;
} elsif ( ( my $errormsg ) = ( $ThisLine =~ /(.*?error.{0,17})/i ) ) {
# filter out smb open/read errors cased by insufficient permissions
my $SkipError = 0;
@@ -137,6 +141,10 @@
$SkipError = 1 if $ThisLine =~ /smb_open: .* open failed, result=-13/;
$SkipError = 1 if $ThisLine =~ /smb_open: .* open failed, error=-13/;
$SkipError = 1 if $ThisLine =~ /block drbd\d+: Out of sync: start=\d+/;
+ $SkipError = 1 if $ThisLine =~ /block drbd\d+: updated( sync)? UUIDs?/i;
+ $SkipError = 1 if $ThisLine =~ /block drbd\d+: Resync done/;
+ $SkipError = 1 if $ThisLine =~ /block drbd\d+: cs:Ahead rs_left/;
+ $SkipError = 1 if $ThisLine =~ /block drbd\d+: \d+ % had equal checksums, eliminated:/;
$Kernel{$ThisLine}++ if ( (! $SkipError) || ($Detail > 8)) ;
}
}
@@ -161,7 +169,11 @@
if (keys %DRBDErrors) {
print "\nWARNING: DRBD Errors Present\n";
foreach my $Thisone ( sort {$a cmp $b} keys %DRBDErrors ) {
- print " $Thisone : $DRBDErrors{$Thisone} block(s) out of sync\n";
+ foreach my $Msg (sort {$a cmp $b} keys %{$DRBDErrors{$Thisone}}) {
+ print " $Thisone: $Msg";
+ print " : $DRBDErrors{$Thisone}{$Msg} Time(s)" if $DRBDErrors{$Thisone}{$Msg} > 1;
+ print "\n";
+ }
}
}