The Script works fine.
I would like to stream line it so that the script reads from a text file instead of reading from this line that is coded within the script.
# add ipaddress or hostnames that will be monitored
# hostname and ipaddress are separated by a space
HOSTS="192.168.1.1 24.234.0.71 10.1.0.1"
As you can see this line within the script would be and can become very long and unmanageable and I would run the risk of causing damage to the script by having to add or remove a hosts ip address.
I would like for the script to read from a text file instead of the above line.
I am trying to set the script up to run every 15min. via a cron job. I placed the script in the bin folder and setup all the correct rights for the script to be runned from any term window.
The results of the script is listed below for your review.
------------------------------------------------------
Subject: A host is Down!
Date: Wednesday 25 July 2007 21:10
From: "Ghost" <ghost@ghost.com>
To:
admin@ghost.com
Host : 10.1.0.10 is down (There was no reply from this host) at Wed Jul 25
*21:10:54 PDT 2007
------------------------------------------------------