Last active
December 15, 2015 12:19
-
-
Save mblair/5259779 to your computer and use it in GitHub Desktop.
Frontend Riemann config example with upstream Riemann servers
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
; -*- mode: clojure -*- | |
(logging/init :file "frontend.log") | |
(def dispatch | |
(let | |
[ | |
cpu-upstream (tcp-client :port 9002) | |
other-upstream (tcp-client :port 9001) | |
] | |
(where (service "cpu") | |
(forward cpu-upstream) | |
(else (forward other-upstream))) | |
) | |
) | |
(let [host "127.0.0.1"] | |
(tcp-server :host host) | |
(udp-server :host host)) | |
(let | |
[ | |
index (default :ttl 300 (update-index (index))) | |
] | |
(streams | |
dispatch | |
index)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment