DNS Monitor Boolean
DNS Monitor Boolean
I want to setup a DNS monitor to monitor either/or for multiple IP addresses.
Right now I use check_xi_service_dnsquery!-H somedomain.com -a x.x.x.x -a x.x.x.x but this seems to be an AND.
Right now I use check_xi_service_dnsquery!-H somedomain.com -a x.x.x.x -a x.x.x.x but this seems to be an AND.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: DNS Monitor Boolean
You may need to be using commas here instead of separate "-a" sections, here is the plugin usage:
https://www.nagios-plugins.org/doc/man/check_dns.html
https://www.nagios-plugins.org/doc/man/check_dns.html
Re: DNS Monitor Boolean
It's still flapping. Does the comma mean AND? Is their a way to configure it so that it checks for one IP or the other?
We are using DNS load balancing and it seems to only resolve whatever IP the session hits at a particular point in time.
We are using DNS load balancing and it seems to only resolve whatever IP the session hits at a particular point in time.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: DNS Monitor Boolean
Just want to clarify real quick, are you looking to check against multiple servers, to make sure that they respond with the same IP, or you don't care which server you are checking against and potentially expect differing returned IPs for each server?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: DNS Monitor Boolean
It is checking against multiple IP addresses for the same host.
I am not sure how it is done, but if it is using a DNS query similar to dig, it should return both IP addresses for the A record. For some reason it only returns one IP at a time.
Would like for it to check against both IP addresses, but for some reason it doesn't.
I am not sure how it is done, but if it is using a DNS query similar to dig, it should return both IP addresses for the A record. For some reason it only returns one IP at a time.
Would like for it to check against both IP addresses, but for some reason it doesn't.
Re: DNS Monitor Boolean
Here is the error:
DNS CRITICAL - expected 'x.x.x.253,x.x.x.214' but got 'x.x.x.253'
DNS CRITICAL - expected 'x.x.x.253,x.x.x.214' but got 'x.x.x.253'
Re: DNS Monitor Boolean
Lets try it without the xi wizard wrapping script:
Code: Select all
/usr/local/nagios/libexec/check_dns -H somedomain.com -a x.x.x.x -a x.x.x.x Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: DNS Monitor Boolean
It works, but seems like it isn't returning the second IP. I will continue to monitor it to see if it returns the second one when the DNS traffic manager redirects it.
Not sure what the difference is between using a -a x.x.x.x -a x.x.x.x or -a x.x.x.x,x.x.x.x
Not sure what the difference is between using a -a x.x.x.x -a x.x.x.x or -a x.x.x.x,x.x.x.x
Re: DNS Monitor Boolean
The following is "OR":
And the following is "AND":
I tested this logic from the cli and it is correct. There may be an issue with how the $ARGn$s are configured in XI. What do you have for your $ARGn$ values in the CCM for the check?
Code: Select all
-a x.x.x.x -a x.x.x.xCode: Select all
-a x.x.x.x,x.x.x.xFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.