refacto
This commit is contained in:
parent
4bd0721cba
commit
774f9686af
1 changed files with 31 additions and 46 deletions
|
@ -60,57 +60,42 @@
|
|||
(add-median-stream service-name)
|
||||
(add-count-stream service-name))
|
||||
|
||||
;; This will create a service "supercell prod facebook nb sum"
|
||||
;; That will contain the sum on all host of the service supercell prod facebook nb
|
||||
(add-sum-stream "supercell prod facebook nb")
|
||||
;; This will create all groups for a selected service
|
||||
;; Meaning sum, min, max, mean, median and count
|
||||
; (add-all-grouping-streams "supercellvagrant facebook nb")
|
||||
; this create the service "haarp nb sum",
|
||||
; the sum on all hosts of the 'haarp nb' metrics
|
||||
(add-sum-stream "haarp nb")
|
||||
(add-sum-stream "haarp events")
|
||||
|
||||
(add-sum-stream "supercell prod facebook msg")
|
||||
; helper for supercell
|
||||
(defn add-aggregates-for-supercell [env]
|
||||
(doall
|
||||
(map
|
||||
(fn [source]
|
||||
(add-sum-stream (str "supercell" env " " source " nb") )
|
||||
(add-sum-stream (str "supercell" env " " source " msg"))
|
||||
(add-max-stream (str "supercell" env " " source " latency")))
|
||||
["twitter" "facebook"])))
|
||||
|
||||
; helper for lightning
|
||||
(defn add-aggregates-for-lightning [env]
|
||||
(doall
|
||||
(map (fn [server-kind]
|
||||
(add-sum-stream (str "lightning " env " " server-kind " nb" ))
|
||||
(add-max-stream (str "lightning " env " " server-kind " total"))
|
||||
(add-mean-stream (str "lightning " env " " server-kind " total"))
|
||||
(add-median-stream (str "lightning " env " " server-kind " total")))
|
||||
["public" "admin" "system"])))
|
||||
|
||||
(doall
|
||||
(map (fn [env]
|
||||
(add-aggregates-for-supercell env)
|
||||
(add-aggregates-for-lightning env))
|
||||
["dev" "pp" "prod"]))
|
||||
|
||||
; WARN: should be deprecated post v0.3.0
|
||||
(add-sum-stream "supercell prod nb")
|
||||
(add-sum-stream "supercell prod msg")
|
||||
(add-max-stream "supercell prod latency")
|
||||
(add-sum-stream "haarp nb")
|
||||
(add-sum-stream "haarp events")
|
||||
(add-max-stream "supercell prod facebook latency")
|
||||
|
||||
(add-sum-stream "lightning prod public nb")
|
||||
(add-max-stream "lightning prod public total")
|
||||
(add-mean-stream "lightning prod public total")
|
||||
(add-median-stream "lightning prod public total")
|
||||
(add-sum-stream "lightning prod admin nb")
|
||||
(add-sum-stream "lightning prod system nb")
|
||||
|
||||
; --- DEV
|
||||
|
||||
(add-sum-stream "supercell dev facebook nb")
|
||||
(add-sum-stream "supercell dev facebook msg")
|
||||
(add-sum-stream "supercell dev twitter nb")
|
||||
(add-sum-stream "supercell dev twitter msg")
|
||||
(add-max-stream "supercell dev twitter latency")
|
||||
(add-max-stream "supercell dev facebook latency")
|
||||
(add-sum-stream "lightning dev public nb")
|
||||
(add-max-stream "lightning dev public total")
|
||||
(add-mean-stream "lightning dev public total")
|
||||
(add-median-stream "lightning dev public total")
|
||||
(add-sum-stream "lightning dev admin nb")
|
||||
(add-sum-stream "lightning dev system nb")
|
||||
|
||||
; -- PP
|
||||
(add-sum-stream "supercell pp facebook nb")
|
||||
(add-sum-stream "supercell pp facebook msg")
|
||||
(add-sum-stream "supercell pp nb")
|
||||
(add-sum-stream "supercell pp msg")
|
||||
(add-max-stream "supercell pp latency")
|
||||
(add-max-stream "supercell pp facebook latency")
|
||||
(add-sum-stream "lightning pp public nb")
|
||||
(add-max-stream "lightning pp public total")
|
||||
(add-mean-stream "lightning pp public total")
|
||||
(add-median-stream "lightning pp public total")
|
||||
(add-sum-stream "lightning pp admin nb")
|
||||
(add-sum-stream "lightning pp system nb")
|
||||
; /WARN
|
||||
|
||||
; ------------------------------------------------------------------------------
|
||||
;; -- ALERTING
|
||||
|
|
Loading…
Reference in a new issue