Skip to content

Instantly share code, notes, and snippets.

@nurtext nurtext/monit.conf Secret
Last active Mar 8, 2016

What would you like to do?
Slack-Integration für Monit
check system localhost
if memory usage > 75% for 5 cycles then exec /usr/local/bin/monit_slack.rb else if succeeded then exec /usr/local/bin/monit_slack.rb
require "net/https"
require "json"
webhook = ""
channel = ""
username = ""
webhook = URI.parse(webhook)
http =, webhook.port)
http.use_ssl = true
request =, {"Content-Type" => "application/json"})
request.body = {
"channel" => channel,
"username" => username,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.