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.
Critical - DNS IP mismatch
Re: Critical - DNS IP mismatch
Adding the screenshot
You do not have the required permissions to view the files attached to this post.
Re: Critical - DNS IP mismatch
Adding one more screenshot which shows the service settings
You do not have the required permissions to view the files attached to this post.
Re: Critical - DNS IP mismatch
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
Re: Critical - DNS IP mismatch
Shall i edit the $arg1 to -A instead of -a ?
Kindly assist on the correction which needs to be made.
Kindly assist on the correction which needs to be made.
Re: Critical - DNS IP mismatch
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 -
Then, your $ARG1$ would be usmabugfix1.bose.com and $ARG2$ would be 10.101.20.145
Does that make sense?
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$
Does that make sense?
Former Nagios Employee
Re: Critical - DNS IP mismatch
how do i change the $HOSTADDRESS$ to DNS name ?
Re: Critical - DNS IP mismatch
You'll need to create a new command in the Core Config Manager, and then assign it to that service.
Former Nagios Employee
Re: Critical - DNS IP mismatch
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 ?
# ./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
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.This is because your $HOSTADDRESS$ variable is set to 10.101.29.145 (on the host definition), you'll want to adjust that accordingly.
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee