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

Last change on this file since 1529 was 1391, checked in by quentin, 14 years ago
Ignore DNSSEC errors
File size: 22.0 KB
Line 
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 =~ /^no valid (DS|KEY|RRSIG) resolving/) or
183      ($ThisLine =~ /^not insecure resolving/) or
184      ($ThisLine =~ /.*: not a valid number$/) or
185      ($ThisLine =~ /.*: unexpected end of input/) or
186      ($ThisLine =~ /too many timeouts resolving '.*' .*: disabling EDNS/) or
187      ($ThisLine =~ /too many timeouts resolving '.*' .*: reducing the advertised EDNS UDP packet size to .* octets/) or
188      ($ThisLine =~ /reloading zones succeeded/) or
189      ($ThisLine =~ /success resolving '.*' \(in '.*'?\) after disabling EDNS/) or
190      ($ThisLine =~ /success resolving '.*' \(in '.*'?\) after reducing the advertised EDNS UDP packet size to 512 octets/) or
191      ($ThisLine =~ /the working directory is not writable/) or
192      ($ThisLine =~ /using default UDP\/IPv[46] port range: \[[0-9]*, [0-9]*\]/) or
193      ($ThisLine =~ /adjusted limit on open files from [0-9]* to [0-9]*/) or
194      ($ThisLine =~ /using up to [0-9]* sockets/) or
195      ($ThisLine =~ /built with/)
196      # too many timeouts resolving 'ns-ext.nrt1.isc.org/AAAA' (in '.'?): disabling EDNS: 3 Time(s)
197   ) {
198      # Don't care about these...
199   } elsif (
200      ($ThisLine =~ /starting\..*named/) or
201      ($ThisLine =~ /starting BIND/) or
202      ($ThisLine =~ /named startup succeeded/)
203   ) {
204      $StartNamed++;
205   } elsif ( $ThisLine =~ /(reloading nameserver|named reload succeeded)/ ) {
206      $ReloadNamed++;
207   } elsif (
208      ($ThisLine =~ /shutting down/) or
209      ($ThisLine =~ /named shutting down/ ) or
210      ($ThisLine =~ /named shutdown succeeded/ )
211   ) {
212      $ShutdownNamed++;
213   } elsif ( ($Host, $Zone) = ( $ThisLine =~ /client ([^\#]+)#[^\:]+: zone transfer '(.+)' denied/ ) ) {
214      $DeniedZoneTransfers{$Host}{$Zone}++;
215   } elsif ( ($Zone) = ( $ThisLine =~ /cache zone \"(.*)\" loaded/ ) ) {
216      $ZoneLoaded{"cache $Zone"}++;
217   } elsif ( ($Zone) = ( $ThisLine =~ /cache zone \"(.*)\" .* loaded/ ) ) {
218      $ZoneLoaded{"cache $Zone"}++;
219   } elsif ( ($Zone) = ( $ThisLine =~ /primary zone \"(.+)\" loaded/ ) ) {
220      $ZoneLoaded{$Zone}++;
221   } elsif ( ($Zone) = ( $ThisLine =~ /master zone \"(.+)\" .* loaded/ ) ) {
222      $ZoneLoaded{$Zone}++;
223   } elsif ( ($Zone) = ( $ThisLine =~ /secondary zone \"(.+)\" loaded/ ) ) {
224      $ZoneLoaded{"secondary $Zone"}++;
225   } elsif ( ($Zone) = ( $ThisLine =~ /slave zone \"(.+)\" .* loaded/ ) ) {
226      $ZoneLoaded{"secondary $Zone"}++;
227   } elsif ( ($Zone) = ( $ThisLine =~ /zone (.+)\: loaded serial/ ) ) {
228      $ZoneLoaded{$Zone}++;
229   } elsif ( (undef,$Addr,undef,$Server) = ( $ThisLine =~ /ame server (on|resolving) '(.+)' \(in .+\):\s+(\[.+\]\.\d+)?\s*'?(.+)'?:?/ ) ) {
230      $LameServer{"$Addr ($Server)"}++;
231   } elsif ( ($Zone) = ( $ThisLine =~ /Zone \"(.+)\" was removed/ ) ) {
232      $ZoneRemoved{$Zone}++;
233   } elsif ( ($Zone) = ( $ThisLine =~ /received notify for zone '(.*)'/ ) ) {
234      $ZoneReceivedNotify{$Zone}++;
235   } elsif ( ($Zone) = ( $ThisLine =~ /zone (.*): notify from .* up to date/ ) ) {
236      $ZoneReceivedNotify{$Zone}++;
237   } elsif ( ($Host) = ( $ThisLine =~ /([^ ]+) has CNAME and other data \(invalid\)/ ) ) {
238      push @CNAMEAndOther, $Host;
239   } elsif ( ($File,$Line,$Entry,$Error) = ( $ThisLine =~ /dns_master_load: ([^:]+):(\d+): ([^ ]+): (.+)$/ ) ) {
240      $ZoneFileErrors{$File}{"$Entry: $Error"}++;
241   } elsif ( ($File,$Line,$Entry,$Error) = ( $ThisLine =~ /warning: ([^:]+):(\d+): (.+)$/ ) ) {
242      $ZoneFileErrors{$File}{"file does not end with newline: $Error"}++;
243   } elsif ( ($Way,$Host) = ( $ThisLine =~ /([^ ]+): sendto\(\[([^ ]+)\].+\): Network is unreachable/ ) ) {
244      $FullHost = LookupIP ($Host);
245      $NetworkUnreachable{$Way}{$FullHost}++;
246   } elsif ( ($Zone,$Message) = ( $ThisLine =~ /client [^\#]+#[^\:]+: (?:view \w+: )?updating zone '([^\:]+)': (.*)$/ ) ) {
247      $ZoneUpdates{$Zone}{$Message}++;
248   } elsif ( ($Host,$Zone) = ( $ThisLine =~ /approved AXFR from \[(.+)\]\..+ for \"(.+)\"/ ) ) {
249      $FullHost = LookupIP ($Host);
250      $AXFR{$Zone}{$FullHost}++;
251   } elsif ( ($Client) = ( $ThisLine =~ /warning: client (.*) no more TCP clients/ ) ) {
252      $FullClient = LookupIP ($Client);
253      $DeniedTCPClient{$FullClient}++;
254   } elsif ( ($Client) = ( $ThisLine =~ /client (.*)#\d+: query \(cache\) denied/ ) ) {
255      $FullClient = LookupIP ($Client);
256      $DeniedQuery{$FullClient}++;
257   } elsif ( ($Rhost, $Ldom) = ($ThisLine =~ /client ([\d\.]+)#\d+: update '(.*)' denied/)) {
258      $UpdateDenied{"$Rhost ($Ldom)"}++;
259   } elsif ( ($Zone) = ($ThisLine =~ /zone '([0-9a-zA-Z.-]+)' allows updates by IP address, which is insecure/)) {
260      $InsecUpdate{$Zone}++;
261   } elsif ( ($Zone) = ($ThisLine =~ /zone ([0-9a-zA-Z.\/-]+): journal rollforward failed: journal out of sync with zone/)) {
262      $JournalFail{$Zone}++;
263   } elsif ( ($Channel,$Reason) = ($ThisLine =~ /couldn't add command channel (.+#\d+): (.*)$/)) {
264      $ChannelAddFail{$Channel}{$Reason}++;
265   } elsif ( ($Zone,$Host,$Reason) = ($ThisLine =~ /zone ([^ ]*)\/IN: refresh: failure trying master ([^ ]*)#\d+: (.*)/) ) {
266      $MasterFailure{"$Zone from $Host"}{$Reason}++;
267   } elsif ( ($Zone) = ($ThisLine =~ /zone ([^\/]+)\/.+: refresh: non-authoritative answer from master/)) {
268      $NonAuthoritative{$Zone}++;
269   } elsif ( ($ThisLine =~ /unexpected RCODE \((.*)\) resolving/) ){
270      $UnexpRCODE{$1}++;
271   } elsif ( ($ThisLine =~ /FORMERR resolving '[^ ]+: [0-9.#]+/) ) {
272      chomp($ThisLine);
273      $FormErr{$ThisLine}++;
274   } elsif ( ($ThisLine =~ /found [0-9]* CPU(s)?, using [0-9]* worker thread(s)?/) ) {
275      chomp($ThisLine);
276      $StartLog{$ThisLine}++;
277   } elsif ( (($File,$Line,$Problem) = ($ThisLine =~ /\/etc\/(rndc.key|named.conf):([0-9]+): (unknown option '[^ ]*')/)) or
278             (($File,$Line,$Problem) = ($ThisLine =~ /\/etc\/(rndc.key|named.conf):([0-9]+): ('[^ ]' expected near end of file)/)) or
279             (($File,$Line,$Problem) = ($ThisLine =~ /\/etc\/(named.*.conf):([0-9]+): (.*)/)) or
280             (($File,$Line,$Problem) = ($ThisLine =~ /()()(could not configure root hints from '.*': file not found)/))) {
281       $ConfProb{$File}{"$Line,$Problem"}++;
282   } elsif ( (($ErrorText) = ($ThisLine =~ /^(RUNTIME_CHECK.*)/))or
283             (($ErrorText) = ($ThisLine =~ /^(.* REQUIRE.* failed.*)$/)) or
284             (($ErrorText) = ($ThisLine =~ /(.*: fatal error)/)) ) {
285      $NError{$ErrorText}++;
286   } elsif ( ($From,$Log) = ($ThisLine =~ /invalid command from ([.0-9]*)#[0-9]*: (.*)/) ) {
287      $CCMessages{"$From,$Log"}++;
288   } elsif ( (($Log) = ($ThisLine =~ /(freezing .*zone.*)/)) or
289             (($Log) = ($ThisLine =~ /(thawing .*zone.*)/)) ) {
290      $CCMessages2{$Log}++;
291   } elsif (($CCC) = ($ThisLine =~ /unknown control channel command '(.*)'/)) {
292      $UnknownCCCommands{$CCC}++;
293   } elsif (($CCC) = ($ThisLine =~ /received control channel command '(.*)'/)) {
294      $CCCommands{$CCC}++;
295   } elsif (($Name,$Address) = ($ThisLine =~ /network unreachable resolving '(.*)': (.*)/)) {
296      $NUR{$Name}{$Address}++;
297   } elsif (($Name,$Address) = ($ThisLine =~ /host unreachable resolving '(.*)': (.*)/)) {
298      $HUR{$Name}{$Address}++;
299   } else {
300      # Report any unmatched entries...
301      # remove PID from named messages
302      $ThisLine =~ s/(client [.0-9]+)\S+/$1/;
303      chomp($ThisLine);
304      $OtherList{$ThisLine}++;
305   }
306}
307
308#######################################
309
310if ( ( $Detail >= 5 ) and ($StartNamed) ) {
311   print "Named started: $StartNamed Time(s)\n";
312}
313
314if ( ( $Detail >= 5 ) and ($ReloadNamed) ) {
315   print "Named reloaded: $ReloadNamed Time(s)\n";
316}
317
318if ( ( $Detail >= 5 ) and ($ShutdownNamed) ) {
319   print "Named shutdown: $ShutdownNamed Time(s)\n";
320}
321
322if ( ( $Detail >= 5 ) and (keys %ZoneLoaded) ) {
323   print "\nLoaded Zones:\n";
324   foreach $ThisOne (sort {$a cmp $b} keys %ZoneLoaded) {
325      print "   $ThisOne: $ZoneLoaded{$ThisOne} Time(s)\n";
326   }
327}
328
329if ( ( $Detail >= 5 ) and (keys %ZoneReceivedNotify) ) {
330   print "\nZones receiving notify:\n";
331   foreach $ThisOne (sort {$a cmp $b} keys %ZoneReceivedNotify) {
332      print "   $ThisOne: $ZoneReceivedNotify{$ThisOne} Time(s)\n";
333   }
334}
335
336if ( ($Detail >= 5) and (keys %ChannelAddFail) ) {
337   print "\nCan't add command channel:\n";
338   foreach $Channel (sort {$a cmp $b} keys %ChannelAddFail) {
339      print "   $Channel:\n";
340      foreach $Reason (sort {$a cmp $b} keys %{$ChannelAddFail{$Channel}}) {
341         print "      $Reason: $ChannelAddFail{$Channel}{$Reason} Time(s)\n";
342      }
343   }
344}
345
346if ( ($Detail >= 5) and (keys %MasterFailure) ) {
347   print "\nFailure trying to refresh zone:\n";
348   foreach $Zone (sort {$a cmp $b} keys %MasterFailure) {
349      print "   $Zone:\n";
350      foreach $Reason (sort {$a cmp $b} keys %{$MasterFailure{$Zone}}) {
351         print "      $Reason: $MasterFailure{$Zone}{$Reason}++ Time(s)\n";
352      }
353   }
354}
355
356if ( ( $Detail >= 5 ) and (keys %DeniedZoneTransfers) ) {
357   print "\nDenied Zone Transfers:\n";
358   foreach my $Host (keys %DeniedZoneTransfers) {
359      print "   $Host:\n";
360      foreach my $Zone (keys %{$DeniedZoneTransfers{$Host}}) {
361         print "      $Zone: $DeniedZoneTransfers{$Host}{$Zone} Time(s)\n";
362      }
363      print "\n";
364   }
365}
366
367if ( ( $Detail >= 5 ) and (keys %ZoneRemoved) ) {
368   print "\nRemoved Zones:\n";
369   foreach $ThisOne (sort {$a cmp $b} keys %ZoneRemoved) {
370      print "   $ThisOne: $ZoneRemoved{$ThisOne} Time(s)\n";
371   }
372}
373
374if ( ( $Detail >= 5 ) and (keys %AXFR) ) {
375   print "\nZone Transfers:\n";
376   foreach $ThisOne (keys %AXFR) {
377      print "   Zone: $ThisOne\n";
378      foreach $Temp (keys %{$AXFR{$ThisOne}}) {
379         print "      by $Temp: $AXFR{$ThisOne}{$Temp} Time(s)\n";
380      }
381   }
382}
383
384if ( ( $Detail >= 5 ) and (keys %DeniedTCPClient) ) {
385   print "\nno more TCP clients warning:\n";
386   foreach $ThisOne (keys %DeniedTCPClient) {
387      print "   from $ThisOne: $DeniedTCPClient{$ThisOne} Time(s)\n";
388   }
389}
390
391if ( ( $Detail >= 5 ) and (keys %DeniedQuery) ) {
392   print "\nQueries (cache) that were denied:\n";
393   foreach $ThisOne (keys %DeniedQuery) {
394      print "   from $ThisOne: $DeniedQuery{$ThisOne} Time(s)\n";
395   }
396}
397
398if ( ( $Detail >= 10 ) and (@CNAMEAndOther) ) {
399   print "\nThese hosts have CNAME and other data (invalid):\n";
400   foreach $ThisOne (@CNAMEAndOther) {
401      print "   $ThisOne\n";
402   }
403}
404
405if ( ( $Detail >= 5 ) and (keys %ZoneFileErrors) ) {
406   print "\nSyntax errors in zone files:\n";
407   for $File (keys %ZoneFileErrors) {
408      print "   $File\n";
409      for $Error ( keys %{$ZoneFileErrors{$File}} ) {
410         print "      \"$Error\" " . $ZoneFileErrors{$File}{$Error} . " Time(s)\n";
411      }
412   }
413}
414
415if ( ( $Detail >= 10 ) and (keys %LameServer) ) {
416   print "\nThese addresses had lame server references:\n";
417   foreach $ThisOne (keys %LameServer) {
418      print "   $ThisOne: $LameServer{$ThisOne} Time(s)\n";
419   }
420}
421
422if ( ( $Detail >= 10 ) and (keys %NonAuthoritative) ) {
423   print "\nNon-authoritative answer from master for these zones:\n";
424   foreach $ThisOne (keys %NonAuthoritative) {
425      print "   " . $ThisOne . ": " . $NonAuthoritative{$ThisOne} . " Time(s)\n";
426   }
427}
428
429if ( ( $Detail >= 10 ) and (keys %NetworkUnreachable) ) {
430   print "\nNetwork is unreachable for:\n";
431   foreach $ThisOne (sort {$a cmp $b} keys %NetworkUnreachable) {
432      print "   $ThisOne:\n";
433      foreach $Host (sort {$a cmp $b} keys %{$NetworkUnreachable{$ThisOne}}) {
434         print "      $Host: $NetworkUnreachable{$ThisOne}{$Host} Time(s)\n";
435      }
436   }
437}
438
439if ( ( $Detail >= 10 ) and (keys %NUR) ) {
440   print "\nNetwork unreachable resolving for:\n";
441   foreach $ThisOne (sort {$a cmp $b} keys %NUR) {
442      print "   $ThisOne:\n";
443      foreach $Host (sort {$a cmp $b} keys %{$NUR{$ThisOne}}) {
444         print "      $Host: $NUR{$ThisOne}{$Host} Time(s)\n";
445      }
446   }
447}
448
449if ( ( $Detail >= 10 ) and (keys %HUR) ) {
450   print "\nHost unreachable resolving for:\n";
451   foreach $ThisOne (sort {$a cmp $b} keys %HUR) {
452       print "   $ThisOne:\n";
453       foreach $Host (sort {$a cmp $b} keys %{$HUR{$ThisOne}}) {
454          print "      $Host: $HUR{$ThisOne}{$Host} Time(s)\n";
455       }
456   }
457}
458
459if ( ( $Detail >= 5 ) and (keys %ZoneUpdates) ) {
460   print "\nZone Updates:\n";
461   foreach $ThisOne (sort {$a cmp $b} keys %ZoneUpdates) {
462      print "   $ThisOne:\n";
463      foreach $Message (sort {$a cmp $b} keys %{$ZoneUpdates{$ThisOne}}) {
464         print "      $Message: $ZoneUpdates{$ThisOne}{$Message} Time(s)\n";
465      }
466   }
467}
468
469if ( keys %UpdateDenied ) {
470   print "\nZone update refused:\n";
471   foreach $ThisOne (sort {$a cmp $b} keys %UpdateDenied) {
472      print "   $ThisOne: $UpdateDenied{$ThisOne} Time(s)\n";
473   }
474}
475
476if ( keys %InsecUpdate ) {
477   print "\nInsecure zones (dynamic update allowed by IP address):\n";
478   foreach $ThisOne (sort {$a cmp $b} keys %InsecUpdate) {
479      print "   " . $ThisOne . ": " . $InsecUpdate{$ThisOne} . " Time(s)\n";
480   }
481}
482
483if ( keys %JournalFail ) {
484   print "\nJournall rollforward failed:\n";
485   foreach $ThisOne (sort {$a cmp $b} keys %JournalFail) {
486      print "   " . $ThisOne . ": " . $JournalFail{$ThisOne} . " Time(s)\n";
487   }
488}
489
490if (keys %ConfProb) {
491   print "\n Errors in configuration files\n";
492   foreach $File (sort keys %ConfProb) {
493      if ($File =~ /.+/) {
494        print "   file " . $File . "\n";
495        foreach (keys %{$ConfProb{$File}}) {
496           ($Line,$Problem) = split ",";
497           print "      " . $File . ":" . "$Line" . ": " . $Problem . ": " . $ConfProb{$File}{"$Line,$Problem"} . " Time(s)\n";
498        }
499      }
500      else {
501        foreach (keys %{$ConfProb{$File}}) {
502           ($Line,$Problem) = split ",";
503            print "   " . $Problem . ": " . $ConfProb{$File}{"$Line,$Problem"} . " Time(s)\n";
504        }
505      }
506   }
507}
508
509if (($Detail >= 5) and (keys %UnexpRCODE)) {
510   print "\n Unexpected DNS RCODEs:\n";
511   foreach $ThisOne (keys %UnexpRCODE) {
512      print "   " . $ThisOne . ": " . $UnexpRCODE{$ThisOne} . " Time(s)\n";
513   }
514}
515
516if (($Detail >= 5) and (keys %FormErr)) {
517   print "\n Incorrect response format:\n";
518   foreach $ThisOne (keys %FormErr) {
519      print "   " . $ThisOne . ": " . $FormErr{$ThisOne} . " Time(s)\n";
520   }
521}
522
523if (($Detail >= 10) and (keys %StartLog)) {
524   print "\n Named startup logs:\n";
525   foreach $ThisOne (keys %StartLog) {
526      print "   " . $ThisOne . ": " . $StartLog{$ThisOne} . " Time(s)\n";
527   }
528}
529
530if (keys %NError) {
531   print "\n Errors:\n";
532   foreach $ThisOne (keys %NError) {
533      print "   " . $ThisOne . ": " . $NError{$ThisOne} . " Time(s)\n";
534   }
535}
536
537if ((keys %CCMessages) or (keys %CCMessages2)){
538   print "\n Messages from control channel\n";
539   foreach (keys %CCMessages) {
540      ($From,$Log) = split ",";
541      print "   " . $From . ": " . $Log . ": " . $CCMessages{"$From,$Log"} . " Time(s)\n";
542   }
543   foreach $ThisOne (keys %CCMessages2) {
544      print "   " . $ThisOne . ": " . $CCMessages2{$ThisOne} . " Time(s)\n";
545   }
546}
547
548if ((keys %CCCommands) or (keys %UnknownCCCommands)) {
549   print "\nReceived control channel commands\n";
550   foreach $ThisOne (keys %CCCommands) {
551      print "   " . $ThisOne . ": " . $CCCommands{$ThisOne} . " Time(s)\n";
552   }
553   foreach $ThisOne (keys %UnknownCCCommands) {
554      print "   " . $ThisOne . "(unknown command): " . $CCCommands{$ThisOne} . " Time(s)\n";
555   }               
556}
557
558if (keys %OtherList) {
559   print "\n**Unmatched Entries**\n";
560   foreach $line (sort {$a cmp $b} keys %OtherList) {
561      print "   $line: $OtherList{$line} Time(s)\n";
562   }
563}
564
565exit(0);
566
567# vi: shiftwidth=3 tabstop=3 syntax=perl et
568
Note: See TracBrowser for help on using the repository browser.