Sounds like you want to take a (rate) and use (changed :state) to detect transitions.
--
You received this message because you are subscribed to the Google Groups "Riemann Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to riemann-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You're looking for a change in rate, from less than 5/interval to more than 5/interval.
I am not sure how (changed) would come into play, I am not looking for a change, rather, I am looking for the exact same thing to happen 5 times in 1 hour.I felt that batch was really close to what I wanted, but at the end of the time interval if I did not have 5 descriptions matching "deadlocked" then not send an alert, and if I did, only send 1 alert.
--
(let [deadlock-count (count events)] (event {:service "Applications" :metric (+ 1 deadlock-count) :state (if (<= deadlock-count 4) "ok" "critical") :description (format "5 or more database deadlocks have occured in the last hour, see tags for affected apps") :tags (map (fn [e] (str (:service e))) events) :ttl 30}))) (changed-state {:init "ok"} (:trigger pd))))))