echo "some.valuable.metric 1 `date +%s`" | nc graphite.server.com 2003
What about portability? Netcat isn’t installed on every machine. The search for an alternative method to send metrics lead me to Bash sockets. With a Bash socket, you can send the in this manner:
echo "some.valuable.metric 1 `date +%s`" > /dev/tcp/graphite.server.com/2003
Discovering this gem has inspired me to review the bash manual.