-
-
Save perezd/1420f4e7495e6f4fa171 to your computer and use it in GitHub Desktop.
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
; monitoring uptime is based on whether or not | |
; we've received a state of up for a given property. | |
(defn monitor-uptime-with-pd [service-name] | |
(streams | |
(changed-state | |
(where (and (service service-name) | |
(or (state "up") | |
(state "ok"))) | |
prn | |
(:resolve pd)) | |
(where (and (service service-name) | |
(not (or (state "up") | |
(state "ok")))) | |
prn | |
(:trigger pd))))) | |
(monitor-uptime-with-pd #"frontend\.http\.\d{4}\.status") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment