- fix dovecot,named and openvpn scrpts(#476620)

This commit is contained in:
Ivana Varekova 2008-12-17 12:19:38 +00:00
parent 3ddc9dc156
commit 38fb24e643
4 changed files with 177 additions and 0 deletions

View File

@ -0,0 +1,72 @@
diff -up logwatch-7.3.6/scripts/services/dovecot.pom logwatch-7.3.6/scripts/services/dovecot
--- logwatch-7.3.6/scripts/services/dovecot.pom 2008-12-16 15:52:59.000000000 +0100
+++ logwatch-7.3.6/scripts/services/dovecot 2008-12-17 09:35:09.000000000 +0100
@@ -105,8 +105,10 @@ while (defined($ThisLine = <STDIN>)) {
$Disconnected{$Reason}++;
} elsif (($Reason, $Host) = ($ThisLine =~ /TLS initialization failed/) ) {
$TLSInitFail++;
- } elsif (($Host) = ($ThisLine =~ /Aborted login \[(.*)\]/) ) {
+ } elsif (($Host) = ($ThisLine =~ /Aborted login \[(.*)\]/)) {
$Aborted{$Host}++;
+ } elsif (($Reason) = ($ThisLine =~ /Aborted login \((.*)\):/)) {
+ $Aborted{$Reason}++;
# This is for Dovecot 1.0 series
@@ -114,17 +116,25 @@ while (defined($ThisLine = <STDIN>)) {
$Disconnected{"Inactivity"}++;
} elsif ($ThisLine =~ /Disconnected in IDLE/) {
$Disconnected{"in IDLE"}++;
- } elsif ($ThisLine =~ /Disconnected$/) {
+ } elsif (($ThisLine =~ /Disconnected$/) or
+ (($Reason) = ($ThisLine =~ /pop3-login: Disconnected: (.+)/)) or
+ (($Reason) = ($ThisLine =~ /imap-login: Disconnected: (.+)/)) ) {
$Disconnected{"no reason"}++;
- } elsif (($Reason) = ($ThisLine =~ /pop3-login: Disconnected: (.+)/) ) {
- $Disconnected{"no reason"}++;
- } elsif (($Reason) = ($ThisLine =~ /imap-login: Disconnected: (.+)/) ) {
- $Disconnected{"no reason"}++;
- } elsif (($Reason) = ($ThisLine =~ /IMAP.+: Disconnected: (.+)/) ) {
- $Disconnected{$Reason}++;
- } elsif (($Reason) = ($ThisLine =~ /POP3.+: Disconnected: (.+) top/) ) {
+ } elsif ( (($Reason) = ($ThisLine =~ /POP3.+: Disconnected: (.+) top/)) or
+ (($Reason) = ($ThisLine =~ /pop3-login: Disconnected \((.+)\): /)) or
+ (($Reason) = ($ThisLine =~ /IMAP.+: Disconnected: (.+) bytes=/)) or
+ (($Reason) = ($ThisLine =~ /IMAP.+: Disconnected: (.+)/)) ) {
$Disconnected{$Reason}++;
-
+ } elsif (($Reason) = ($ThisLine =~ /IMAP.+: Connection closed bytes=/)) {
+ $ConnectionCl{"no reason"}++;
+ } elsif ( (($Reason) = ($ThisLine =~ /IMAP.+: Connection closed: (.*) bytes=/)) or
+ (($Reason) = ($ThisLine =~ /POP3.+: Connection closed: (.*) (top=|bytes=)/)) ) {
+ $ConnectionCl{$Reason}++;
+ } elsif ($ThisLine =~ /POP3.+: Connection closed top=.* retr=.* del=.* size=.*/) {
+ $ConnectionCl{"no reason"}++;
+ } elsif (($Error) = ($ThisLine =~ /child \d* \(login\) returned error (.*)/)) {
+ # dovecot: child 23747 (login) returned error 89
+ $ChildErr{$Error}++;
} else {
# Report any unmatched entries...
chomp($ThisLine);
@@ -225,6 +235,21 @@ if (keys %Disconnected) {
}
}
+if (keys %ConnectionCl) {
+ print "\n\nDovecot connections closed:";
+ foreach my $Reason (sort keys %ConnectionCl) {
+ print "\n $Reason: $ConnectionCl{$Reason} Time(s)";
+ }
+}
+
+if (keys %ChildErr) {
+ print "\n\nDovecot child error:";
+ foreach my $Error (sort keys %ChildErr) {
+ print "\n error number ". $Error . ": ". $ChildErr{$Error} ." Time(s)";
+ }
+}
+
+
if ((keys %Aborted) && ($Detail >= 10)) {
print "\n\nLogout/aborts:";
foreach my $Host (sort keys %Aborted) {

View File

@ -0,0 +1,85 @@
diff -up logwatch-7.3.6/scripts/services/named.p1 logwatch-7.3.6/scripts/services/named
--- logwatch-7.3.6/scripts/services/named.p1 2008-12-17 13:13:49.000000000 +0100
+++ logwatch-7.3.6/scripts/services/named 2008-12-17 13:14:59.000000000 +0100
@@ -137,7 +137,7 @@ while (defined($ThisLine = <STDIN>)) {
($ThisLine =~ /Response from unexpected source/) or
($ThisLine =~ /No root nameservers for class IN/) or
($ThisLine =~ /recvfrom: No route to host/) or
- ($ThisLine =~ /Connection refused/) or
+ ($ThisLine =~ /(C|c)onnection refused/) or
($ThisLine =~ /lame server resolving/) or
($ThisLine =~ /transfer of/) or
($ThisLine =~ /using \d+ CPU/) or
@@ -150,6 +150,8 @@ while (defined($ThisLine = <STDIN>)) {
($ThisLine =~ /the default for the .* option is now/) or
($ThisLine =~ /stopping command channel on \S+/) or
($ThisLine =~ /Malformed response from/) or
+ ($ThisLine =~ /client .* response from Internet for .*/) or
+ ($ThisLine =~ /client .+ query \(cache\) '.*' denied/) or
($ThisLine =~ /client .+#\d+: query:/) or
# Do we really want to ignore these?
#($ThisLine =~ /unknown logging category/) or
@@ -180,6 +182,7 @@ while (defined($ThisLine = <STDIN>)) {
($ThisLine =~ /.*: not a valid number$/) or
($ThisLine =~ /.*: unexpected end of input/) or
($ThisLine =~ /too many timeouts resolving '.*' .*: disabling EDNS/) or
+ ($ThisLine =~ /too many timeouts resolving '.*' .*: reducing the advertised EDNS UDP packet size to .* octets/) or
($ThisLine =~ /reloading zones succeeded/)
# too many timeouts resolving 'ns-ext.nrt1.isc.org/AAAA' (in '.'?): disabling EDNS: 3 Time(s)
) {
@@ -220,6 +223,8 @@ while (defined($ThisLine = <STDIN>)) {
$ZoneRemoved{$Zone}++;
} elsif ( ($Zone) = ( $ThisLine =~ /received notify for zone '(.*)'/ ) ) {
$ZoneReceivedNotify{$Zone}++;
+ } elsif ( ($Zone) = ( $ThisLine =~ /zone (.*): notify from .* up to date/ ) ) {
+ $ZoneReceivedNotify{$Zone}++;
} elsif ( ($Host) = ( $ThisLine =~ /([^ ]+) has CNAME and other data \(invalid\)/ ) ) {
push @CNAMEAndOther, $Host;
} elsif ( ($File,$Line,$Entry,$Error) = ( $ThisLine =~ /dns_master_load: ([^:]+):(\d+): ([^ ]+): (.+)$/ ) ) {
@@ -278,6 +283,10 @@ while (defined($ThisLine = <STDIN>)) {
$UnknownCCCommands{$CCC}++;
} elsif (($CCC) = ($ThisLine =~ /received control channel command '(.*)'/)) {
$CCCommands{$CCC}++;
+ } elsif (($Name,$Address) = ($ThisLine =~ /network unreachable resolving '(.*)': (.*)/)) {
+ $NUR{$Name}{$Address}++;
+ } elsif (($Name,$Address) = ($ThisLine =~ /host unreachable resolving '(.*)': (.*)/)) {
+ $HUR{$Name}{$Address}++;
} else {
# Report any unmatched entries...
# remove PID from named messages
@@ -418,6 +427,26 @@ if ( ( $Detail >= 10 ) and (keys %Networ
}
}
+if ( ( $Detail >= 10 ) and (keys %NUR) ) {
+ print "\nNetwork unreachable resolving for:\n";
+ foreach $ThisOne (sort {$a cmp $b} keys %NUR) {
+ print " $ThisOne:\n";
+ foreach $Host (sort {$a cmp $b} keys %{$NUR{$ThisOne}}) {
+ print " $Host: $NUR{$ThisOne}{$Host} Time(s)\n";
+ }
+ }
+}
+
+if ( ( $Detail >= 10 ) and (keys %HUR) ) {
+ print "\nHost unreachable resolving for:\n";
+ foreach $ThisOne (sort {$a cmp $b} keys %HUR) {
+ print " $ThisOne:\n";
+ foreach $Host (sort {$a cmp $b} keys %{$HUR{$ThisOne}}) {
+ print " $Host: $HUR{$ThisOne}{$Host} Time(s)\n";
+ }
+ }
+}
+
if ( ( $Detail >= 5 ) and (keys %ZoneUpdates) ) {
print "\nZone Updates:\n";
foreach $ThisOne (sort {$a cmp $b} keys %ZoneUpdates) {
@@ -508,7 +537,7 @@ if ((keys %CCMessages) or (keys %CCMessa
}
if ((keys %CCCommands) or (keys %UnknownCCCommands)) {
- print "\n Received control channel commands\n";
+ print "\nReceived control channel commands\n";
foreach $ThisOne (keys %CCCommands) {
print " " . $ThisOne . ": " . $CCCommands{$ThisOne} . " Time(s)\n";
}

View File

@ -0,0 +1,13 @@
diff -up logwatch-7.3.6/scripts/services/openvpn.pom logwatch-7.3.6/scripts/services/openvpn
--- logwatch-7.3.6/scripts/services/openvpn.pom 2008-12-16 15:52:59.000000000 +0100
+++ logwatch-7.3.6/scripts/services/openvpn 2008-12-17 12:37:48.000000000 +0100
@@ -80,7 +80,8 @@ while (defined($ThisLine = <STDIN>)) {
($ThisLine =~ /^chroot to /) or
($ThisLine =~ /TUN\/TAP TX queue length set to [0-9]*/) or
($ThisLine =~ /Socket Buffers: R=\[[0-9]+->[0-9]+\] S=\[[0-9]+->[0-9]+\]/) or
- ($ThisLine =~ /OpenVPN .* built on [A-Z][a-z]{2} [ 12]?[0-9] [0-9]{4}/)
+ ($ThisLine =~ /OpenVPN .* built on [A-Z][a-z]{2} [ 12]?[0-9] [0-9]{4}/) or
+ ($ThisLine =~ /Authenticate\/Decrypt packet error: bad packet ID \(may be a replay\): \[ #.* \] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings/)
) {
# Don't care about these...
} elsif (($status, $dn) = ( $ThisLine =~ /^VERIFY (.*): depth=.*, (.*)\// )) {

View File

@ -45,6 +45,9 @@ Patch45: logwatch-7.3.6-init2.patch
Patch46: logwatch-7.3.6-secure2.patch
Patch47: logwatch-7.3.6-exim.patch
Patch48: logwatch-7.3.6-zz-disk_space2.patch
Patch49: logwatch-7.3.6-dovecot.patch
Patch50: logwatch-7.3.6-named4.patch
Patch51: logwatch-7.3.6-openvpn3.patch
Requires: textutils sh-utils grep mailx
Requires: perl(Date::Manip)
@ -98,6 +101,9 @@ of the package on many systems.
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
rm -f scripts/services/*.orig
%build
@ -211,6 +217,7 @@ rm -rf %{buildroot}
%changelog
* Tue Dec 16 2008 Ivana Varekova <varekova@redhat.com> 7.3.6-38
- remove obsolete patches
- fix dovecot,named and openvpn scrpts(#476620)
* Mon Dec 8 2008 Ivana Varekova <varekova@redhat.com> 7.3.6-37
- fix zz-disk_space script (#474810)