Skip to content

Instantly share code, notes, and snippets.

Created Sep 8, 2015
What would you like to do?
(logging/init {:file "riemann.log"})
(def influx (influxdb {:host "localhost"
:port 8086
:series #(str (:host %) "." (:service %))
:version :0.9
:db "grafana"}))
(def influx-peer-prepare-join (rollup 0 3 #(influx (folds/count %))))
(def influx-peer-accept-join (rollup 0 3 #(influx (folds/count %))))
(def influx-peer-notify-join (rollup 0 3 #(influx (folds/count %))))
(let [host ""
index (index)]
(tcp-server {:host host})
(udp-server {:host host})
(ws-server {:host host})
#(info "Received event: " %)
(where (service #".*\.event$")
(where (service "peer.prepare-join.event") influx-peer-prepare-join)
(where (service "peer.accept-join.event") influx-peer-accept-join)
(where (service "peer.notify-join.event") influx-peer-notify-join)
(else influx))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment