I have done this a couple of times - it works well. I use the following script x2 (one for power up and one for power down). then use the netwatch tool to advise whenever the state changes.
hope this helps
:global datetime ([/system clock get time] . " - " . [:pick[/system clock get date] 4 6] . “-” . [:pick [/system clock get date]0 3] . “-” . [:pick[/system clock get date] 7 11])
{/tool e-mail send to=myemailaddrss@.myisp.com subject=("site-id Power Failure At " . $datetime) body=("site-id Power Failure at " . $datetime)
}
well - I just ping on old swith that plugs directly into the mains - so when the power goes off and the router is running from UPS (or battery bank), you know the sight has lost power. You can use an old switch or print server or anything you have laying around that has an IP address.
Not realy sure on how many pings it takes - havn’t read the manual - lol. Just used the feature. All I can say is I have had very few false alarms - perhaps one a month (I have 11 sites monitored in this way). I have them sending the emails via an sms gateway to my phone. I set it to monitor the host every 30 seconds so if it does give a false power down alarm it corrects it in 30 seconds - so no harm done.
I usually just set up the netwatch feature on the MT box in question so there is no routers inbetween - ie run netwatch on the MT box running on batteries and have the old switch (or print server - lol) plugged in via ethernet.
Having said that - the dude has some really cool features like that