Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
Nagios plugin to check the dns resolution of hostnames. As opposed to the official nagios plugin check_dns, this plugin allows to specify types of dns resource records, like SRV, MX, TXT.
Current Version
0.2
Last Release Date
2011-12-21
Owner
natxo asenjo
Download URL
https://github.com/natxo/nagios_plugins/blob/master/check_dnsext
License
Other
Compatible With
NAME check_dnsext - nagios plugin to check dns queries
DESCRIPTION Nagios plugin to check the dns resolution of hostnames. As opposed to the official nagios plugin check_dns, this plugin allows to specify types of dns resource records, like SRV, MX, TXT.
VERSION This documentation refers to <check_dnsext> version 0.0.2
USAGE check_dnsext -H hostname -a expected_addres [-t type -s server -v]
REQUIRED ARGUMENTS -H | --host
hostname (simple or fully qualified) or ip address that we want to check. This can also be a domain name (TLD) if checking a SOA, NS, MX resource record.
-a | --expected-address
Expected outcome of the dns query. If we expect a multi valued outcome, then use a comma to separate them. For example:
--expected-address=host.domain.tld,host2.domain.tld,host3.domain.tld,..
OPTIONS -H | --host
-s | --server
dns server we want to use. If not specified, the default dns resolver of the system will be used.
-t | --type
type of dns resource record we want to query. If not specified, this defaults to an A record.
-v | --verbose
extra debugging info. Valid values are 0 (standard, no need to set it explicitely) or 1.
-h | -? | --help
this text
CONFIGURATION AND ENVIRONMENT To use it in Nagios copy this file to your plugins folder (usually in /usr/local/nagios/libexec/ ). Make it executable for the nagios user.
DEPENDENCIES This plugin requires the Net::DNS and the Array::Compare Perl modules. If you use a Redhat based linux distribution, you can install Net::DNS so:
# yum install perl-Net-DNS
The Array::Compare module is unfortunately not packaged in any of the usual yum repositories but building a spec file and creating a rpm package is for this one very straight forward. Dave Cross wrote a nice presentation showing how to achieve this: Perl in RPM-Land. You can read it in http://www.slideshare.net/davorg/perl-in-rpmland-presentation
If you use a debian based linux distribution, the modules are called libnet-dns-perl and libarray-compare-perl:
# apt-get install libnet-dns-perl # apt-get install libarray-compare-perl
If you use another system, you should probably have to use the cpan shell to install them. You could use perlbrew or cpanminus as well.
AUTHOR Natxo Asenjo ([email protected]_removethis_)
LICENCE AND COPYRIGHT This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perldoc perlartistic.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
It works very well but I did a small modification to sort the output and convert the results to lowercase to make it safer for some DNS admins that like to put in uppercase records: diff: 94,95d93
I am afraid the diff is missing in your reply. If you care to send it to me (check the plugin help and remove the obvious bits) I will apply your patch. Thanks!
You must be logged in to submit a review.
To:
From: