Crates.io | totmannschalter |
lib.rs | totmannschalter |
version | 0.1.4 |
source | src |
created_at | 2020-09-06 13:16:51.192735 |
updated_at | 2020-09-06 15:09:41.620154 |
description | A service that mails you when urls cannot be reached anymore or return errors |
homepage | https://github.com/atoav/totmannschalter |
repository | https://github.com/atoav/totmannschalter |
max_upload_size | |
id | 285404 |
size | 68,593 |
A simple Rust-based service that monitors multiple http(s) endpoints with different intervals and notifies administrators if the service goes down. Another notification is sent once it is back up again. Totmannschalter is German for dead man's switch – a contraption which is meant to halt operations or send a notice in the absence of a certain signal. In trains it is a switch that needs to be tapped periodically to make sure person operating the train is still awake and conscious.
cargo install totmannschalter
You should now be able to run totmannschalter
directly from the CLI. If you want to run it as a system service (e.g. on system startup) you have to either create something yourself (if you are not on a OS that uses systemd) or install the totmannschalter.service
file present in the repository like this:
# Run as root so the config will be created in the right place
sudo totmannschalter
# Setup the config (your path could be different!)
sudo vim /etc/totmannschalter/config.toml
# Download the service file
wget https://raw.githubusercontent.com/atoav/totmannschalter/master/totmannschalter.service
# Find out where your totmannschalter is installed
which totmannschalter
# Use the output from the which command above and replace the path
# right of ExecStar in the systemd unit file:
vim totmannschalter.service
# Copy the unit file to your services
sudo cp totmannschalter.services /etc/systemd/system/
# Enable the service (so it runs automatically after the next system startup)
sudo systemctl enable totmannschalter
# Start the service (so it starts right away)
sudo systemctl start totmannschalter
# Check what is going on
journalctl -fu totmannschalter
cargo
installedcargo-deb
using cargo install cargo-deb
cargo deb
in the root of the repositorytarget/debian/
sudo dpkg -i totmanschalter<TAB>
sudo totmannschalter
at least once before enabling the service, so a default config file can be created. Alternatively you could also run totmannschalter as a regular user service without root then you would have to create your own user service file and skip the rest of the stepssudo systemctl enable totmannschalter
sudo systemctl start totmannschalter
systemctl status totmannschalter
or journalctl -fu totmannschalter
See the github releases page : )