Hi coln!
I want to be notified of problems on my server via SMS, even when
the network or power fails. So I have to watch my server
remotely. Locally I use monit and I could use it remotely, too,
with a ping, TCP or UDP check, but I'd like a more sophisticated
check with low bandwidth and memory usage and I wonder if what I
plan does already exist. I didn't find it.
Something like ...
------------------------------------------------
SMS are sent via email to
(E-Mail Removed)
every 60 s check mailgw.mobilkom.at,
e.g. ping it or nmap -sS -p25 or connect to it and quit
if success 'date +%s >statusfile'
else echo alarm >statusfile
put up a UDP server which replies to every received packet
with a packet containing statusfile.
On the remote host a client polls status file every 10 s
if there is no reply (maybe due to lost packet),
burst poll 10 times with 1 s spacing until we receive a reply
if no reply SMS 'server unreachable'
if statusfile=='alarm' SMS 'SMS smtp server unreachable'
if statusfile < `date +%s` - 90` SMS `SMS smtp server watchdog dead`
---------------------------------------------