[Nagiosplug-devel] check_dns.c.diff

Johannes Herlitz herlitz at rhrk.uni-kl.de
Tue Feb 10 17:29:14 CET 2004


I dont know if if this mailing list is the right place but i couldnt
find any better for this:

I've attached a little patch against the newest (1.4.0alpha1)
check_dns.c which beautifies the output a little bit (the queried
DNS string is displayed).
-------------- next part --------------
--- check_dns.c.orig	Tue Feb 10 21:07:30 2004
+++ check_dns.c	Tue Feb 10 21:07:44 2004
@@ -11,6 +11,7 @@
  * Notes:
  *  - Safe popen added by Karl DeBisschop 9-11-99
  *  - expected-address parameter added by Alex Chaffee - 7 Oct 2002
+ *  - information about queried DNS name added to output by Johannes Herlitz - 2 Feb 2004
  *
  * Command line: (see print_usage)
  *
@@ -212,8 +213,10 @@
 		else
 			multi_address = TRUE;
 
-		printf (_("DNS ok - %.3f seconds response time, address%s %s|%s\n"),
-						elapsed_time, (multi_address==TRUE ? "es are" : " is"), address,
+		printf (_("DNS ok - %.3f seconds response time, address%s of %s %s %s|%s\n"),
+						elapsed_time, (multi_address==TRUE ? "es" : ""),
+						query_address, (multi_address==TRUE ? "are" : "is"),
+						address,
 						perfdata ("time", microsec, "us", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0));
 	}
 	else if (result == STATE_WARNING)


More information about the Devel mailing list