Skip to content

Instantly share code, notes, and snippets.

@longdongjohn
Created February 25, 2016 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save longdongjohn/5bdbada220b2e4a2bb06 to your computer and use it in GitHub Desktop.
Save longdongjohn/5bdbada220b2e4a2bb06 to your computer and use it in GitHub Desktop.
(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