check_dns configuration problem

Morris, Patrick patrick.morris at hp.com
Wed Aug 6 10:14:31 CEST 2008


If you've hard-coded google.com into your command definition, then that's what you'll get.

If you want to pass an argument, try $ARG1$ instead.

> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Ian Masters
> Sent: Wednesday, August 06, 2008 1:13 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] check_dns configuration problem
>
> Hello
>
> I'm a little confused about the configuration of check_dns.
>
> If I do:
> [nagios at localhost libexec]$ ./check_dns 172.16.11.1 -H google.com
> I think I am querying the DNS service on server 172.16.11.1 for
> google.com . Is that correct?
>
> I get the following output:
> DNS OK: 0.196 seconds response time. google.com returns
> 64.233.167.99,64.233.187.99,72.14.207.99|time=0.196169s;;;0.000000
>
> I would like to define the check_dns command in commands.cfg so that I
> can query any server for any given address but at the moment I can only
> seem to get it to check a fixed address so at the moment my check_dns
> command looks like this:
>
> # 'check_dns' command definition
> define command{
>         command_name    check_dns
>         command_line    $USER1$/check_dns -H google.com
> #       command_line    $USER1$/check_dns
>         }
>
> It seems that if I try to pass a different domain in my services.cfg to
> check_dns like this:
> check_command                   check_dns!yahoo.com
> or like this
> check_command                   check_dns! -H yahoo.com
> it has no effect.
>
> Have I defined my 'check_dns' command definition completely wrongly?
>
> I really want to be able to change the DNS query depending on the host
> that I'm querying.
>
> Would someone be kind enough to give me a hint or two?
>
> Thanks
>
> Ian Masters
>
> -----------------------------------------------------------------------
> --
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> 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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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