Network connection monitoring tool
Project description
Simple tool to monitor the health of SSH tunnels.
Use case
Assume you have several SSH tunnels set up from your home network to a remote server with a public IPv4, so you can easily reach back to your private network from the internet.
This monitoring tool can periodically tests health of the SSH tunnels and notifies you over Telegram or Email (or both) if anything changes, e.g., tunnel is not usable (e.g., in a case of connectivity loss in your home network or tunneled host being down / unresponsive).
Setup
pip-install this package pip install -U ph4-connmon
Configure config.json according to assets/config-example.json
Configure notification channels, either
or Email sender (e.g., Gmail) or both
Run assets/install.sh to install ph4connmon.service systemd service
Run systemctl start ph4connmon.service
Notification examples
Status: nas-ssh @ 127.0.0.1:3022 - ssh over ssh, open: True (0x), app: SSH-2.0-OpenSSH_8.2, 0.12s nas-web @ 127.0.0.1:2001 - https over ssh, open: True (0x), app: True, 0.02s rpi-ssh @ 127.0.0.1:1022 - ssh over ssh, open: True (0x), app: SSH-2.0-OpenSSH_8.2, 0.03s, 2.19 s old
Telegram bot supports also several commands, e.g., /status and /full_status, to which it responds with current state. You can manually request status information and to check that system is responsive.
Note that Email notifier sends only state changes, while Telegram notifier sends also regular state updates when UPS is running on the battery. If email user is empty, email notifier is not use. Likewise, if bot API key is empty, telegram is not used.
Dependencies
This project uses monitoring tool library https://github.com/ph4r05/ph4-monitlib
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ph4-connmon-0.0.6.tar.gz
.
File metadata
- Download URL: ph4-connmon-0.0.6.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51b57b9b63149f1ea2dae7d61d85701e3ca18b1bd76a359cc8d93f174adf2bdd |
|
MD5 | 417ee653d49c0c0900cd053f3f94f37e |
|
BLAKE2b-256 | 0875d3c97a84e59f24955eab47e1276356838b9c1c8b74f6548787fb2057e1ee |