mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-26 10:15:14 +00:00
Merge pull request #544 from HitLuca/healthchecks.io
Added healthchecks.io service integration
This commit is contained in:
commit
a779915fea
5 changed files with 30 additions and 3 deletions
|
@ -38,6 +38,7 @@ If you have a spare domain name you can configure applications to be accessible
|
|||
* [Gotify](https://gotify.net/) Self-hosted server for sending push notifications
|
||||
* [Grafana](https://github.com/grafana/grafana) - Dashboarding tool
|
||||
* [Guacamole](https://guacamole.apache.org/) - Web based remote desktop gateway, supports VNC, RDP and SSH
|
||||
* [healthchecks.io](https://healthchecks.io/) - Ensure your NAS is online and get notified otherwise
|
||||
* [Heimdall](https://heimdall.site/) - Home server dashboard
|
||||
* [Home Assistant](https://www.home-assistant.io) - Open source home automation
|
||||
* [InfluxDB](https://github.com/influxdata/influxdb) - Time series database used for stats collection
|
||||
|
|
11
docs/applications/healthchecks.io.md
Normal file
11
docs/applications/healthchecks.io.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Healthchecks.io
|
||||
|
||||
Homepage: [https://healthchecks.io/](https://healthchecks.io/)
|
||||
|
||||
A simple cronjob that uses `curl` to ping a given endpoint on the `healthchecks.io` servers. You can choose how often it should ping the endpoint, and what happens when it doesn't. Email/Slack/Telegram and many more services can be integrated.
|
||||
|
||||
## Usage
|
||||
|
||||
Create your own project on [https://healthchecks.io/](https://healthchecks.io/), and set both the time between pings and the grace time. Set your prefered integration such as email.
|
||||
|
||||
Set `healthchecks_enabled: true` in your `inventories/<your_inventory>/nas.yml` file, and if your time between pings is different than the default `healthchecks_ping_minutes`, change it. Finally, set your ping url in the `healthchecks_url` variable.
|
8
nas.yml
8
nas.yml
|
@ -6,7 +6,6 @@
|
|||
tags: users
|
||||
|
||||
roles:
|
||||
|
||||
###
|
||||
### Requirements
|
||||
###
|
||||
|
@ -25,7 +24,6 @@
|
|||
- docker
|
||||
- skip_ansible_lint
|
||||
|
||||
|
||||
###
|
||||
### Ansible-NAS Roles
|
||||
###
|
||||
|
@ -39,7 +37,6 @@
|
|||
- ansible-nas-docker
|
||||
- ansible-nas
|
||||
|
||||
|
||||
###
|
||||
### Applications
|
||||
###
|
||||
|
@ -148,6 +145,11 @@
|
|||
- gotify
|
||||
when: (gotify_enabled | default(False))
|
||||
|
||||
- role: healthchecks.io
|
||||
tags:
|
||||
- healthchecks.io
|
||||
when: (healthchecks_enabled | default(False))
|
||||
|
||||
- role: heimdall
|
||||
tags:
|
||||
- heimdall
|
||||
|
|
5
roles/healthchecks.io/defaults/main.yml
Normal file
5
roles/healthchecks.io/defaults/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
healthchecks_enabled: false
|
||||
healthchecks_ping_minutes: 15
|
||||
|
||||
healthchecks_url: ""
|
8
roles/healthchecks.io/tasks/main.yml
Normal file
8
roles/healthchecks.io/tasks/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- name: Add healthchecks.io cronjob
|
||||
cron:
|
||||
name: healthchecks.io
|
||||
minute: "*/{{ healthchecks_ping_minutes }}"
|
||||
user: root
|
||||
cron_file: /etc/crontab
|
||||
job: "curl -m 10 --retry 5 {{ healthchecks_url }}"
|
Loading…
Reference in a new issue