Saturday, July 30, 2016

Ping-based Host Monitoring Script with Timestamps

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:
  1. 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.
  2. 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.
  3. Last feature added is hosts UP/DOWN times in notifications; see mail notification example: