You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
348 B

#!/bin/sh
##
## stats -- mininum StatsD metric sending client
##
if [ $# -lt 3 ] || [ $# -gt 5 ]; then
echo "USAGE: stats <metric> <value> <type> [<host> [<port>]]" 1>&2
exit 1
fi
metric="$1"
value="$2"
type="$3"
host="${4-127.0.0.1}"
port="${5-8125}"
echo "$metric:$value|$type" |\
@l_prefix@/bin/socat - "udp-sendto:$host:$port"