summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping/probes
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2006-03-24 17:55:30 +0100
committerTobi Oetiker <tobi@oetiker.ch>2006-03-24 17:55:30 +0100
commitcaf2371553daafb3f463f48063266b7a0e9e9bcd (patch)
treee8bd61321ed958eadc500201da530ef63d382b2c /lib/Smokeping/probes
parentdea4aa149f292a456eb1412fbdd83d2016e77aa7 (diff)
downloadsmokeping-caf2371553daafb3f463f48063266b7a0e9e9bcd.tar.gz
smokeping-caf2371553daafb3f463f48063266b7a0e9e9bcd.tar.xz
let the name of the dns server in DNS.pm be configurable
-- ark <yes@ring.wtwf.com>
Diffstat (limited to 'lib/Smokeping/probes')
-rw-r--r--lib/Smokeping/probes/DNS.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Smokeping/probes/DNS.pm b/lib/Smokeping/probes/DNS.pm
index 1cb188f..5c3c0e6 100644
--- a/lib/Smokeping/probes/DNS.pm
+++ b/lib/Smokeping/probes/DNS.pm
@@ -90,6 +90,9 @@ sub targetvars {
lookup => { _doc => "Name of the host to look up in the dns.",
_example => "www.example.org",
},
+ server => { _doc => "Name of the dns server to use.",
+ _example => "ns1.someisp.net",
+ },
});
}
@@ -109,8 +112,9 @@ sub pingone ($){
my $host = $target->{addr};
my $lookuphost = $target->{vars}{lookup};
$lookuphost = $target->{addr} unless defined $lookuphost;
+ my $dnsserver = $target->{vars}{server} || $host;
+ my $query = "$self->{properties}{binary} \@$dnsserver $lookuphost";
- my $query = "$self->{properties}{binary} \@$host $lookuphost";
my @times;
$self->do_debug("query=$query\n");