source: trunk/server/fedora/config/etc/logwatch/scripts/services/named @ 1390

Last change on this file since 1390 was 1390, checked in by quentin, 13 years ago
Import upstream logwatch named script
File size: 21.9 KB
RevLine 
[1390]1##########################################################################
2# $Id: named,v 1.52 2007/04/28 20:58:39 bjorn Exp $
3##########################################################################
4# $Log: named,v $
5# Revision 1.52  2007/04/28 20:58:39  bjorn
6# More generic RCODE handling - prints summary of unexpected DNS RCODEs.
7#
8# Revision 1.51  2007/04/15 20:03:25  bjorn
9# Filtering updating zones with views, based on submittal by
10# Jesper K. Pedersen.
11#
12# Revision 1.50  2007/02/16 03:36:25  bjorn
13# Filtering some D-BUS statements, by Ivana Varekova.
14#
15# Revision 1.49  2007/01/29 18:28:38  bjorn
16# Better formatting of output, by Markus Lude.
17#
18# Revision 1.48  2006/11/12 21:14:02  bjorn
19# Filtering 'transfer started' message, by Russell Coker / Tom London.
20#
21# Revision 1.47  2006/10/20 21:02:00  bjorn
22# Typo fixed by Alex S.
23#
24# Revision 1.46  2006/10/20 16:44:38  bjorn
25# Changed regexp to handle IPV6, by Willi Mann.
26#
27# Revision 1.45  2006/09/15 15:40:58  bjorn
28# Additional filtering by Ivana Varekova.
29#
30# Revision 1.44  2006/03/20 20:42:57  bjorn
31# Additional filtering, by Ivana Varekova.
32#
33# Revision 1.43  2005/11/30 05:01:44  bjorn
34# Don't search for info: string (for Debian), by Willi Mann.
35#
36# Revision 1.42  2005/11/24 16:48:30  bjorn
37# Handles additional statements, by Ivana Varekova.
38#
39# Revision 1.41  2005/09/29 15:02:52  bjorn
40# Filtering 'succeeded' by Ivana Varekova.
41#
42# Revision 1.40  2005/04/15 21:44:35  bjorn
43# testing from anonymous
44#
45# Revision 1.39  2005/04/15 21:36:59  bjorn
46# typo fixed in 'named' release during 2004
47#
48# Revision 1.38  2005/04/13 17:24:13  kirk
49# Test change
50#
51# Revision 1.37  2005/02/24 17:08:04  kirk
52# Applying consolidated patches from Mike Tremaine
53#
54# Revision 1.9  2005/02/21 19:09:52  mgt
55# Bump to 5.2.8 removed some cvs logs -mgt
56#
57# Revision 1.8  2005/02/16 00:43:28  mgt
58# Added #vi tag to everything, updated ignore.conf with comments, added emerge and netopia to the tree from Laurent -mgt
59#
60# Revision 1.7  2005/02/13 17:15:40  mgt
61# perl -w corrections for uninit stuff -mgt
62#
63# Revision 1.6  2004/10/11 18:14:47  mgt
64# update from Laurent -mgt
65#
66# Revision 1.41  2004/09/29 10:33:29  laurent Dufour <laurent.dufour@havas.com>
67# Removed some ^ in regex to prevent message not being in start on line to be matched
68# Added some check for error in named zone config file
69# Added some check for message not being matched
70#
71# Revision 1.4  2004/07/29 19:33:29  mgt
72# Chmod and removed perl call -mgt
73#
74# Revision 1.3  2004/07/10 01:54:35  mgt
75# sync with kirk -mgt
76#
77#########################################################################
78
79########################################################
80# This was written and is maintained by:
81#    Kirk Bauer <kirk@kaybee.org>
82#
83# Please send all comments, suggestions, bug reports,
84#    etc, to kirk@kaybee.org.
85########################################################
86
87use Logwatch ':ip';
88
89
90#$DoLookup = ValueOrDefault($ENV{'named_ip_lookup'}, 0);
91$Debug = ValueOrDefault($ENV{'LOGWATCH_DEBUG'}, 0);
92$Detail = ValueOrDefault($ENV{'LOGWATCH_DETAIL_LEVEL'}, 0);
93
94# Avoid "Use of uninitialized value" warning messages.
95sub ValueOrDefault {
96    my ($value, $default) = @_;
97    return ($value ? $value : $default);
98}
99
100if ( $Debug >= 5 ) {
101    print STDERR "\n\nDEBUG: Inside NAMED Filter \n\n";
102    $DebugCounter = 1;
103}
104
105
106while (defined($ThisLine = <STDIN>)) {
107 if ( $Debug >= 30 ) {
108        print STDERR "DEBUG($DebugCounter): $ThisLine";
109        $DebugCounter++;
110    }
111
112   if (
113      ($ThisLine =~ /RR negative cache entry/) or
114      ($ThisLine =~ /ns_....: .* NS points to CNAME/) or
115      ($ThisLine =~ /accept: connection reset by peer/) or
116      ($ThisLine =~ /Connection reset by peer/) or
117      # typo fixed in 2004 release
118      ($ThisLine =~ /transfer(r)?ed serial/) or
119      ($ThisLine =~ /There may be a name server already running/) or
120      ($ThisLine =~ /exiting/) or
121      ($ThisLine =~ /running/) or
122      ($ThisLine =~ /NSTATS /) or
123      ($ThisLine =~ /Cleaned cache of \d+ RRs/) or
124      ($ThisLine =~ /USAGE \d+ \d+ CPU=\d+.*/) or
125      ($ThisLine =~ /XSTATS /) or
126      ($ThisLine =~ /Ready to answer queries/) or
127      ($ThisLine =~ /Forwarding source address is/) or
128      ($ThisLine =~ /bad referral/) or
129      ($ThisLine =~ /prerequisite not satisfied/) or
130      ($ThisLine =~ /(rcvd|Sent) NOTIFY/) or
131      ($ThisLine =~ /ns_resp: TCP truncated/) or
132      ($ThisLine =~ /No possible A RRs/) or
133      ($ThisLine =~ /points to a CNAME/) or
134      ($ThisLine =~ /dangling CNAME pointer/) or
135      ($ThisLine =~ /listening on/) or
136      ($ThisLine =~ /unrelated additional info/) or
137      ($ThisLine =~ /Response from unexpected source/) or
138      ($ThisLine =~ /No root nameservers for class IN/) or
139      ($ThisLine =~ /recvfrom: No route to host/) or
140      ($ThisLine =~ /(C|c)onnection refused/) or
141      ($ThisLine =~ /lame server resolving/) or
142      ($ThisLine =~ /transfer of/) or
143      ($ThisLine =~ /using \d+ CPU/) or
144      ($ThisLine =~ /loading configuration/) or
145      ($ThisLine =~ /command channel listening/) or
146      ($ThisLine =~ /no IPv6 interfaces found/) or
147      ($ThisLine =~ /^running/) or
148      ($ThisLine =~ /^exiting/) or
149      ($ThisLine =~ /no longer listening/) or
150      ($ThisLine =~ /the default for the .* option is now/) or
151      ($ThisLine =~ /stopping command channel on \S+/) or
152      ($ThisLine =~ /Malformed response from/) or
153      ($ThisLine =~ /client .* response from Internet for .*/) or
154      ($ThisLine =~ /client .+ query \(cache\) '.*' denied/) or
155      ($ThisLine =~ /client .+#\d+: query:/) or
156      # Do we really want to ignore these?
157      #($ThisLine =~ /unknown logging category/) or
158      ($ThisLine =~ /could not open entropy source/) or
159      ($ThisLine =~ /\/etc\/rndc.key: file not found/) or
160      ($ThisLine =~ /sending notifies/) or
161      # file syntax error get reported twice and are already caught below
162      ($ThisLine =~ /loading master file/) or
163      ($ThisLine =~ /^ succeeded$/) or
164      ($ThisLine =~ /\*\*\* POKED TIMER \*\*\*/) or
165      # The message about the end of transfer is the interesting one
166      ($ThisLine =~ /: Transfer started./) or
167      ($ThisLine =~ /D-BUS service (disabled|enabled)./) or
168      ($ThisLine =~ /D-BUS dhcdbd subscription disabled./) or
169      ($ThisLine =~ /automatic empty zone/) or
170      ($ThisLine =~ /binding TCP socket: address in use/) or
171      ($ThisLine =~ /dbus_mgr initialization failed. D-BUS service is disabled./) or
172      ($ThisLine =~ /dbus_svc_add_filter failed/) or
173      ($ThisLine =~ /isc_log_open 'named.run' failed: permission denied/) or
174      ($ThisLine =~ /weak RSASHA1 \(5\) key found \(exponent=3\)/) or
175      ($ThisLine =~ /Bad file descriptor/) or
176      ($ThisLine =~ /open: .*: file not found/) or
177      ($ThisLine =~ /queries: client [0-9.#:]* view localhost_resolver: query: .* IN .*/) or
178      ($ThisLine =~ /zone .*: NS '.*' is a CNAME \(illegal\)/) or
179      ($ThisLine =~ /zone .*: zone serial unchanged. zone may fail to transfer to slaves/) or
180      ($ThisLine =~ /zone .*: loading from master file .* failed/) or
181      ($ThisLine =~ /zone .*: NS '.*' has no address records/) or
182      ($ThisLine =~ /.*: not a valid number$/) or
183      ($ThisLine =~ /.*: unexpected end of input/) or
184      ($ThisLine =~ /too many timeouts resolving '.*' .*: disabling EDNS/) or
185      ($ThisLine =~ /too many timeouts resolving '.*' .*: reducing the advertised EDNS UDP packet size to .* octets/) or
186      ($ThisLine =~ /reloading zones succeeded/) or
187      ($ThisLine =~ /success resolving '.*' \(in '.*'?\) after disabling EDNS/) or
188      ($ThisLine =~ /success resolving '.*' \(in '.*'?\) after reducing the advertised EDNS UDP packet size to 512 octets/) or
189      ($ThisLine =~ /the working directory is not writable/) or
190      ($ThisLine =~ /using default UDP\/IPv[46] port range: \[[0-9]*, [0-9]*\]/) or
191      ($ThisLine =~ /adjusted limit on open files from [0-9]* to [0-9]*/) or
192      ($ThisLine =~ /using up to [0-9]* sockets/) or
193      ($ThisLine =~ /built with/)
194      # too many timeouts resolving 'ns-ext.nrt1.isc.org/AAAA' (in '.'?): disabling EDNS: 3 Time(s)
195   ) {
196      # Don't care about these...
197   } elsif (
198      ($ThisLine =~ /starting\..*named/) or
199      ($ThisLine =~ /starting BIND/) or
200      ($ThisLine =~ /named startup succeeded/)
201   ) {
202      $StartNamed++;
203   } elsif ( $ThisLine =~ /(reloading nameserver|named reload succeeded)/ ) {
204      $ReloadNamed++;
205   } elsif (
206      ($ThisLine =~ /shutting down/) or
207      ($ThisLine =~ /named shutting down/ ) or
208      ($ThisLine =~ /named shutdown succeeded/ )
209   ) {
210      $ShutdownNamed++;
211   } elsif ( ($Host, $Zone) = ( $ThisLine =~ /client ([^\#]+)#[^\:]+: zone transfer '(.+)' denied/ ) ) {
212      $DeniedZoneTransfers{$Host}{$Zone}++;
213   } elsif ( ($Zone) = ( $ThisLine =~ /cache zone \"(.*)\" loaded/ ) ) {
214      $ZoneLoaded{"cache $Zone"}++;
215   } elsif ( ($Zone) = ( $ThisLine =~ /cache zone \"(.*)\" .* loaded/ ) ) {
216      $ZoneLoaded{"cache $Zone"}++;
217   } elsif ( ($Zone) = ( $ThisLine =~ /primary zone \"(.+)\" loaded/ ) ) {
218      $ZoneLoaded{$Zone}++;
219   } elsif ( ($Zone) = ( $ThisLine =~ /master zone \"(.+)\" .* loaded/ ) ) {
220      $ZoneLoaded{$Zone}++;
221   } elsif ( ($Zone) = ( $ThisLine =~ /secondary zone \"(.+)\" loaded/ ) ) {
222      $ZoneLoaded{"secondary $Zone"}++;
223   } elsif ( ($Zone) = ( $ThisLine =~ /slave zone \"(.+)\" .* loaded/ ) ) {
224      $ZoneLoaded{"secondary $Zone"}++;
225   } elsif ( ($Zone) = ( $ThisLine =~ /zone (.+)\: loaded serial/ ) ) {
226      $ZoneLoaded{$Zone}++;
227   } elsif ( (undef,$Addr,undef,$Server) = ( $ThisLine =~ /ame server (on|resolving) '(.+)' \(in .+\):\s+(\[.+\]\.\d+)?\s*'?(.+)'?:?/ ) ) {
228      $LameServer{"$Addr ($Server)"}++;
229   } elsif ( ($Zone) = ( $ThisLine =~ /Zone \"(.+)\" was removed/ ) ) {
230      $ZoneRemoved{$Zone}++;
231   } elsif ( ($Zone) = ( $ThisLine =~ /received notify for zone '(.*)'/ ) ) {
232      $ZoneReceivedNotify{$Zone}++;
233   } elsif ( ($Zone) = ( $ThisLine =~ /zone (.*): notify from .* up to date/ ) ) {
234      $ZoneReceivedNotify{$Zone}++;
235   } elsif ( ($Host) = ( $ThisLine =~ /([^ ]+) has CNAME and other data \(invalid\)/ ) ) {
236      push @CNAMEAndOther, $Host;
237   } elsif ( ($File,$Line,$Entry,$Error) = ( $ThisLine =~ /dns_master_load: ([^:]+):(\d+): ([^ ]+): (.+)$/ ) ) {
238      $ZoneFileErrors{$File}{"$Entry: $Error"}++;
239   } elsif ( ($File,$Line,$Entry,$Error) = ( $ThisLine =~ /warning: ([^:]+):(\d+): (.+)$/ ) ) {
240      $ZoneFileErrors{$File}{"file does not end with newline: $Error"}++;
241   } elsif ( ($Way,$Host) = ( $ThisLine =~ /([^ ]+): sendto\(\[([^ ]+)\].+\): Network is unreachable/ ) ) {
242      $FullHost = LookupIP ($Host);
243      $NetworkUnreachable{$Way}{$FullHost}++;
244   } elsif ( ($Zone,$Message) = ( $ThisLine =~ /client [^\#]+#[^\:]+: (?:view \w+: )?updating zone '([^\:]+)': (.*)$/ ) ) {
245      $ZoneUpdates{$Zone}{$Message}++;
246   } elsif ( ($Host,$Zone) = ( $ThisLine =~ /approved AXFR from \[(.+)\]\..+ for \"(.+)\"/ ) ) {
247      $FullHost = LookupIP ($Host);
248      $AXFR{$Zone}{$FullHost}++;
249   } elsif ( ($Client) = ( $ThisLine =~ /warning: client (.*) no more TCP clients/ ) ) {
250      $FullClient = LookupIP ($Client);
251      $DeniedTCPClient{$FullClient}++;
252   } elsif ( ($Client) = ( $ThisLine =~ /client (.*)#\d+: query \(cache\) denied/ ) ) {
253      $FullClient = LookupIP ($Client);
254      $DeniedQuery{$FullClient}++;
255   } elsif ( ($Rhost, $Ldom) = ($ThisLine =~ /client ([\d\.]+)#\d+: update '(.*)' denied/)) {
256      $UpdateDenied{"$Rhost ($Ldom)"}++;
257   } elsif ( ($Zone) = ($ThisLine =~ /zone '([0-9a-zA-Z.-]+)' allows updates by IP address, which is insecure/)) {
258      $InsecUpdate{$Zone}++;
259   } elsif ( ($Zone) = ($ThisLine =~ /zone ([0-9a-zA-Z.\/-]+): journal rollforward failed: journal out of sync with zone/)) {
260      $JournalFail{$Zone}++;
261   } elsif ( ($Channel,$Reason) = ($ThisLine =~ /couldn't add command channel (.+#\d+): (.*)$/)) {
262      $ChannelAddFail{$Channel}{$Reason}++;
263   } elsif ( ($Zone,$Host,$Reason) = ($ThisLine =~ /zone ([^ ]*)\/IN: refresh: failure trying master ([^ ]*)#\d+: (.*)/) ) {
264      $MasterFailure{"$Zone from $Host"}{$Reason}++;
265   } elsif ( ($Zone) = ($ThisLine =~ /zone ([^\/]+)\/.+: refresh: non-authoritative answer from master/)) {
266      $NonAuthoritative{$Zone}++;
267   } elsif ( ($ThisLine =~ /unexpected RCODE \((.*)\) resolving/) ){
268      $UnexpRCODE{$1}++;
269   } elsif ( ($ThisLine =~ /FORMERR resolving '[^ ]+: [0-9.#]+/) ) {
270      chomp($ThisLine);
271      $FormErr{$ThisLine}++;
272   } elsif ( ($ThisLine =~ /found [0-9]* CPU(s)?, using [0-9]* worker thread(s)?/) ) {
273      chomp($ThisLine);
274      $StartLog{$ThisLine}++;
275   } elsif ( (($File,$Line,$Problem) = ($ThisLine =~ /\/etc\/(rndc.key|named.conf):([0-9]+): (unknown option '[^ ]*')/)) or
276             (($File,$Line,$Problem) = ($ThisLine =~ /\/etc\/(rndc.key|named.conf):([0-9]+): ('[^ ]' expected near end of file)/)) or
277             (($File,$Line,$Problem) = ($ThisLine =~ /\/etc\/(named.*.conf):([0-9]+): (.*)/)) or
278             (($File,$Line,$Problem) = ($ThisLine =~ /()()(could not configure root hints from '.*': file not found)/))) {
279       $ConfProb{$File}{"$Line,$Problem"}++;
280   } elsif ( (($ErrorText) = ($ThisLine =~ /^(RUNTIME_CHECK.*)/))or
281             (($ErrorText) = ($ThisLine =~ /^(.* REQUIRE.* failed.*)$/)) or
282             (($ErrorText) = ($ThisLine =~ /(.*: fatal error)/)) ) {
283      $NError{$ErrorText}++;
284   } elsif ( ($From,$Log) = ($ThisLine =~ /invalid command from ([.0-9]*)#[0-9]*: (.*)/) ) {
285      $CCMessages{"$From,$Log"}++;
286   } elsif ( (($Log) = ($ThisLine =~ /(freezing .*zone.*)/)) or
287             (($Log) = ($ThisLine =~ /(thawing .*zone.*)/)) ) {
288      $CCMessages2{$Log}++;
289   } elsif (($CCC) = ($ThisLine =~ /unknown control channel command '(.*)'/)) {
290      $UnknownCCCommands{$CCC}++;
291   } elsif (($CCC) = ($ThisLine =~ /received control channel command '(.*)'/)) {
292      $CCCommands{$CCC}++;
293   } elsif (($Name,$Address) = ($ThisLine =~ /network unreachable resolving '(.*)': (.*)/)) {
294      $NUR{$Name}{$Address}++;
295   } elsif (($Name,$Address) = ($ThisLine =~ /host unreachable resolving '(.*)': (.*)/)) {
296      $HUR{$Name}{$Address}++;
297   } else {
298      # Report any unmatched entries...
299      # remove PID from named messages
300      $ThisLine =~ s/(client [.0-9]+)\S+/$1/;
301      chomp($ThisLine);
302      $OtherList{$ThisLine}++;
303   }
304}
305
306#######################################
307
308if ( ( $Detail >= 5 ) and ($StartNamed) ) {
309   print "Named started: $StartNamed Time(s)\n";
310}
311
312if ( ( $Detail >= 5 ) and ($ReloadNamed) ) {
313   print "Named reloaded: $ReloadNamed Time(s)\n";
314}
315
316if ( ( $Detail >= 5 ) and ($ShutdownNamed) ) {
317   print "Named shutdown: $ShutdownNamed Time(s)\n";
318}
319
320if ( ( $Detail >= 5 ) and (keys %ZoneLoaded) ) {
321   print "\nLoaded Zones:\n";
322   foreach $ThisOne (sort {$a cmp $b} keys %ZoneLoaded) {
323      print "   $ThisOne: $ZoneLoaded{$ThisOne} Time(s)\n";
324   }
325}
326
327if ( ( $Detail >= 5 ) and (keys %ZoneReceivedNotify) ) {
328   print "\nZones receiving notify:\n";
329   foreach $ThisOne (sort {$a cmp $b} keys %ZoneReceivedNotify) {
330      print "   $ThisOne: $ZoneReceivedNotify{$ThisOne} Time(s)\n";
331   }
332}
333
334if ( ($Detail >= 5) and (keys %ChannelAddFail) ) {
335   print "\nCan't add command channel:\n";
336   foreach $Channel (sort {$a cmp $b} keys %ChannelAddFail) {
337      print "   $Channel:\n";
338      foreach $Reason (sort {$a cmp $b} keys %{$ChannelAddFail{$Channel}}) {
339         print "      $Reason: $ChannelAddFail{$Channel}{$Reason} Time(s)\n";
340      }
341   }
342}
343
344if ( ($Detail >= 5) and (keys %MasterFailure) ) {
345   print "\nFailure trying to refresh zone:\n";
346   foreach $Zone (sort {$a cmp $b} keys %MasterFailure) {
347      print "   $Zone:\n";
348      foreach $Reason (sort {$a cmp $b} keys %{$MasterFailure{$Zone}}) {
349         print "      $Reason: $MasterFailure{$Zone}{$Reason}++ Time(s)\n";
350      }
351   }
352}
353
354if ( ( $Detail >= 5 ) and (keys %DeniedZoneTransfers) ) {
355   print "\nDenied Zone Transfers:\n";
356   foreach my $Host (keys %DeniedZoneTransfers) {
357      print "   $Host:\n";
358      foreach my $Zone (keys %{$DeniedZoneTransfers{$Host}}) {
359         print "      $Zone: $DeniedZoneTransfers{$Host}{$Zone} Time(s)\n";
360      }
361      print "\n";
362   }
363}
364
365if ( ( $Detail >= 5 ) and (keys %ZoneRemoved) ) {
366   print "\nRemoved Zones:\n";
367   foreach $ThisOne (sort {$a cmp $b} keys %ZoneRemoved) {
368      print "   $ThisOne: $ZoneRemoved{$ThisOne} Time(s)\n";
369   }
370}
371
372if ( ( $Detail >= 5 ) and (keys %AXFR) ) {
373   print "\nZone Transfers:\n";
374   foreach $ThisOne (keys %AXFR) {
375      print "   Zone: $ThisOne\n";
376      foreach $Temp (keys %{$AXFR{$ThisOne}}) {
377         print "      by $Temp: $AXFR{$ThisOne}{$Temp} Time(s)\n";
378      }
379   }
380}
381
382if ( ( $Detail >= 5 ) and (keys %DeniedTCPClient) ) {
383   print "\nno more TCP clients warning:\n";
384   foreach $ThisOne (keys %DeniedTCPClient) {
385      print "   from $ThisOne: $DeniedTCPClient{$ThisOne} Time(s)\n";
386   }
387}
388
389if ( ( $Detail >= 5 ) and (keys %DeniedQuery) ) {
390   print "\nQueries (cache) that were denied:\n";
391   foreach $ThisOne (keys %DeniedQuery) {
392      print "   from $ThisOne: $DeniedQuery{$ThisOne} Time(s)\n";
393   }
394}
395
396if ( ( $Detail >= 10 ) and (@CNAMEAndOther) ) {
397   print "\nThese hosts have CNAME and other data (invalid):\n";
398   foreach $ThisOne (@CNAMEAndOther) {
399      print "   $ThisOne\n";
400   }
401}
402
403if ( ( $Detail >= 5 ) and (keys %ZoneFileErrors) ) {
404   print "\nSyntax errors in zone files:\n";
405   for $File (keys %ZoneFileErrors) {
406      print "   $File\n";
407      for $Error ( keys %{$ZoneFileErrors{$File}} ) {
408         print "      \"$Error\" " . $ZoneFileErrors{$File}{$Error} . " Time(s)\n";
409      }
410   }
411}
412
413if ( ( $Detail >= 10 ) and (keys %LameServer) ) {
414   print "\nThese addresses had lame server references:\n";
415   foreach $ThisOne (keys %LameServer) {
416      print "   $ThisOne: $LameServer{$ThisOne} Time(s)\n";
417   }
418}
419
420if ( ( $Detail >= 10 ) and (keys %NonAuthoritative) ) {
421   print "\nNon-authoritative answer from master for these zones:\n";
422   foreach $ThisOne (keys %NonAuthoritative) {
423      print "   " . $ThisOne . ": " . $NonAuthoritative{$ThisOne} . " Time(s)\n";
424   }
425}
426
427if ( ( $Detail >= 10 ) and (keys %NetworkUnreachable) ) {
428   print "\nNetwork is unreachable for:\n";
429   foreach $ThisOne (sort {$a cmp $b} keys %NetworkUnreachable) {
430      print "   $ThisOne:\n";
431      foreach $Host (sort {$a cmp $b} keys %{$NetworkUnreachable{$ThisOne}}) {
432         print "      $Host: $NetworkUnreachable{$ThisOne}{$Host} Time(s)\n";
433      }
434   }
435}
436
437if ( ( $Detail >= 10 ) and (keys %NUR) ) {
438   print "\nNetwork unreachable resolving for:\n";
439   foreach $ThisOne (sort {$a cmp $b} keys %NUR) {
440      print "   $ThisOne:\n";
441      foreach $Host (sort {$a cmp $b} keys %{$NUR{$ThisOne}}) {
442         print "      $Host: $NUR{$ThisOne}{$Host} Time(s)\n";
443      }
444   }
445}
446
447if ( ( $Detail >= 10 ) and (keys %HUR) ) {
448   print "\nHost unreachable resolving for:\n";
449   foreach $ThisOne (sort {$a cmp $b} keys %HUR) {
450       print "   $ThisOne:\n";
451       foreach $Host (sort {$a cmp $b} keys %{$HUR{$ThisOne}}) {
452          print "      $Host: $HUR{$ThisOne}{$Host} Time(s)\n";
453       }
454   }
455}
456
457if ( ( $Detail >= 5 ) and (keys %ZoneUpdates) ) {
458   print "\nZone Updates:\n";
459   foreach $ThisOne (sort {$a cmp $b} keys %ZoneUpdates) {
460      print "   $ThisOne:\n";
461      foreach $Message (sort {$a cmp $b} keys %{$ZoneUpdates{$ThisOne}}) {
462         print "      $Message: $ZoneUpdates{$ThisOne}{$Message} Time(s)\n";
463      }
464   }
465}
466
467if ( keys %UpdateDenied ) {
468   print "\nZone update refused:\n";
469   foreach $ThisOne (sort {$a cmp $b} keys %UpdateDenied) {
470      print "   $ThisOne: $UpdateDenied{$ThisOne} Time(s)\n";
471   }
472}
473
474if ( keys %InsecUpdate ) {
475   print "\nInsecure zones (dynamic update allowed by IP address):\n";
476   foreach $ThisOne (sort {$a cmp $b} keys %InsecUpdate) {
477      print "   " . $ThisOne . ": " . $InsecUpdate{$ThisOne} . " Time(s)\n";
478   }
479}
480
481if ( keys %JournalFail ) {
482   print "\nJournall rollforward failed:\n";
483   foreach $ThisOne (sort {$a cmp $b} keys %JournalFail) {
484      print "   " . $ThisOne . ": " . $JournalFail{$ThisOne} . " Time(s)\n";
485   }
486}
487
488if (keys %ConfProb) {
489   print "\n Errors in configuration files\n";
490   foreach $File (sort keys %ConfProb) {
491      if ($File =~ /.+/) {
492        print "   file " . $File . "\n";
493        foreach (keys %{$ConfProb{$File}}) {
494           ($Line,$Problem) = split ",";
495           print "      " . $File . ":" . "$Line" . ": " . $Problem . ": " . $ConfProb{$File}{"$Line,$Problem"} . " Time(s)\n";
496        }
497      }
498      else {
499        foreach (keys %{$ConfProb{$File}}) {
500           ($Line,$Problem) = split ",";
501            print "   " . $Problem . ": " . $ConfProb{$File}{"$Line,$Problem"} . " Time(s)\n";
502        }
503      }
504   }
505}
506
507if (($Detail >= 5) and (keys %UnexpRCODE)) {
508   print "\n Unexpected DNS RCODEs:\n";
509   foreach $ThisOne (keys %UnexpRCODE) {
510      print "   " . $ThisOne . ": " . $UnexpRCODE{$ThisOne} . " Time(s)\n";
511   }
512}
513
514if (($Detail >= 5) and (keys %FormErr)) {
515   print "\n Incorrect response format:\n";
516   foreach $ThisOne (keys %FormErr) {
517      print "   " . $ThisOne . ": " . $FormErr{$ThisOne} . " Time(s)\n";
518   }
519}
520
521if (($Detail >= 10) and (keys %StartLog)) {
522   print "\n Named startup logs:\n";
523   foreach $ThisOne (keys %StartLog) {
524      print "   " . $ThisOne . ": " . $StartLog{$ThisOne} . " Time(s)\n";
525   }
526}
527
528if (keys %NError) {
529   print "\n Errors:\n";
530   foreach $ThisOne (keys %NError) {
531      print "   " . $ThisOne . ": " . $NError{$ThisOne} . " Time(s)\n";
532   }
533}
534
535if ((keys %CCMessages) or (keys %CCMessages2)){
536   print "\n Messages from control channel\n";
537   foreach (keys %CCMessages) {
538      ($From,$Log) = split ",";
539      print "   " . $From . ": " . $Log . ": " . $CCMessages{"$From,$Log"} . " Time(s)\n";
540   }
541   foreach $ThisOne (keys %CCMessages2) {
542      print "   " . $ThisOne . ": " . $CCMessages2{$ThisOne} . " Time(s)\n";
543   }
544}
545
546if ((keys %CCCommands) or (keys %UnknownCCCommands)) {
547   print "\nReceived control channel commands\n";
548   foreach $ThisOne (keys %CCCommands) {
549      print "   " . $ThisOne . ": " . $CCCommands{$ThisOne} . " Time(s)\n";
550   }
551   foreach $ThisOne (keys %UnknownCCCommands) {
552      print "   " . $ThisOne . "(unknown command): " . $CCCommands{$ThisOne} . " Time(s)\n";
553   }               
554}
555
556if (keys %OtherList) {
557   print "\n**Unmatched Entries**\n";
558   foreach $line (sort {$a cmp $b} keys %OtherList) {
559      print "   $line: $OtherList{$line} Time(s)\n";
560   }
561}
562
563exit(0);
564
565# vi: shiftwidth=3 tabstop=3 syntax=perl et
566
Note: See TracBrowser for help on using the repository browser.