Skip to content

Instantly share code, notes, and snippets.

@the2pizza
Created September 24, 2015 12:28
Show Gist options
  • Select an option

  • Save the2pizza/9675f80b5aa33d34af25 to your computer and use it in GitHub Desktop.

Select an option

Save the2pizza/9675f80b5aa33d34af25 to your computer and use it in GitHub Desktop.
; -*- mode: clojure; -*-
; vim: filetype=clojure
(logging/init {:file "riemann.log"})
; 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}))
; Expire old events from the index every 5 seconds.
(periodically-expire 5)
; Datadog integration
(def ddog (datadog {:api-key "API KEY HERE"}))
(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))))
(where (service #"zookeeper.*") ddog)
(where (service #"riemann.*") ddog)
#(info %)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment