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:
```bash
sudo totmannschalter
sudo vim /etc/totmannschalter/config.toml
wget https://raw.githubusercontent.com/atoav/totmannschalter/master/totmannschalter.service
which totmannschalter
vim totmannschalter.service
sudo cp totmannschalter.services /etc/systemd/system/
sudo systemctl enable totmannschalter
sudo systemctl start totmannschalter
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 : )