Tim Sogard

Excitable, nerd, tinkerer

Graphite loaders for everyone!

Two more tools for loading data into Graphite:

Firstly, following up with the Pinoccio Gardenbot project, I was using a quick and shoddy Python script to push a single Pinoccio Scout’s data into Graphite.

Since I wasn’t able to find an existing tool to push scout data to Graphite I put together a small nodejs script that slurps all (numeric) scout data from the Pinoccio streaming API and forwards it to Graphite. I also used this as a chance to get comfortable with Node.js, and this represents my first published Node.js work.

Pinoccio2Graphite on Github

Secondly, another bountiful stream of data that I’ve been collecting recently is that of Docker container metrics. Again I took the oppurtunity to write the tool in the language of the resource I was supporting, which for the case of Docker means Go. Go is an incredibly fun language to work with once some of the core concepts crystallize. I look forward to using Go and some of the exceptional Go-built tools (etcd, nsq, more Docker!) for systems work of the future.

Docker2Graphite (I have SND: sysadmin naming disease) is a little less polished than the Pinocchio tool. Memory and CPU accounting metrics are collected, however blkio data is not yet available. Hopefully when all metrics are collected I’ll have a decent library for polling all types of sysfs metrics. This tool also represents my first public Go tool, and all comments and advice are appreciated.

Both tools run as foreground processes┬╣, be sure to use a terminal muxer (screen, tmux) or a flexible init (Upstart, Supervisor) to keep the processes running long term.

┬╣: Go’s flexible and (memory)cheap goroutines actually make daemonization extremely difficult