forked from yetibot/yetibot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
riemann.config
33 lines (27 loc) · 872 Bytes
/
riemann.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
; 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 (index)]
; Inbound events will be passed to these streams:
(streams
(default :ttl 60
; Index all events immediately.
index
; Log expired events.
(expired
(fn [event] (info "expired" event))))))
(def influx (influxdb {:host "influxdb"
:db "events"
:version :new-stream}))
(streams
(smap
(fn [event]
(assoc event :measurement (:service event)
:influxdb-tags {:state (:state event)}
:influxdb-fields {:value (or (:metric event) 0)}))
influx))