Check_DNS recursive

nagios at mm.quex.org nagios at mm.quex.org
Wed Mar 30 05:53:16 CEST 2005


On Tue, Mar 29, 2005 at 08:38:17PM -0600, Jay wrote:
> On Wed, 30 Mar 2005 09:04:30 +0800, nagios at mm.quex.org
> <nagios at mm.quex.org> wrote:
> > On Tue, Mar 29, 2005 at 11:12:31AM -0600, Jay wrote:
> > 
> > > If our external DNS server is set to "recursion no;" it fails on the
> > > DNS check set to "recursion yes" then the dne_check works fine. Is
> > > there an easy work around ?
> > 
> > What hostname/s are you using in your check?  You should use a
> > name that the server is willing to return an answer for when it
> > is configured not to do recursion, i.e. in a zone your DNS
> > server actually hosts.
> > 
> > If the name you're checking is hosted by that server and therefore
> > should be answered regardless of the recursion setting, then it
> > sounds like there's something wrong with the DNS server's setup...
> 
> The check_command in the services.cfg file is:
> check_command check_dns!www.host.com
> is that correct ? 
> >From the command line
>  ./check_dns -H www.host.com -s server.com 
> works fine. 
> I'm missing something?

That depends whether you've substituted the real names for
"www.host.com" and "server.com", or if you are actually running
that exact command line.

If you are running that command verbatim, i.e.

$ check_dns -H www.host.com -s server.com

then what the plugin is doing is finding the address of server.com,
and sending it a DNS query for the address of a host which is named
www.host.com.

Exactly why this is succeeding for you, I'm not sure, as server.com
doesn't seem to be answering DNS queries from me.

The command in your Nagios configuration files should be checking
one of the domains your DNS server hosts. So, if you're hosting
the domain qwerty.com and you generally expect that www.querty.com
ought to point people to your web server, you'd use a check command
like this:

check_command check_dns!www.qwerty.com

This tells Nagios that for this service, the command to run is
called "check_dns" and the first parameter is www.qwerty.com.
The check_dns command would then get expanded by Nagios to something
like:

check_dns -H www.querty.com -s 1.2.3.4

where 1.2.3.4 is the address of the host that the service check is
being run for. This sends the DNS query to your server, which should
then reply with the address of your website.

If you're using check_dns!www.host.com, then you're a sending a DNS
query for "www.host.com" to the server that you're monitoring, and
unless it's set to process queries recursively, it's not going to
be able to find an address for you.

Hope this makes sense.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list