Jelajahi Sumber

check_ping: Ignore ping(1)'s exit status

Don't return a WARNING state if the number of lost packets is greater
than zero but below the specified warning threshold.  This happened
because the check_ping plugin used the exit status of the ping(1)
utility.  (#3535140 - Tobias Brox)
Holger Weiss 13 tahun lalu
induk
melakukan
991054fa6e
2 mengubah file dengan 2 tambahan dan 3 penghapusan
  1. 1 0
      THANKS.in
  2. 1 3
      plugins/check_ping.c

+ 1 - 0
THANKS.in

@@ -275,3 +275,4 @@ Marc Remy
 Matej Vela
 Jason Ellison
 Charles-Henri Larose
+Tobias Brox

+ 1 - 3
plugins/check_ping.c

@@ -500,9 +500,7 @@ run_ping (const char *cmd, const char *addr)
 	(void) fclose (child_stderr);
 
 
-	/* close the pipe - WARNING if status is set */
-	if (spclose (child_process))
-		result = max_state (result, STATE_WARNING);
+	spclose (child_process);
 
 	if (warn_text == NULL)
 		warn_text = strdup("");