homelab-nomad/services/minitor-config.yml

131 lines
3.3 KiB
YAML
Raw Normal View History

2022-11-15 17:02:57 +00:00
---
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://home-nas.thefij: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}}"'
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
-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"