--- munin-1.1.7.orig/node/node.d/ping_.in	Tue Nov 16 21:10:19 2004
+++ munin-1.1.7/node/node.d/ping_.in	Sun Nov 28 11:30:36 2004
@@ -22,9 +22,14 @@
 # Parameters:
 #
 # 	ping_args      - Arguments to ping (default "-c 2")
+#	ping_args2     - Arguments after the host name (required for Solaris)
 # 	ping           - Ping program to use
 # 	host           - Host to ping
 #
+# Arguments for Solaris:
+#	ping_args      -s
+#	ping_args2     56 2
+#
 #%# family=manual
 
 file_host=`basename $0 | sed 's/^ping_//g'`
@@ -45,4 +50,4 @@
 fi
 
 
-${ping:-ping} ${ping_args:--c 2} ${host:-${file_host:-www.google.com}} | awk '/min\/avg\/max/ { split ($0, arr, "/"); print "ping.value " (arr[4]/1000)} /% packet loss/ {split ($7, arr2, "%"); print "packetloss.value " arr2[1]}'
+${ping:-ping} ${ping_args:--c 2} ${host:-${file_host:-www.google.com}} ${ping_args2} | perl -n -e 'print "ping.value ", $1 / 1000, "\n" if m@min/avg/max.*\s\d+(?:\.\d+)?/(\d+(?:\.\d+)?)/\d+(?:\.\d+)?@; print "packetloss.value $1\n" if /(\d+)% packet loss/;'
