Update and add time format to minitor

This commit is contained in:
IamTheFij 2023-08-11 03:49:55 -07:00
parent b62029be0a
commit 92e42b5605
2 changed files with 2 additions and 4 deletions

View File

@ -52,15 +52,13 @@ monitors:
- 'https://photoprism.thefij.rocks'
alerts:
log:
command: 'echo "{{.MonitorName}}"'
mailgun:
command: >
curl -sS -X POST
-F subject="ALERT! {{.MonitorName}} is Down"
-F from="Minitor <minitor@iamthefij.com>"
-F to=ian@iamthefij.com
-F text=$'{{.MonitorName}} has failed {{.FailureCount}} checks. Alert count: {{.AlertCount}}. Last success was {{.LastSuccess}}.\n\n-Nomad Minitor'
-F text=$'{{.MonitorName}} has failed {{.FailureCount}} checks. Alert count: {{.AlertCount}}. Last success was {{RFC1123Z (InTZ .LastSuccess "America/Los_Angeles")}}.\n\n-Nomad Minitor'
https://api.mailgun.net/v3/mg.iamthefij.com/messages
-u "api:$MAILGUN_API_KEY"

View File

@ -2,7 +2,7 @@ module "minitor" {
source = "./service"
name = "minitor"
image = "iamthefij/minitor-go:1.2"
image = "iamthefij/minitor-go:1.4"
args = ["-metrics", "-config=$${NOMAD_TASK_DIR}/config.yml"]
service_port = 8080
prometheus = true