Skip to content

Instantly share code, notes, and snippets.

@faxm0dem
Created May 24, 2017 15:36
Show Gist options
  • Save faxm0dem/530679db4311008c347247df16a95935 to your computer and use it in GitHub Desktop.
Save faxm0dem/530679db4311008c347247df16a95935 to your computer and use it in GitHub Desktop.
riemann collectd watchdog
(streams (default {:state "ok"}
index
(by :host
(where (service "heartbeat")
(changed expired?
(where (expired? event)
(with {:state "critical"}
alert!)
(else alert!))))
(where (and (tagged "collectd") (not (service "heartbeat")) (not (expired? event)))
(with {:service "heartbeat" :ttl heartbeat-timeout}
(throttle 1 (/ heartbeat-timeout 2)
reinject)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment