homelab-nomad/services/minitor-config.yml

92 lines
2.3 KiB
YAML
Raw 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: 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: Radarr
command:
- '/app/scripts/curl_ok.sh'
- 'https://radarr.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'
- name: Prometheus
command:
- '/app/scripts/curl_ok.sh'
- 'https://prometheus.thefij.rocks'
- name: Plex
command:
- 'curl'
- '--silent'
- '--show-error'
- '-o'
- '/dev/null'
- 'http://192.168.2.10:32400'
2022-11-15 17:02:57 +00:00
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"