Created
July 15, 2015 00:29
-
-
Save featheredtoast/f5c01bbb5eef7e7d01ee to your computer and use it in GitHub Desktop.
riemann receive consul events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn consul-service-down-detect [] | |
(by [:host :service] | |
(where (tagged "consul") | |
(changed :state {:init "ok"} | |
(stable 300 :state | |
#(info %) | |
(where (not (state "ok")) | |
(tag "alert" #(info %) index) | |
(with :metric 1 (graph))) | |
(where (state "ok") | |
(with :metric 0 | |
(graph)))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment