Community discussions

MikroTik App
 
cecco
just joined
Topic Author
Posts: 1
Joined: Sat Jul 02, 2005 4:16 pm

APC UPS monitoring?

Fri Sep 02, 2005 3:52 pm

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
 
killo3967
just joined
Posts: 3
Joined: Mon May 31, 2004 9:40 am

Is enough for you?

Thu Sep 15, 2005 1:37 am

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
 
User avatar
HarvSki
Member
Member
Posts: 395
Joined: Fri May 28, 2004 3:37 pm
Location: London, UK

Tue Jan 03, 2006 2:54 pm

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
 
GJS
Member
Member
Posts: 418
Joined: Sat May 29, 2004 4:07 pm
Location: London

Wed Jan 04, 2006 6:27 am

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???
 
GJS
Member
Member
Posts: 418
Joined: Sat May 29, 2004 4:07 pm
Location: London

Wed Jan 04, 2006 6:32 am

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?
 
User avatar
HarvSki
Member
Member
Posts: 395
Joined: Fri May 28, 2004 3:37 pm
Location: London, UK

Wed Jan 04, 2006 10:18 am

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.
 
GJS
Member
Member
Posts: 418
Joined: Sat May 29, 2004 4:07 pm
Location: London

Wed Jan 04, 2006 1:19 pm

Ah, got you!

Happy New Year, Harvey.
 
User avatar
HarvSki
Member
Member
Posts: 395
Joined: Fri May 28, 2004 3:37 pm
Location: London, UK

Wed Jan 04, 2006 1:28 pm

grrrrrrrr!!!!!!!!!!!!!!!

:oops:
 
User avatar
HarvSki
Member
Member
Posts: 395
Joined: Fri May 28, 2004 3:37 pm
Location: London, UK

Mon Jan 09, 2006 12:52 pm

This will monitor the ups called UPS1 in 2.9
/system ups monitor [/system ups find name "ups1"]  once
 
GJS
Member
Member
Posts: 418
Joined: Sat May 29, 2004 4:07 pm
Location: London

Mon Jan 09, 2006 5:21 pm

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?
 
User avatar
HarvSki
Member
Member
Posts: 395
Joined: Fri May 28, 2004 3:37 pm
Location: London, UK

Tue Jan 10, 2006 12:34 pm

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.

Who is online

Users browsing this forum: No registered users and 21 guests