nw-watchdog daemon vs keep alive scripts
by fraxflax from LinuxQuestions.org on (#6M0SN)
I used to maintain a bunch of network-keep-alive-scripts run periodically by cron to ensure connectivity to/from certain linux systems. Each script was tailor made for one specific connection and it was cumbersome to update the functionality changing several scripts, so I decided to write one general script that could fullfill all my needs.
For portability I kept to posix shell script (can be run by any shell) and used only the most standard linux tools. I decided to make it a daemon instead of having to run it periodically and added options for easy installation (and removal) as a systemd-service.
It turned out pretty well so I documented it and threw it up on githup in case somebody else had the same needs.
Version 1.1.0 will now be released within the next few days and is alread available for testing. So if you have a need to monitor, alert on failures and self-mend network connections, or just are generally interested, take a look at it. It's OpernSource totally free in all aspects.
I would love comments, bug reports, suggestions, etc.
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
nw-watchdog - https://github.com/fraxflax/nw-watchdog
DESCRIPTION
nw-watchdog is a higly configurable network watchdog written in POSIX shell script for use in Linux, depending only on Linux most standard tools that are normally installed by default in all distributions (also see the DEPENDENCIES section).
It monitors the network connectivity to a specified TARGET and/or the next hop towards that TARGET, alerting upon lost connectivity explaining what is wrong. It can reset the source interface and will detect topology changes and, if allowed, reconfigure itself accordingly. It's intended to run as a daemon and has an option to install itself as a systemd service. If you want to monitor the connectivity to several TARGETs, you can run several instances of nw-watchdog using different --pidfile option arguments.
nw-watchdog is free software written by Fredrik Ax <frax@axnet.nu>.
Feel free to modify and/or (re)distribute it in any way you like.
... it's always nice to be mentioned though ;-)
nw-watchdog comes with ABSOLUTELY NO WARRANTY.
For portability I kept to posix shell script (can be run by any shell) and used only the most standard linux tools. I decided to make it a daemon instead of having to run it periodically and added options for easy installation (and removal) as a systemd-service.
It turned out pretty well so I documented it and threw it up on githup in case somebody else had the same needs.
Version 1.1.0 will now be released within the next few days and is alread available for testing. So if you have a need to monitor, alert on failures and self-mend network connections, or just are generally interested, take a look at it. It's OpernSource totally free in all aspects.
I would love comments, bug reports, suggestions, etc.
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
nw-watchdog - https://github.com/fraxflax/nw-watchdog
DESCRIPTION
nw-watchdog is a higly configurable network watchdog written in POSIX shell script for use in Linux, depending only on Linux most standard tools that are normally installed by default in all distributions (also see the DEPENDENCIES section).
It monitors the network connectivity to a specified TARGET and/or the next hop towards that TARGET, alerting upon lost connectivity explaining what is wrong. It can reset the source interface and will detect topology changes and, if allowed, reconfigure itself accordingly. It's intended to run as a daemon and has an option to install itself as a systemd service. If you want to monitor the connectivity to several TARGETs, you can run several instances of nw-watchdog using different --pidfile option arguments.
nw-watchdog is free software written by Fredrik Ax <frax@axnet.nu>.
Feel free to modify and/or (re)distribute it in any way you like.
... it's always nice to be mentioned though ;-)
nw-watchdog comes with ABSOLUTELY NO WARRANTY.