Hmm...my 2.8 script works fine for alerting on mains failure, Harvsky. It's basically straight out of the manual:
wait-on-battery
/system ups monitor once do {
:if ($on-battery) do {
/system scheduler set ups-monitor on-event=wait-off-battery
/tool e-mail send subject=([/system identity get name] . " mains power FAILED at " . [/system clock get time] . "GMT on " . [/system clock get date]) to="
me@mydomain.co.uk"
}
}
wait-off-battery
/system ups monitor once do {
:if (!$on-battery) do {
/system scheduler set ups-monitor on-event=wait-on-battery
/tool e-mail send subject=([/system identity get name] . " mains power RESTORED at " . [/system clock get time] . "GMT on " . [/system clock get date]) to="
me@mydomain.co.uk"
}
}
I'd love to see a list of these apparently system wide global variables like $on-battery, $line-voltage etc. I'd also love to see the UPS functionality included in SNMP - or maybe this is already the case in 2.9???