Skip to content

Commit

Permalink
Sane welcome config for packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
aphyr committed Nov 13, 2012
1 parent 3c58eb2 commit 53a3c04
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions pkg/riemann.config
Expand Up @@ -2,26 +2,30 @@

(logging/init :file "riemann.log")

(tcp-server)
(udp-server)
; Listen on the local interface over TCP (5555), UDP (5555), and websockets
; (5556)
(let [host "127.0.0.1"]
(tcp-server :host host)
(udp-server :host host)
(ws-server :host host))

(periodically-expire 10)
; Expire old events from the index every 5 seconds.
(periodically-expire 5)

(let [client (tcp-client)
; Keep events for 5 minutes by default
index (default :ttl 300 (update-index (index)))]
; Keep events in the index for 5 minutes by default.
(let [index (default :ttl 300 (update-index (index)))]

; Inbound events will be passed to these streams:
(streams

; Index all events immediately.
index

; Calculate an overall rate of events.
(with {:metric 1 :host nil :state "ok" :service "events/sec"}
(rate 5 index))

(where (service #"^per")
(percentiles 5 [0 0.5 0.95 0.99 1]
index))

; Log expired events.
(expired
(fn [event] (info "expired" event)))

index
))

0 comments on commit 53a3c04

Please sign in to comment.