include the override domains and shuffle
authorheiko
Wed, 07 Jan 2015 15:56:05 +0100
changeset 16 6d401297850b
parent 15 bb7b3ae76cc8
child 17 07827090c4fc
child 18 e21e904c1320
include the override domains and shuffle The list of override domains is considered as part of the domains that need to be checked.
plugins/check_dns-delegation
--- a/plugins/check_dns-delegation	Tue Jan 06 22:40:18 2015 +0100
+++ b/plugins/check_dns-delegation	Wed Jan 07 15:56:05 2015 +0100
@@ -15,7 +15,7 @@
 B<check_dns-delegation> is designed as a Icinga/Nagios plugin to verify that
 all responsible NS know about the delegation.
 
-Each domain has to survive the following tests:
+Each domain has to pass the following tests:
 
 =over
 
@@ -58,6 +58,7 @@
 use Net::DNS;
 use Pod::Usage;
 use if $ENV{DEBUG} => 'Smart::Comments';
+use List::Util qw(shuffle);
 
 sub uniq { my %h; @h{@_} = (); return keys %h; }
 my @extns = qw(8.8.8.8 8.8.4.4);
@@ -238,7 +239,7 @@
     my %override = read_override($opt_override) if defined $opt_override;
 
     my (@OK, %CRITICAL);
-    foreach my $domain (@domains) {
+    foreach my $domain (shuffle @domains, keys %override) {
         print STDERR "$domain " if $opt_progress;
 
         my @ns = eval { ns_ok($domain, $opt_reference, \%override) };