homelab-nomad/services/minitor-config.yml

82 lines
2.1 KiB
YAML
Raw Permalink Normal View History

2022-11-15 17:02:57 +00:00
---
check_interval: 30s
default_alert_down: [log, mailgun]
default_alert_up: [log, mailgun_up]
default_alert_after: 20 # 20 * 30s = 10 min
default_alert_every: 1440 # 12hrs / 30s = 1440 checks
2022-11-15 17:02:57 +00:00
monitors:
- name: Cloudron
command:
- '/app/scripts/curl_ok.sh'
2022-11-15 17:02:57 +00:00
- 'https://my.iamthefij.com'
- name: Grafana (public)
command:
- '/app/scripts/curl_ok.sh'
2022-11-15 17:02:57 +00:00
- 'https://grafana.iamthefij.com'
- name: Grafana (internal)
command:
- '/app/scripts/curl_ok.sh'
2022-11-15 17:02:57 +00:00
- 'https://grafana.thefij.rocks'
- name: Plex
command:
2023-08-11 10:52:51 +00:00
- 'curl'
- '--silent'
- '--show-error'
- '-o'
- '/dev/null'
2023-02-16 03:55:35 +00:00
- 'http://192.168.2.10:32400'
2022-11-15 17:02:57 +00:00
- name: NZBget
command:
- '/app/scripts/curl_ok.sh'
2022-11-15 17:02:57 +00:00
- 'https://nzbget.thefij.rocks'
- name: Sonarr
command:
- '/app/scripts/curl_ok.sh'
2022-11-15 17:02:57 +00:00
- 'https://sonarr.thefij.rocks'
- name: Lidarr
command:
- '/app/scripts/curl_ok.sh'
- 'https://lidarr.thefij.rocks'
- name: Authelia
command:
- '/app/scripts/curl_ok.sh'
- 'https://authelia.thefij.rocks'
2022-11-15 17:02:57 +00:00
- name: Photoprism
command:
- '/app/scripts/curl_ok.sh'
2022-11-15 17:02:57 +00:00
- 'https://photoprism.thefij.rocks'
alerts:
2023-08-11 11:08:00 +00:00
log:
command:
- echo
- "{{.MonitorName}} {{if .IsUp}}has recovered{{else}}check has failed {{.FailureCount}} times{{end}}"
2022-11-15 17:02:57 +00:00
mailgun:
command: >
curl -sS -X POST
-F subject="ALERT! {{.MonitorName}} is Down"
-F from="Minitor <minitor@iamthefij.com>"
-F to=ian@iamthefij.com
2023-08-18 19:14:09 +00:00
-F text=$'{{.MonitorName}} has failed {{.FailureCount}} checks. Alert count: {{.AlertCount}}. Last success was {{RFC1123Z .LastSuccess}}.\n\n-Nomad Minitor'
2022-11-15 17:02:57 +00:00
https://api.mailgun.net/v3/mg.iamthefij.com/messages
-u "api:$MAILGUN_API_KEY"
mailgun_up:
command: >
curl -sS -X POST
-F subject="RECOVERED! {{.MonitorName}} is back Up"
-F from="Minitor <minitor@iamthefij.com>"
-F to=ian@iamthefij.com
-F text=$'{{.MonitorName}} has recovered.\n\n-Nomad Minitor'
https://api.mailgun.net/v3/mg.iamthefij.com/messages
-u "api:$MAILGUN_API_KEY"