| Crates.io | heartbeat-server |
| lib.rs | heartbeat-server |
| version | 0.1.0 |
| created_at | 2022-02-20 23:59:02.97316+00 |
| updated_at | 2022-02-20 23:59:02.97316+00 |
| description | A simple heartbeat implementation that reports to telegram |
| homepage | |
| repository | https://github.com/Ondolin/heartbeat/tree/master |
| max_upload_size | |
| id | 536023 |
| size | 67,852 |
This is a quite simple server to check if another server is still alive.
What is a heartbeat? Wikipedia
You can register your service and the heartbeat checker will send a telegram message if it does not get heartbeats.
There are two ways to install it:
cargo install --path .heartbeatdocker pull ondolin/heartbeat)docker run \
-e TELEGRAM_TARGET_CHAT=<chat id> \
-e TELEGRAM_BOT_TOKEN=<telegram token> \
-e ROCKET_ADDRESS=0.0.0.0 \
-e POLL_RATE=10 \
-e DEFAULT_TIMEOUT=120 \
-p <your desired port>:8000 \
--name heartbeat \
--rm -d \
ondolin/heartbeat
There are several routes to interact with the heartbeat server.
/online: check if the heartbeat server is online/report/<user>/<service_id>?<timeout>:
user: the user to reportservice_id: the service to report (to make is secure choose a random id)timeout: the timeout in seconds, until the service is considers you offlineFeel free to contribute to this project by creating issues and pull requests. I am thankful for all your work.