Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_dnsext

Rating
2 votes
Favoured:
1
Current Version
0.2
Last Release Date
2011-12-21
Compatible With
  • Nagios 3.x
Owner
License
Other
Hits
92649
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
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.
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 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

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,..

-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 (nasenjo@asenjo.nl_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.
Reviews (1)
bymzac, April 4, 2012
1 of 1 people found this review helpful
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
Owner's reply

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!