Update readme and update some test files to be better examples
This commit is contained in:
+27
-23
@@ -19,30 +19,34 @@ monitor "Real Website" {
|
||||
}
|
||||
|
||||
alert "log_down" {
|
||||
command = ["echo", "Minitor failure for {{.MonitorName}}"]
|
||||
}
|
||||
command = ["echo", "Minitor failure for {{.MonitorName}}"]
|
||||
}
|
||||
|
||||
alert "log_up" {
|
||||
command = ["echo", "Minitor recovery for {{.MonitorName}}"]
|
||||
}
|
||||
command = ["echo", "Minitor recovery for {{.MonitorName}}"]
|
||||
}
|
||||
|
||||
alert "email_up" {
|
||||
command = ["sendmail", "me@minitor.mon", "Recovered: {monitor_name}", "We're back!"]
|
||||
}
|
||||
command = ["sendmail", "me@minitor.mon", "Recovered: {monitor_name}", "We're back!"]
|
||||
}
|
||||
|
||||
alert "mailgun_down" {
|
||||
shell_command = <<EOF
|
||||
curl -s -X POST
|
||||
-F subject="Alert! {{.MonitorName}} failed"
|
||||
-F from="Minitor <minitor@minitor.mon>"
|
||||
-F to=me@minitor.mon
|
||||
-F text="Our monitor failed"
|
||||
https://api.mailgun.net/v3/minitor.mon/messages
|
||||
-u "api:${MAILGUN_API_KEY}"
|
||||
EOF
|
||||
}
|
||||
shell_command = <<-EOF
|
||||
curl -s -X POST \
|
||||
-F subject="Alert! {{.MonitorName}} failed" \
|
||||
-F from="Minitor <minitor@minitor.mon>" \
|
||||
-F to=me@minitor.mon \
|
||||
-F text="Our monitor failed" \
|
||||
https://api.mailgun.net/v3/minitor.mon/messages \
|
||||
-u "api:${MAILGUN_API_KEY}"
|
||||
EOF
|
||||
}
|
||||
|
||||
alert "sms_down" {
|
||||
shell_command = <<EOF
|
||||
curl -s -X POST -F "Body=Failure! {{.MonitorName}} has failed"
|
||||
-F "From=${AVAILABLE_NUMBER}" -F "To=${MY_PHONE}"
|
||||
"https://api.twilio.com/2010-04-01/Accounts/${ACCOUNT_SID}/Messages"
|
||||
-u "${ACCOUNT_SID}:${AUTH_TOKEN}"
|
||||
EOF
|
||||
}
|
||||
shell_command = <<-EOF
|
||||
curl -s -X POST -F "Body=Failure! {{.MonitorName}} has failed" \
|
||||
-F "From=${AVAILABLE_NUMBER}" -F "To=${MY_PHONE}" \
|
||||
"https://api.twilio.com/2010-04-01/Accounts/${ACCOUNT_SID}/Messages" \
|
||||
-u "${ACCOUNT_SID}:${AUTH_TOKEN}"
|
||||
EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user