- First, define an sg monitoring account that forwards to the test machine, to the user ID under which sgping will run.
- Every 15 mins, sgping wakes up or is launched by cron.
- It sends an email to that sg monitoring account.
- It checks emails received on the test machine (forwarded by sg). These received emails are the "pings" sent by the script to sg and forwarded back by sg.
- The sgping script maintains a table of the last N received ping emails (N=100 is enough for a day).
- If no ping has come back for a few hours (say 3 hours), we can assume there is a bad problem. sgping then informs the developers with a non-sg email.
- In any case, sgping sends the developers a status email every 24 h. The email could contain various stats.
This wouldn't be too hard to code. Josh, Amit, do you see a problem with this? Anything else this monitoring script should do?