Get notified when sites go down.
Go to file
AJ ONeal dc59f44322 spacing 2019-06-08 03:14:12 -06:00
README.md spacing 2019-06-08 03:14:12 -06:00
go.mod initial commit 2019-06-07 20:37:53 -06:00
watchdog.go made useful, nay, usable! 2019-06-08 03:11:42 -06:00

README.md

Watchdog

Webhooks for all the times that something doesn't go right.

Install

git clone https://git.coolaj86.com/coolaj86/watchdog.go.git

Usage

pushd watchdog.go/
go run ./watchdog.go -c dog.json

Sample Config

{
  "watches": [
    {
      "name": "Example Site",
      "url": "https://example.com/",
      "webhooks": ["twilio"],
      "keywords": "My Site",
      "recover_script": "systemctl restart example-site"
    }
  ],
  "webhooks": [
    {
      "name": "twilio",
      "url": "https://api.twilio.com/2010-04-01/Accounts/AC00000000000000000000000000000000/Messages.json",
      "auth": {
        "user": "AC00000000000000000000000000000000",
        "pass": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      },
      "form": {
        "To": "+1 801 555 1234",
        "From": "+1 800 555 4321",
        "Body": "[{{ .Name }}] The system is down. The system is down."
      }
    }
  ]
}