Nothing revolutionary here, but this is a super quick and simple way to monitor the availability of your network nodes via ICMP.
- Ability to send mail from the server running the script
- ICMP connectivity to each target node
- DNS provider that does NOT rewrite domain errors (NXDOMAIN redirect)
- Create a file with a list of nodes (I used ‘nodes.list’) and make it relative to your script. Use IP addresses or FQDNs if you always trust DNS….
2. Create the following BASH script, tweak $SOURCE and $TO.
3. Create a cron job. Here is an example that performs the checks every 5 minutes: