homelab-nomad/services/minitor-config.yml
2023-02-15 19:55:35 -08:00

131 lines
3.3 KiB
YAML

---
check_interval: 30s
monitors:
- name: Cloudron
command:
- 'curl'
- '--silent'
- '--show-error'
- '--fail'
- '-o'
- '/dev/null'
- 'https://my.iamthefij.com'
alert_down: [log, mailgun]
alert_up: [log, mailgun_up]
check_interval: 30s
alert_after: 20 # 20 * 30s = 10 min
alert_every: 1440 # 12hrs / 30s = 1440 checks
- name: Grafana (public)
command:
- 'curl'
- '--silent'
- '--show-error'
- '--fail'
- '-o'
- '/dev/null'
- 'https://grafana.iamthefij.com'
alert_down: [log, mailgun]
alert_up: [log, mailgun_up]
check_interval: 30s
alert_after: 20 # 20 * 30s = 10 min
alert_every: 1440 # 12hrs / 30s = 1440 checks
- name: Grafana (internal)
command:
- 'curl'
- '--silent'
- '--show-error'
- '--fail'
- '-o'
- '/dev/null'
- 'https://grafana.thefij.rocks'
alert_down: [log, mailgun]
alert_up: [log, mailgun_up]
check_interval: 30s
alert_after: 20 # 20 * 30s = 10 min
alert_every: 1440 # 12hrs / 30s = 1440 checks
- name: Plex
command:
- 'curl'
- '--silent'
- '--show-error'
- '-o'
- '/dev/null'
- 'http://192.168.2.10:32400'
alert_down: [log, mailgun]
alert_up: [log, mailgun_up]
check_interval: 30s
alert_after: 20 # 20 * 30s = 10 min
alert_every: 1440 # 12hrs / 30s = 1440 checks
- name: NZBget
command:
- 'curl'
- '--silent'
- '--show-error'
- '--fail'
- '-o'
- '/dev/null'
- 'https://nzbget.thefij.rocks'
alert_down: [log, mailgun]
alert_up: [log, mailgun_up]
check_interval: 30s
alert_after: 20 # 20 * 30s = 10 min
alert_every: 1440 # 12hrs / 30s = 1440 checks
- name: Sonarr
command:
- 'curl'
- '--silent'
- '--show-error'
- '--fail'
- '-o'
- '/dev/null'
- 'https://sonarr.thefij.rocks'
alert_down: [log, mailgun]
alert_up: [log, mailgun_up]
check_interval: 30s
alert_after: 20 # 20 * 30s = 10 min
alert_every: 1440 # 12hrs / 30s = 1440 checks
- name: Photoprism
command:
- 'curl'
- '--silent'
- '--show-error'
- '--fail'
- '-o'
- '/dev/null'
- 'https://photoprism.thefij.rocks'
alert_down: [log, mailgun]
alert_up: [log, mailgun_up]
check_interval: 30s
alert_after: 20 # 20 * 30s = 10 min
alert_every: 1440 # 12hrs / 30s = 1440 checks
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'
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"