Page 1 of 2

Critical - DNS IP mismatch

Posted: Mon May 02, 2016 1:36 pm
by bosecorp
We are getting the attached error.

We have verified from Nagios server, the nslookup resolves to correct IP.

# nslookup usmabugfix1
Server: 10.101.20.101
Address: 10.101.20.101#53

Name: usmabugfix1.bose.com
Address: 10.101.20.145

# ./check_dns -H usmabugfix1.bose.com -a 10.101.20.145
DNS OK: 0.046 seconds response time. usmabugfix1.bose.com returns 10.101.20.145|time=0.045970s;;;0.000000

But still i can see the attached error from Nagios.

Let me know if you need any other information.

Re: Critical - DNS IP mismatch

Posted: Mon May 02, 2016 1:39 pm
by bosecorp
Adding the screenshot

Re: Critical - DNS IP mismatch

Posted: Mon May 02, 2016 1:42 pm
by bosecorp
Adding one more screenshot which shows the service settings

Re: Critical - DNS IP mismatch

Posted: Mon May 02, 2016 2:14 pm
by rkennedy
This is because your $HOSTADDRESS$ variable is set to 10.101.29.145 (on the host definition), you'll want to adjust that accordingly. It's doing a PTR lookup rather then a DNS A record for the host.

Re: Critical - DNS IP mismatch

Posted: Mon May 02, 2016 2:25 pm
by bosecorp
Shall i edit the $arg1 to -A instead of -a ?

Kindly assist on the correction which needs to be made.

Re: Critical - DNS IP mismatch

Posted: Mon May 02, 2016 2:45 pm
by rkennedy
Your $HOSTADDRESS$ would have to be set to the DNS name, and not 10.101.29.145.

The alternative, is to create a custom command based on check_dns, which doesn't use the $HOSTADDRESS$ variable, but perhaps just $ARG1$ AND $ARG2$. For that you could do -

check_dns_custom -

Code: Select all

$USER1$/check_dns -H $ARG1$ -a $ARG2$
Then, your $ARG1$ would be usmabugfix1.bose.com and $ARG2$ would be 10.101.20.145

Does that make sense?

Re: Critical - DNS IP mismatch

Posted: Mon May 02, 2016 3:08 pm
by bosecorp
how do i change the $HOSTADDRESS$ to DNS name ?

Re: Critical - DNS IP mismatch

Posted: Mon May 02, 2016 3:15 pm
by rkennedy
You'll need to create a new command in the Core Config Manager, and then assign it to that service.

Re: Critical - DNS IP mismatch

Posted: Mon May 02, 2016 3:24 pm
by bosecorp
Can you please explain me why i get a "DNS OK" when i run the same command from cli

# ./check_dns -H usmabugfix1.bose.com -a 10.101.20.145
DNS OK: 0.046 seconds response time. usmabugfix1.bose.com returns 10.101.20.145|time=0.045970s;;;0.000000

Or are the parameters different ?

Re: Critical - DNS IP mismatch

Posted: Mon May 02, 2016 3:28 pm
by rkennedy
This is because your $HOSTADDRESS$ variable is set to 10.101.29.145 (on the host definition), you'll want to adjust that accordingly.
In the screenshot I've attached, $HOSTADDRESS$ will be 127.0.0.1. Take a look at the host for the service you're checking.
ccm-host.PNG