Critical - DNS IP mismatch

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Critical - DNS IP mismatch

Post 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.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Critical - DNS IP mismatch

Post by bosecorp »

Adding the screenshot
You do not have the required permissions to view the files attached to this post.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Critical - DNS IP mismatch

Post by bosecorp »

Adding one more screenshot which shows the service settings
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Critical - DNS IP mismatch

Post 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.
Former Nagios Employee
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Critical - DNS IP mismatch

Post by bosecorp »

Shall i edit the $arg1 to -A instead of -a ?

Kindly assist on the correction which needs to be made.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Critical - DNS IP mismatch

Post 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?
Former Nagios Employee
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Critical - DNS IP mismatch

Post by bosecorp »

how do i change the $HOSTADDRESS$ to DNS name ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Critical - DNS IP mismatch

Post by rkennedy »

You'll need to create a new command in the Core Config Manager, and then assign it to that service.
Former Nagios Employee
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Critical - DNS IP mismatch

Post 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 ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Critical - DNS IP mismatch

Post 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
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee
Locked