From caf2371553daafb3f463f48063266b7a0e9e9bcd Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Fri, 24 Mar 2006 16:55:30 +0000 Subject: let the name of the dns server in DNS.pm be configurable -- ark --- lib/Smokeping/probes/DNS.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/Smokeping/probes') 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"); -- cgit v1.2.3-24-g4f1b