remove default host from discord notifier

pull/805/head
hunterlong 2020-08-25 15:43:05 -07:00
parent 954e19bd40
commit 13878e5a8f
2 changed files with 24 additions and 19 deletions

8
dev/portainer.json vendored
View File

@ -1,9 +1,14 @@
[
{ {
"type": 1, "type": 1,
"title": "Statping", "title": "Statping",
"description": "Service monitoring with a easy to use status page and mobile app", "restart_policy": "unless-stopped",
"description": "Service monitoring with an easy to use status page and mobile app",
"logo": "https://assets.statping.com/icon.png", "logo": "https://assets.statping.com/icon.png",
"image": "statping/statping:latest", "image": "statping/statping:latest",
"platform": "linux",
"categories": ["monitoring"],
"administrator_only": false,
"ports": [ "ports": [
"8080:8080/tcp" "8080:8080/tcp"
], ],
@ -13,3 +18,4 @@
} }
] ]
} }
]

View File

@ -27,16 +27,15 @@ var Discorder = &discord{&notifications.Notification{
Author: "Hunter Long", Author: "Hunter Long",
AuthorUrl: "https://github.com/hunterlong", AuthorUrl: "https://github.com/hunterlong",
Delay: time.Duration(5 * time.Second), Delay: time.Duration(5 * time.Second),
Host: null.NewNullString("https://discordapp.com/api/webhooks/****/*****"),
Icon: "fab fa-discord", Icon: "fab fa-discord",
SuccessData: null.NewNullString(`{"content": "Your service '{{.Service.Name}}' is currently online!"}`), SuccessData: null.NewNullString(`{"content": "Your service '{{.Service.Name}}' is currently back online and was down for {{.Service.Downtime.Human}}."}`),
FailureData: null.NewNullString(`{"content": "Your service '{{.Service.Name}}' is currently failing! Reason: {{.Failure.Issue}}"}`), FailureData: null.NewNullString(`{"content": "Your service '{{.Service.Name}}' is has been failing for {{.Service.Downtime.Human}}! Reason: {{.Failure.Issue}}"}`),
DataType: "json", DataType: "json",
Limits: 60, Limits: 60,
Form: []notifications.NotificationForm{{ Form: []notifications.NotificationForm{{
Type: "text", Type: "text",
Title: "discord webhooker URL", Title: "discord webhooker URL",
Placeholder: "Insert your Webhook URL here", Placeholder: "https://discordapp.com/api/webhooks/****/*****",
DbField: "host", DbField: "host",
}}}, }}},
} }