-
-
Save MichaelDrogalis/4d4c81f7ef81e2069e8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 "0.0.0.0" | |
index (index)] | |
(tcp-server {:host host}) | |
(udp-server {:host host}) | |
(ws-server {:host host}) | |
(streams | |
index | |
#(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