Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Integration of PAgerDuty
  2. (def pdalert
  3.   (where (state "critical")
  4.     (throttle 3 3600
  5.       (rollup 1 3600
  6.             (email "monitoring@mycompa.org")))))
  7. ; TODO Add throttle and rollup here to avoid flooding PD
  8. (streams
  9.         (let [pd (pagerduty "77adbec940214gde5505a1d017925b99")]
  10.           (changed-state
  11.             (where (state "ok") (:resolve pd))
  12.             (where (state "critical") (:trigger pd))))
  13.                 pdalert)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement