APC UPS monitoring?

Hi all,
I have an APC UPS in one of my sites, conected to a Mikrotik router. The main voltage i always between 180 and 210 Volts, so I want to monitor the voltage constantly and to log it somewhere. Do you have any idea how this can be done, because I didn’t see useful in tte ROS manual?

P.S. The UPS is APC SMART-UPS 2200, and the ROS is 2.9

regards,
Cecco

Just:

/system ups monitor do={:log message $line-voltage} once.

This log the entry line voltage to the system log. You could also log in remote to another linux box.

if you want to view all the variables:

/system ups monitor do={:environment print} once

I ROS 2.9.10 with an APC UPS and the answer given does not work… my 2.8 monitoring / email alerting scripts don’t work either.

Does anyone have any other suggestions?

Thanks

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???

This works as well on 2.8.28:

/system ups monitor do={:log message $line-voltage} once

jan/04/2006 04:28:17 System-Info: 243

Excellent!

Maybe it’s something to do with your UPS configuration, I can post mine if you like?

Happy New Year Guy!

I think what I ment to say was: I have a 2.9.10 router which I cannot make my 2.8.28 UPS monitoring scripts work on.

Ah, got you!

Happy New Year, Harvey.

grrrrrrrr!!!

:blush:

This will monitor the ups called UPS1 in 2.9

/system ups monitor [/system ups find name "ups1"]  once

I haven’t got a 2.9 router connected to a UPS but this is’nt just a case issue, is it? ups1 vs UPS1?

Good you are paying attention!

yes it is CaSe sensitive so if you UPS is called “ups1” then that is what you will need to find.