Check_dns troubleshooting


#1

Hi,
I am having some problems with the check_dns plugin. I’m trying to check the DNS service on a couple of active directory Windows servers.

Here’s the entry from command.cfg:

‘check_dns’ command definition

define command{
command_name check_dns
command_line $USER1$/check_dns -H www.somesite.com -s $HOSTADDRESS$
}

And the entry from services.cfg:
define service{
use local-service
host_name UTILPRD001
service_description DNS
check_command check_dns!172.19.3.254
}

The error I’m getting is:
DNS CRITICAL - ‘/usr/local/bin/nslookup -sil’ output parsing exited with no address

and nagios.log:
SERVICE ALERT: UTILPRD001;DNS;CRITICAL;HARD;4;DNS CRITICAL - ‘/usr/local/bin/nslookup -sil’ output parsing exited with no address

I checked the paths and nslookup is indeed in /usr/local/bin.

Is there a problem with my syntax?

Thanks,


#2

What happens when you don’t use -s?


#3

Same thing. I don’t think it’s that, because when I run the command by hand:

./check_dns -H www.somesiter.com 172.19.3.254

DNS OK: 0.032 seconds response time www.somesite.com returns 192.168.55.129|time=0.031740s;;;0.000000


#4

I see you ran that as user root. Now compare apples to apples by running it as user nagios, and you will see that user nagios can’t run it, but root can. So… it would be a permission problem. Selinux is enabled?


#5

Hi Jakkedup,
That was it. the nagios user did not have rights to read /etc/resolv.conf. Thanks