check_dns on freebsd

David Bishop tech at gnuconsulting.com
Wed Jul 7 17:14:26 CEST 2004


I just discovered why check_dns was failing for me (this is unrelated to
my other problem).  On FreeBSD, /usr/sbin/nslookup needs a dash in front
of the name of the dns server to use, otherwise it thinks that you are
passing two names to look up  instead of just one.  For instance, by
default check_dns constructs a command-line of /usr/sbin/nslookup
<target_host> <server_to_use>.  It should be /usr/sbin/nslookup
<target_host> -<server_to_use>.  Once I added the dash to the asprintf
line where command_line is constructed, it worked great.  I presume this
needs to be wrapped in some sort of IFDEF FREEBSD, but I left that as an
exercise for the maintainer :-)

D.A.Bishop


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list