Skip to content

Instantly share code, notes, and snippets.

@jarpy
Created March 11, 2015 23:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jarpy/d8bc2f353f365490f485 to your computer and use it in GitHub Desktop.
Save jarpy/d8bc2f353f365490f485 to your computer and use it in GitHub Desktop.
Send statsd metrics from the shell using only echo and Netcat.
# Counter
echo -n 'some.metric.namespace:1|c' | nc -u -q0 localhost 8125
# Gauge
echo -n 'some.metric.namespace:100|g' | nc -u -q0 localhost 8125
# Timer
echo -n 'some.metric.namespace:342|ms' | nc -u -q0 localhost 8125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment