We are trying to develop a set of standard services that would be applied to all websites and someone suggested using check_dns. So we rolled this out to our websites and about 10 of them failed to resolve. Looking into it I discovered that the reverse lookup did not work for this subset of websites. Before they add the reverse lookup to dns they are asking what the benefit of doing this check is. If it alerts critical what is it potentially telling us.
Thanks for you help.
Greg
DNS Question
Re: DNS Question
Here is a very good explanation:
http://support.simpledns.com/kb/a45/wha ... ed-it.aspx
Also here as well:
http://www.dnsstuff.com/reverse-dns-faq
Very handy for checking mail server lookups.
http://support.simpledns.com/kb/a45/wha ... ed-it.aspx
Also here as well:
http://www.dnsstuff.com/reverse-dns-faq
Very handy for checking mail server lookups.
Re: DNS Question
check_dns provides the benefit of proving increased server, services, and application availability as a result of the regular checks Nagios does against the DNS servers.
More importantly check_dns will enable you to quickly detect network outages and protocol failures as well as DNS hijacking and spoofing.
Perhaps check_http may be a better check to use against these sites you've mentioned?
http://nagios-plugins.org/doc/man/check_http.html
Do you just want to confirm these sites are reachable, or are you looking to check page content, etc? If the latter, then XI has 'website monitoring wizard' you can use:
https://www.youtube.com/watch?v=VL_vCCmZd3g
More importantly check_dns will enable you to quickly detect network outages and protocol failures as well as DNS hijacking and spoofing.
Perhaps check_http may be a better check to use against these sites you've mentioned?
http://nagios-plugins.org/doc/man/check_http.html
Do you just want to confirm these sites are reachable, or are you looking to check page content, etc? If the latter, then XI has 'website monitoring wizard' you can use:
https://www.youtube.com/watch?v=VL_vCCmZd3g
Be sure to check out the Knowledgebase for helpful articles and solutions!
Re: DNS Question
I created new commands from check_dns yesterday to use the hostname and address from the host's config since check_dns didn't work as expected. It may be me not testing check_dns enough... Since $HOSTNAME$ on my system is the short name, I set things to allow $ARG1$ to be able to hold the domain part. $ARG1$ needs the trailing dot if used, per check_dns.
This way, if the IP (forward), or hostname (reverse) doesn't match what's defined in Nagios, there's an alert.
Feel free to laugh at me or suggest a better solution...
This way, if the IP (forward), or hostname (reverse) doesn't match what's defined in Nagios, there's an alert.
Code: Select all
define command {
command_name check_dns_forward
command_line $USER1$/check_dns -H $HOSTNAME$ -a $HOSTADDRESS$ $ARG1$
}
define command {
command_name check_dns_reverse
command_line $USER1$/check_dns -H $HOSTADDRESS$ -a $HOSTNAME$.$ARG1$ $ARG2$
}
Re: DNS Question
gormank, that's about the only way you can do it without changing the hostname/address to match.
Re: DNS Question
I'm not sure what you mean by "that" unless you agree with my tweak of the original. Hostnames and IPs match in Nagios and DNS or there's an alert, which is as intended.
Note that $ARG1$ can't contain info internal the host in Nagios so I'd have to make unique checks for each host. Yuck.
Note that $ARG1$ can't contain info internal the host in Nagios so I'd have to make unique checks for each host. Yuck.
Code: Select all
define command {
command_name check_dns
command_line $USER1$/check_dns -H $HOSTNAME$ $ARG1$
}
Re: DNS Question
I was agreeing with what you did.
What you could do is use a custom macro and put them on the hosts (the services will inherit them) and then use that instead of your $ARG1$:
https://assets.nagios.com/downloads/nag ... tvars.html
I'm trying to see if there's another way to do it, maybe using the search domain settings of the resolv.conf
What you could do is use a custom macro and put them on the hosts (the services will inherit them) and then use that instead of your $ARG1$:
https://assets.nagios.com/downloads/nag ... tvars.html
I'm trying to see if there's another way to do it, maybe using the search domain settings of the resolv.conf
Re: DNS Question
Glad someone agrees w/ me. ;)
Its much cleaner to just define the commands once on the Nagios servers so I don't have to touch hundreds of boxes. Many hosts are 3par, Brocade, ILO, etc. so no NRPE.
Its much cleaner to just define the commands once on the Nagios servers so I don't have to touch hundreds of boxes. Many hosts are 3par, Brocade, ILO, etc. so no NRPE.