Skip to content

Instantly share code, notes, and snippets.

@ksexton
Created March 7, 2014 16:04
Show Gist options
  • Save ksexton/9414278 to your computer and use it in GitHub Desktop.
Save ksexton/9414278 to your computer and use it in GitHub Desktop.
Riemann Config
;;; -*- mode: clojure; -*-
;;; vim: filetype=clojure
(logging/init :file "/var/log/riemann/riemann.log")
(let [host "0.0.0.0"]
(tcp-server :host host)
(udp-server :host host)
(ws-server :host host))
(def graph (graphite {:host "graphite"}))
(def index (default {:state "ok" :ttl 60} (update-index (index))))
(periodically-expire 5 index)
(streams
(tagged "python"
(tagged "duration"
(by [:service]
(fixed-time-window 1 (combine folds/mean index graph)))
(with {:service "overall-mean-duration"}
(fixed-time-window 1
(combine folds/mean index graph))))
(tagged "exception"
(by [:service]
(rate 1 index graph))
(with {:service "overall-exceptions"}
(rate 1 index graph))))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment