Fwd: named patches
Kirk Bauer <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
---------- Forwarded message ---------- From: Orion Poplawski <[email protected]> Date: Thu, 09 Jul 2009 09:35:58 -0600 Subject: named patches To: [email protected] Attached patch handles the following messages: Jul 9 09:08:12 saga named[4610]: success resolving 'smartbargains.outbound.ed10.com/A' (in 'ed10.com'?) after reducing the advertised EDNS UDP packet size to 512 octets Jul 9 09:16:46 saga named[4610]: network unreachable resolving 'ns2.orbcp4.co.uk/AAAA/IN': 2a01:40:1001:35::2#53 Jul 9 03:14:46 saga named[4610]: host unreachable resolving '132.32.23.81.in-addr.arpa/PTR/IN': 81.23.32.132#53 -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane [email protected] Boulder, CO 80301 http://www.cora.nwra.com -- Sent from my mobile device ------------------------------------------------------ Kirk Bauer <[email protected]> http://linux.kaybee.org | www.logwatch.org Author, Automating UNIX & Linux Administration _______________________________________________ Logwatch-Devel mailing list [email protected] http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
named.patch
(text/x-patch, 2.7 KB)
Index: named
===================================================================
RCS file: /var/cvs/logwatch/scripts/services/named,v
retrieving revision 1.58
diff -u -r1.58 named
--- named 2 Jun 2009 14:55:45 -0000 1.58
+++ named 9 Jul 2009 15:30:29 -0000
@@ -212,6 +212,7 @@
($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 =~ /success resolving '.*' .* after 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)
) {
@@ -266,6 +267,12 @@
$ZoneFileErrors{$File}{"$Entry: $Error"}++;
} elsif ( ($File,$Line,$Entry,$Error) = ( $ThisLine =~ /warning: ([^:]+):(\d+): (.+)$/ ) ) {
$ZoneFileErrors{$File}{"file does not end with newline: $Error"}++;
+ } elsif ( ($Name,$Host) = ( $ThisLine =~ /host unreachable resolving '(.*)': (.*)#(\d+)/ ) ) {
+ $FullHost = LookupIP ($Host);
+ $HostUnreachable{$Name}{$FullHost}++;
+ } elsif ( ($Name,$Host) = ( $ThisLine =~ /network unreachable resolving '(.*)': (.*)#(\d+)/ ) ) {
+ $FullHost = LookupIP ($Host);
+ $NetworkUnreachable{$Name}{$FullHost}++;
} elsif ( ($Way,$Host) = ( $ThisLine =~ /([^ ]+): sendto\(\[([^ ]+)\].+\): Network is unreachable/ ) ) {
$FullHost = LookupIP ($Host);
$NetworkUnreachable{$Way}{$FullHost}++;
@@ -277,7 +284,7 @@
} elsif ( ($Client) = ( $ThisLine =~ /warning: client (.*) no more TCP clients/ ) ) {
$FullClient = LookupIP ($Client);
$DeniedTCPClient{$FullClient}++;
- } elsif ( ($Client) = ( $ThisLine =~ /client (.*)#\d+: query \(cache\) denied/ ) ) {
+ } elsif ( ($Client) = ( $ThisLine =~ /client (.*)#?\d*: query \(cache\) (?:'\.\/NS\/IN' )?denied/ ) ) {
$FullClient = LookupIP ($Client);
$DeniedQuery{$FullClient}++;
} elsif ( ($Rhost, $ViewName, $Ldom) = ($ThisLine =~ /client ([\d\.]+)#\d+:(?: view ([^ ]+):)? update '(.*)' denied/)) {
@@ -461,6 +468,16 @@
}
}
+if ( ( $Detail >= 10 ) and (keys %HostUnreachable) ) {
+ print "\nHost is unreachable for:\n";
+ foreach $ThisOne (sort {$a cmp $b} keys %HostUnreachable) {
+ print " $ThisOne:\n";
+ foreach $Host (sort {$a cmp $b} keys %{$HostUnreachable{$ThisOne}}) {
+ print " $Host: $HostUnreachable{$ThisOne}{$Host} Time(s)\n";
+ }
+ }
+}
+
if ( ( $Detail >= 10 ) and (keys %NetworkUnreachable) ) {
print "\nNetwork is unreachable for:\n";
foreach $ThisOne (sort {$a cmp $b} keys %NetworkUnreachable) {