Created
January 27, 2016 00:18
-
-
Save tmountain/1a8fbfc791e3bc198ef1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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; -*- | |
; vim: filetype=clojure | |
(logging/init {:file "/var/log/riemann/riemann.log"}) | |
; Listen on the local interface over TCP (5555), UDP (5555), and websockets | |
; (5556) | |
(let [host "0.0.0.0"] | |
(tcp-server {:host host}) | |
(udp-server {:host host}) | |
(ws-server {:host host})) | |
; Expire old events from the index every 5 seconds. | |
(periodically-expire 5) | |
(let [index (default :ttl 300 (update-index (index)))] | |
; Inbound events will be passed to these streams: | |
(streams | |
(where (service "tracking") | |
(with {:label "tag"} | |
(rate 1 index))) | |
prn | |
(default :ttl 60 | |
; Index all events immediately. | |
index | |
; Log expired events. | |
(expired | |
(fn [event] (info "expired" event)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment