[Nagiosplug-devel] [PATCH] check_dns: added 'expected address' param
Alex Chaffee / Purple Technology
guru at stinky.com
Mon Oct 7 10:38:04 CEST 2002
I patched check_dns.c to take another optional parameter. If you
specify "-a 12.34.56.78" then (assuming everything else worked ok too)
it compares the returned address to the parameter. If they do not
match, it fails with CRITICAL.
Should it be a WARNING instead? I'm not familiar with Nagios
conventions as to what counts as serious enough to be CRITICAL. I'm
thinking, if it matters that the service is running, use the normal
check_dns; if you go out of your way to test the returned address,
then it's important enough to you to count as a CRITICAL. But I could
be wrong.
I used -a and --expected-address as the parameter name.
Here's a template-style command for the new calling style. I'm not
sure what file in the project this should go into. (It seems that
command.cfg needs to be converted into the new template style...)
# check_dns_address!hostname-to-check!expected-ip-address
# example: check_dns_address!myhost.foo.com!123.45.67.89
define command{
command_name check_dns_address
command_line $USER1$/check_dns -s $HOSTADDRESS$ -H $ARG1$ -a $ARG2$
}
A patch file is attached to the patch report at
http://sourceforge.net/tracker/index.php?func=detail&aid=619800&group_id=29880&atid=397599
Forgive my sloppy C -- it's been a while :-)
- A
--
Alex Chaffee mailto:alex at jguru.com
jGuru - Java News and FAQs http://www.jguru.com/alex/
Creator of Gamelan http://www.gamelan.com/
Founder of Purple Technology http://www.purpletech.com/
Curator of Stinky Art Collective http://www.stinky.com/
More information about the Devel
mailing list