In my previous post
Server availability monitoring with email notifications I've used the same idea of monitoring. This script is a version 2.0 with some additional features:
- If you compare old and new version, you'll notice the script was completely rewritten. It's because I wanted it to run on my synology NAS.
- Next change is additional host states, instead of A-available and N-notAvailable I'm now using 2 additional states Going Up, Going Down. This will delay the notification about host state change and prevent frequent flapping of naughty hosts in network.
- Last feature added is hosts UP/DOWN times in notifications; see mail notification example: