Hello! once I confess I'm not a programmer but I have! :)
The essence of what you need the script to monitor 3 4 and host in case of unavailability of all, brings to the screen the large red brick with the words plug wire back Gad.
Maybe someone have something similar?
It can be any language, preferably with a loop, well it is.