Skip to content

Commit

Permalink
✨ added healthchecks.io service integration
Browse files Browse the repository at this point in the history
  • Loading branch information
HitLuca committed Jul 11, 2022
1 parent d0cae2c commit cac6bf5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/applications/healthchecks.io.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions roles/healthchecks.io/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
healthchecks_enabled: false
healthchecks_ping_minutes: 15

healthchecks_url: ""
8 changes: 8 additions & 0 deletions roles/healthchecks.io/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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 }}"

0 comments on commit cac6bf5

Please sign in to comment.