-
-
Save yujinqiu/55c8f62cfdd23e4c44e2 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
(defn tc [wndtime numwnds threshold & children] | |
(fixed-event-window wndtime | |
(combine folds/mean | |
(moving-event-window numwnds | |
(combine folds/minimum | |
(where (> metric threshold) | |
;;create a threshold crossing event | |
(with {:host nil :state "threshold crossed" :description (str "service crossed the value of " threshold " over " numwnds " windows of " wndtime " seconds")} | |
(apply sdo children))))))) | |
) | |
(streams | |
(tc 3 3 6.0 | |
(email "[email protected]")) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment