[Nagiosplug-devel] check_dns.c (nagiosplug) small fix

Pasi Tiittanen pasi.tiittanen at tukesoft.com
Mon Dec 20 04:03:14 CET 2004


Hi,

in RH8.0 with bind-utils-9.2.1-9 I get error text "Couldn't find server" 
when I give wrong dns name.
like
# nslookup -sil www.yahoo.com wrong.name.fi
nslookup: Couldn't find server 'wrong.name.fi': Name or service not known

now: in check_dns.c line 240 is
    /* Host or domain name does not exist */
    else if (strstr (input_buffer, "Non-existent") ||
             strstr (input_buffer, "** server can't find") ||
             strstr (input_buffer,"NXDOMAIN"))
        die (STATE_CRITICAL, _("Domain %s was not found by the 
server\n"), query_address);

new:
    /* Host or domain name does not exist */
    else if (strstr (input_buffer, "Non-existent") ||
             strstr (input_buffer, "** server can't find") ||
             strstr (input_buffer, "Couldn't find server") ||
             strstr (input_buffer,"NXDOMAIN"))
        die (STATE_CRITICAL, _("Domain %s was not found by the 
server\n"), query_address);

--
Pasi Tiittanen
pti at iki.fi





More information about the Devel mailing list