]> git.pld-linux.org Git - packages/nagios-plugin-check_rbl.git/blame - verbose-reporting.patch
- add mdns support (parallel DNS lookups instead of forking), performs a lot better
[packages/nagios-plugin-check_rbl.git] / verbose-reporting.patch
CommitLineData
88a69a7e 1--- check_rbl-1.1.0/check_rbl 2010-02-01 18:28:07.075134119 +0200
b62736fd 2+++ check_rbl-1.1.0/check_rbl 2010-02-01 18:28:07.075134119 +0200
88a69a7e
ER
3@@ -144,10 +144,13 @@
4
5 if ( lookup($lookup_ip) ) {
6
24f98270 7+ verbose "LISTED: $lookup_ip\n";
88a69a7e
ER
8 return $lookup_ip;
9
10 }
11
24f98270 12+ verbose "OK: $lookup_ip\n";
88a69a7e
ER
13+
14 return 0;
15
16 }
17@@ -238,6 +241,7 @@
18 $PLUGIN->nagios_exit( UNKNOWN, 'Cannot resolve ' . $OPTIONS->host );
19 }
20
21+verbose "Using " . $OPTIONS->timeout . " as global script timeout\n";
22 alarm $OPTIONS->timeout;
23
24 ################
25@@ -250,13 +254,16 @@
26
27 ################################################################################
28
29-verbose 'Checking ' . $OPTIONS->host . " ($IP)\n";
30+my @servers = @{$OPTIONS->server};
31+my $nservers = scalar @servers;
32+
33+verbose 'Checking ' . $OPTIONS->host . " ($IP) on $nservers server(s)\n";
34
35 my $iter = iterate(
36 { workers => $OPTIONS->workers },
37 \&check_server,
38 sub {
39- while ( my $server = pop @{ $OPTIONS->server } ) {
40+ while ( my $server = pop @servers ) {
41 return $server;
42 }
43 return;
44@@ -272,7 +279,7 @@
b62736fd
ER
45 my $total = scalar @BLACKLISTED;
46
47 my $status =
48- "BLACKLISTED on $total " . ( ( $total == 1 ) ? 'server' : 'servers' );
88a69a7e 49+ $OPTIONS->host. " BLACKLISTED on $total " . ( ( $total == 1 ) ? 'server' : 'servers' ) . " of $nservers";
b62736fd
ER
50
51 if ( $total > 0 ) {
52 $status .= " (@BLACKLISTED)";
This page took 0.066745 seconds and 4 git commands to generate.