DNS

check_dns_host

Description:

Check A/PTR records for a host. Support for checking returnval vs. an array for matching valid response(s), threshhold for number of returned responses, and timeout values.

Current Version

Last Release Date

June 22, 2009

Compatible With


Project Files
Project Notes
Perl, uses (requires): Net::DNS Getopt::Long Array::Compare Pod::Usage Time::HiRes / Example service definition: define service{ use generic-service hostgroup_name deathstar* servicegroups dns_alerts service_description DNS_forward check_command check_dns_host_forward_match!1 notification_options c } define service{ use generic-service hostgroup_name deathstar* servicegroups dns_alerts service_description DNS_reverse check_command check_dns_host_reverse_match!1 notification_options c } / Example command definition: define command{ command_name check_dns_host_forward_match command_line $USER1$/check_dns_host.pl -H $HOSTALIAS$ -q FORWARD -w 50 -c 500 -m $HOSTADDRESS$ -r $ARG1$ } define command{ command_name check_dns_host_reverse_match command_line $USER1$/check_dns_host.pl -H $HOSTADDRESS$ -q REVERSE -w 50 -c 500 -m $HOSTALIAS$ -r $ARG1$ }
Reviews (3) Add a Review
Reverse not working
by Tozz, May 31, 2014
Checking for reverse doesn't work, eg.:

#check_dns_host.pl -H 8.8.8.8.in-addr.arpa -Q REVERSE -W 1000 -C 1000

DNS OK! QUERYRETURNCODE=(NOERROR => 8.8.8.8.in-addr.arpa) ANSWERS=(0) QUERY_RETURNVAL=() ELAPSED=(8 ms) | DurationMS=8

Reverse checks always return ANSWERS=(0).

Forward seems to work fine.
Helpful? Yes  No 
working from terminal NOT from Nagios
by steprog, November 30, 2013
from the commnd line runs without error ONLY if I change the line in the sub query_check like
"if (defined ($match)) {"
But Nagios always report the error "(Service check did not exit properly) "
Any suggestion?
Helpful? Yes  No 
sub query_check
by rmarx, May 31, 2013
On sub query_check, match verification:

if (defined $match)

replaced by:
if (defined @match)
Helpful? Yes  No 
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
3 (4)
Favorites
0
Views
108,706