[Nagiosplug-checkins] CVS: nagiosplug/plugins check_dns.c,1.15,1.16

Karl DeBisschop kdebisschop at users.sourceforge.net
Thu Jul 31 23:04:06 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv4716/plugins

Modified Files:
	check_dns.c 
Log Message:
do not translate the strings that will be compared to utility output - LC_ALL is set to C so those strings should be untranslated regardless of the system settings

Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** check_dns.c	31 Jul 2003 12:06:38 -0000	1.15
--- check_dns.c	1 Aug 2003 06:03:36 -0000	1.16
***************
*** 264,288 ****
  
  	/* the DNS lookup timed out */
! 	if (strstr (input_buffer,	_("Note:  nslookup is deprecated and may be removed from future releases.")) ||
! 	    strstr (input_buffer, _("Consider using the `dig' or `host' programs instead.  Run nslookup with")) ||
! 	    strstr (input_buffer, _("the `-sil[ent]' option to prevent this message from appearing.")))
  		return STATE_OK;
  
  	/* the DNS lookup timed out */
! 	else if (strstr (input_buffer, _("Timed out")))
  		return STATE_WARNING;
  
  	/* DNS server is not running... */
! 	else if (strstr (input_buffer, _("No response from server")))
  		return STATE_CRITICAL;
  
  	/* Host name is valid, but server doesn't have records... */
! 	else if (strstr (input_buffer, _("No records")))
  		return STATE_WARNING;
  
  	/* Host or domain name does not exist */
! 	else if (strstr (input_buffer, _("Non-existent")))
  		return STATE_CRITICAL;
! 	else if (strstr (input_buffer, _("** server can't find")))
  		return STATE_CRITICAL;
  	else if(strstr(input_buffer,"NXDOMAIN")) /* 9.x */
--- 264,288 ----
  
  	/* the DNS lookup timed out */
! 	if (strstr (input_buffer,	"Note:  nslookup is deprecated and may be removed from future releases.") ||
! 	    strstr (input_buffer, "Consider using the `dig' or `host' programs instead.  Run nslookup with") ||
! 	    strstr (input_buffer, "the `-sil[ent]' option to prevent this message from appearing."))
  		return STATE_OK;
  
  	/* the DNS lookup timed out */
! 	else if (strstr (input_buffer, "Timed out"))
  		return STATE_WARNING;
  
  	/* DNS server is not running... */
! 	else if (strstr (input_buffer, "No response from server"))
  		return STATE_CRITICAL;
  
  	/* Host name is valid, but server doesn't have records... */
! 	else if (strstr (input_buffer, "No records"))
  		return STATE_WARNING;
  
  	/* Host or domain name does not exist */
! 	else if (strstr (input_buffer, "Non-existent"))
  		return STATE_CRITICAL;
! 	else if (strstr (input_buffer, "** server can't find"))
  		return STATE_CRITICAL;
  	else if(strstr(input_buffer,"NXDOMAIN")) /* 9.x */
***************
*** 290,310 ****
  
  	/* Connection was refused */
! 	else if (strstr (input_buffer, _("Connection refused")))
  		return STATE_CRITICAL;
  
  	/* Network is unreachable */
! 	else if (strstr (input_buffer, _("Network is unreachable")))
  		return STATE_CRITICAL;
  
  	/* Internal server failure */
! 	else if (strstr (input_buffer, _("Server failure")))
  		return STATE_CRITICAL;
  
  	/* DNS server refused to service request */
! 	else if (strstr (input_buffer, _("Refused")))
  		return STATE_CRITICAL;
  
  	/* Request error */
! 	else if (strstr (input_buffer, _("Format error")))
  		return STATE_WARNING;
  
--- 290,310 ----
  
  	/* Connection was refused */
! 	else if (strstr (input_buffer, "Connection refused"))
  		return STATE_CRITICAL;
  
  	/* Network is unreachable */
! 	else if (strstr (input_buffer, "Network is unreachable"))
  		return STATE_CRITICAL;
  
  	/* Internal server failure */
! 	else if (strstr (input_buffer, "Server failure"))
  		return STATE_CRITICAL;
  
  	/* DNS server refused to service request */
! 	else if (strstr (input_buffer, "Refused"))
  		return STATE_CRITICAL;
  
  	/* Request error */
! 	else if (strstr (input_buffer, "Format error"))
  		return STATE_WARNING;
  





More information about the Commits mailing list