Check_Dig

I am using Nagios 3 plugin ver 1.4.11 on a Debian Etch System

I am trying to add check_dig to do a lookup on our many DNS systems. I added the check_dig to two machines, one is a valid DNS server and the other is a logging server with NO DNS service on it.

The problem I am having is that both systems show the check_dig service check threw the web browser, but the service is green on both of them. It should be green, “ok” on just the valid DNS server.

# 'check_dig' command definition
define command{
        command_name    check_dig
        command_line    /usr/local/nagios/libexec/check_dig -h $HOSTADDRESS$ -l $ARG1$ -w $ARG2$ -c $ARG3$ -v
        }
define service{
        use                         local-service
        host_name                   ns1,logsalot
        service_description         check_dig
        contact_groups              networkadmins
        check_command               check_dig!desert.com!1!2
        }
 In the status(threw the browser) all i get is:

check_dig v1590 (nagios-plugins 1.4.11)

and if I click on the service I get:

Status Information: check_dig v1590 (nagios-plugins 1.4.11)
Copyright (c) 2000 Karl DeBisschop <[email protected]>
Copyright (c) 2002-2006 Nagios Plugin Development Team
<[email protected]>

This plugin test the DNS service on the specified host using dig

Usage:check_dig -H host -l lookup -p <server port>] -T <query type>] -w <warning interval>] -c <critical interval>] -t <timeout>] -a <expected answer address>] -v]

Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-H, --hostname=ADDRESS
Host name, IP Address, or unix socket (must be an absolute path)
-p, --port=INTEGER
Port number (default: 53)
-l, --lookup=STRING
machine name to lookup
-T, --record_type=STRING
record type to lookup (default: A)
-a, --expected_address=STRING
an address expected to be in the answer section.if not set, uses whatever was in -l
-w, --warning=DOUBLE
Response time to result in warning status (seconds)
-c, --critical=DOUBLE
Response time to result in critical status (seconds)
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
-v, --verbose
Show details for command-line debugging (Nagios may truncate output)

Send email to [email protected] if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to [email protected]

Here is a mannual check_dig, my command entry,

Myhostname:/usr/local/nagios/libexec# ./check_dig -H 9.33.151.31 -l desert.com -w 1 -c 2 -v
/usr/bin/dig @9.33.151.31 -p 53 desert.com -t A
Looking for: 'desert.com'
;; ANSWER SECTION:
desert.com. 86400  IN      A       9.33.151.27
DNS OK - 0.013 seconds response time (desert.com. 86400 IN A 9.33.151.27)|time=0.013420s;1.000000;2.000000;0.000000

I have tried a veriety of configurations and no luck, I feel like I am missing something simple.

Thanks in advance!

Oh man, I found the problem:

I had:
command_line /usr/local/nagios/libexec/check_dig -h $HOSTADDRESS$

it sould be -H not -h

ahhhhhh…sorry guys!!