Shell

How to send metrics using Shell

Contents

Using the netcatarrow-up-right utility

echo "YOUR-API-KEY.foo 1.2" | nc carbon.hostedgraphite.com 2003

Using the netcatarrow-up-right utility

echo "YOUR-API-KEY.foo 1.2" | nc -uw0 carbon.hostedgraphite.com 2003

Using the Ncatarrow-up-right utility

Alternatively, the following example using OpenSSLarrow-up-right should work out of the box in OS X:

Using the Curlarrow-up-right utility

Using the Ncatarrow-up-right utility:

For StatsD, make sure to specify counters (c), gauges (g), or timers (ms).

where data.txt contains multiple metrics and values on a separate line:

Your API key can be found on your account homearrow-up-right page.

Last updated