On Github andeemarks / riemann-intro-preso
http://aphyr.github.io/riemann/
@andee_marks
Scratch the surface
(defstruct event
:host "web-server-4"
:service "apache"
:state "ok"
:time 1412679529133
:description "/index.html"
:tags ["http" "web"]
:metric 200
:ttl 5)
(defstruct event
:host "localhost" ; static
:service "file-size" ; static
:state "file" ; or "dir"
:time 1412679529133 ; m/s since epoch
:description "index.html"
:tags ["riemann" "Code" "amarks" "Users"] ; reverse order
:metric 7766 ; must be numeric
:ttl 5)
(streams
(where (and (service "file-size")
(not (tagged ".git")))
(fn [e] (prn (:state e)
(:metric e)
(:extension e)
(:tags e)
(:description e)))))
(streams
(where (and (service "file-size")
(state "file")
(> metric 6000))
(with :service "big-file" index)
(else
(with :service "small-file" index))))
(streams
(where (service "small-file")
(percentiles 5 [0.25 0.50 0.75]
(scale (/ 1 1024)
index))
index))
(streams
(where (service "file-size")
(with :metric 1
(rate 5
(adjust [:service str " rate"] index)))))
(def tell-ops (throttle 5 3600 (email "fab@ioof.com.au"))) (streams (where (state "error") tell-ops) (tagged "exception" tell-ops))
@andee_marks