Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtlynch/ansible-role-heartbeat
Ansible role for a heartbeat server (for uptime monitoring)
https://github.com/mtlynch/ansible-role-heartbeat
Last synced: 24 days ago
JSON representation
Ansible role for a heartbeat server (for uptime monitoring)
- Host: GitHub
- URL: https://github.com/mtlynch/ansible-role-heartbeat
- Owner: mtlynch
- License: mit
- Created: 2021-06-11T14:55:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-11T20:56:46.000Z (over 3 years ago)
- Last Synced: 2024-02-05T22:04:32.789Z (9 months ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Role: Heartbeat
[![CircleCI](https://circleci.com/gh/mtlynch/ansible-role-heartbeat.svg?style=svg)](https://circleci.com/gh/mtlynch/ansible-role-heartbeat)
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](LICENSE)## Overview
Ansible role for a simple heartbeat server that sends regular heartbeat liveness notifications to a monitoring service such as [Cronhub](https://cronhub.io) or [UptimeRobot](https://uptimerobot.com).
## Role Variables
See [defaults/main.yml](https://github.com/mtlynch/ansible-role-heartbeat/blob/master/defaults/main.yml) for full list:
```yaml
heartbeat_url: google.com # Replace with an external monitoring URL
heartbeat_retries: 3
heartbeat_frequency_minutes: 5
heartbeat_system_user: heartbeat
heartbeat_group: heartbeat
```## Dependencies
None
## Example Playbook
The example below shows how to configure a server that sends heartbeat messages to Cronhub every 15 minutes
### `example.yml`
```yaml
- hosts: heartbeat
roles:
- role: ansible-role-heartbeat
heartbeat_frequency_minutes: 15
# Replace the URL with the one Cronhub generates for your monitor.
heartbeat_url: https://cronhub.io/ping/104ab434-33aa-4146-b1a5-426cf952215a
```### Running Example Playbook
```bash
ansible-galaxy install git+https://github.com/mtlynch/ansible-role-heartbeat.git
ansible-playbook example.yml
```## License
MIT
## Author Information
This role was created in 2021 by [Michael Lynch](http://mtlynch.io).