Created
February 25, 2016 08:08
-
-
Save longdongjohn/5bdbada220b2e4a2bb06 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
(def temp1 0) | |
(def m1_flag "") | |
(def m2_flag "") | |
(def temp3 (atom 0)) | |
(def temp2 0) | |
(defn gt [& children] | |
(fn [e] ( | |
(def c-subj (str (get e :host))) | |
((email-c "xxxxxyyyy@gmail.com") e))) | |
) | |
(streams | |
(by [:host :time] | |
; (where (service #"aggregation-cpu-sum/cpu-user") | |
; (user) | |
;) | |
; (where | |
; (service #"aggregation-cpu-sum/cpu-system") | |
; (system) | |
;) | |
(where (and (= 1 m2_flag) (= 1 m1_flag) (false? (= @temp3 0))) | |
(reset! temp3 (+ temp1 temp2)) | |
(def m2_flag 0) | |
(def m1_flag 0) | |
(if (< @temp3 cpu_threshold) (prn temp3) | |
(gt)) | |
))) | |
; I have included only the required snippet for consideration. All variables and functions are accounted for. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment