add linkback

This commit is contained in:
AJ ONeal 2019-06-09 02:12:05 -06:00
parent ca9a662d4f
commit c91afbff8f
1 changed files with 47 additions and 47 deletions

View File

@ -1,4 +1,4 @@
# Watchdog # [Watchdog](https://git.rootprojects.org/root/watchdog.go)
> Get notified when sites go down. > Get notified when sites go down.
@ -179,52 +179,52 @@ The examples below are shown with Twilio and Mailgun, as taken from their `curl`
```json ```json
{ {
"watches": [ "watches": [
{ {
"name": "Example Site", "name": "Example Site",
"url": "https://example.com/", "url": "https://example.com/",
"keywords": "My Site", "keywords": "My Site",
"webhooks": ["my_mailgun", "my_twilio"], "webhooks": ["my_mailgun", "my_twilio"],
"recover_script": "systemctl restart example-site" "recover_script": "systemctl restart example-site"
} }
], ],
"webhooks": [ "webhooks": [
{ {
"name": "my_mailgun", "name": "my_mailgun",
"method": "POST", "method": "POST",
"url": "https://api.mailgun.net/v3/my.example.com/messages", "url": "https://api.mailgun.net/v3/my.example.com/messages",
"auth": { "auth": {
"username": "api", "username": "api",
"password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
"headers": { "headers": {
"User-Agent": "Watchdog/1.0", "User-Agent": "Watchdog/1.0"
}, },
"form": { "form": {
"from": "Watchdog <watchdog@my.example.com>", "from": "Watchdog <watchdog@my.example.com>",
"to": "jon.doe@gmail.com", "to": "jon.doe@gmail.com",
"subject": "{{ .Name }} is down.", "subject": "{{ .Name }} is down.",
"text": "The system is down. Check up on {{ .Name }} ASAP." "text": "The system is down. Check up on {{ .Name }} ASAP."
} }
}, },
{ {
"name": "my_twilio", "name": "my_twilio",
"method": "POST", "method": "POST",
"url": "https://api.twilio.com/2010-04-01/Accounts/AC00000000000000000000000000000000/Messages.json", "url": "https://api.twilio.com/2010-04-01/Accounts/AC00000000000000000000000000000000/Messages.json",
"auth": { "auth": {
"username": "AC00000000000000000000000000000000", "username": "AC00000000000000000000000000000000",
"password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}, },
"headers": { "headers": {
"User-Agent": "Watchdog/1.0", "User-Agent": "Watchdog/1.0"
}, },
"form": { "form": {
"To": "+1 801 555 1234", "To": "+1 801 555 1234",
"From": "+1 800 555 4321", "From": "+1 800 555 4321",
"Body": "[{{ .Name }}] The system is down. The system is down." "Body": "[{{ .Name }}] The system is down. The system is down."
} }
} }
] ]
} }
``` ```