Skip to main content

Connection monitoring

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

  • 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

Metadata

Release files for ph4-connmon 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ph4-connmon 0.0.6
File Size Uploaded
ph4-connmon-0.0.6.tar.gz 8.4 kB Details

Release files / ph4-connmon-0.0.6.tar.gz

Download URL ph4-connmon-0.0.6.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
51b57b9b63149f1ea2dae7d61d85701e3ca18b1bd76a359cc8d93f174adf2bdd
BLAKE2b-256 checksum
How to use checksums
0875d3c97a84e59f24955eab47e1276356838b9c1c8b74f6548787fb2057e1ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.0.6 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page