Sfoglia il codice sorgente

new output format reported by Patrick Allen <p.allen@brandblue.co.uk>

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@719 f882894a-f735-0410-b71e-b25c423dba1c
Karl DeBisschop 22 anni fa
parent
commit
74c00bde9e
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      plugins/check_ping.c

+ 2 - 1
plugins/check_ping.c

@@ -419,7 +419,8 @@ run_ping (const char *cmd, const char *addr)
 		if(sscanf(buf,"%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss",&pl)==1 ||
 		if(sscanf(buf,"%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss",&pl)==1 ||
 			 sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% packet loss",&pl)==1	||
 			 sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% packet loss",&pl)==1	||
 			 sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% loss, time",&pl)==1 ||
 			 sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% loss, time",&pl)==1 ||
-			 sscanf(buf,"%*d packets transmitted, %*d received, %d%% loss, time", &pl)==1)
+			 sscanf(buf,"%*d packets transmitted, %*d received, %d%% loss, time", &pl)==1 ||
+		   sscanf(buf,"%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss", &pl) == 1)
 			continue;
 			continue;
 
 
 		/* get the round trip average */
 		/* get the round trip average */