Hearsay lets your monitoring systems gossip to each other


Hearsay is a library and a couple tools that turn your monitoring systems into sort of, broadcast radio stations for state and metric updates. Hearsay also provides what you need to listen to the broadcasts and automatically inject the monitoring events back into other monitoring systems or databases, or RRD’s or whatever.


The idea is to simplify inter-system communication between monitoring systems. As the list of insanely great monitoring systems grows, I’ve been limited by the configuration complexity of gluing them all together. I want to use the best tool for every job, eg Nagios for poll-based system state, Graphite for visualization, JMX-Trans for the Java guys, etc.. But every system I add forces me to reconfigure EVERYTHING.

That sucks. So I’m attempting to minimize annoying customization by providing a means for every monitoring system to import and export a common data format.


  • get ZeroMQ 3+
  • get the go compiler
  • mkdir -p ~/go/src ~/go/pkg ~/go/bin && export GOPATH=”~/go”
  • cd $GOPATH
  • go get -tags zmq_3_x github.com/alecthomas/gozmq
  • go get github.com/djosephsen/Hearsay
  • go install $GOPATH/src/github.com/djosephsen/Hearsay/spewer/spewer.go
  • go install $GOPATH/src/github.com/djosephsen/Hearsay/listener/listener.go
  • cp $GOPATH/bin/spewer ???
  • cp $GOPATH/bin/listener ???


libhearsay implements a common data model for monitoring systems that is very similar to the Riemann Event Struct. Libhearsay refers to these little state or metric updates as “scraps of hearsay” or just “scraps”.

Spewers job is to take a JSON-encoded scrap from your monitoring system (via STDIN or a TCP socket), Validate it, and use zeromq to push or publish it to any number of remote listeners. To see what a JSON encoded scrap looks like, you can do this:

[dave@fng-tomcat64][dj]--> echo '{"Host":"foo.com","State":0}' | spewer -d
Starting Server
got message: {"Host":"foo.com","State":0}
Sending: {"Host":"foo.com","Service":"","State":0,"Time":"2013-07-27T22:24:27.142152828-05:00","Description":"","Tags":["Spewed-by: fng-tomcat64.lab.dbg.com"],"Metric":-42,"TTL":60,"UID":""}

Passing “-h” to spewer will print usage info.


A listener takes scraps off the wire via zeromq pull or subscribe, validates them, and prints them as JSON on STDOUT. There is also a “Nagios” mode that formats them as passive check results. I’m currently working on special-purpose listeners for a short list of monitoring systems.


Well you and me makes two, as they say. I’d really appreciate your help creating well-integrated spewers and especially listeners for the litany of popular monitoring systems out there. I hereby promise to buy you a beer (or the beverage of your choice (but not some crazy $500/glass rich-man-booze)) at the next conference we both attend if you contribute a listener. My wish-list for listeners is in my original hearsay blog post

… eh?

My post is a little more verbose and might help clarify things for you. Right now this project is just a toy, so if you’re looking for the trappings of a healthy piece of production-grade code, and aren’t quite seeing what you expect maybe check back in a few months (or clone me and help out).