Some questions about UPS and SNMP

Hi.
My setup:

  • RB2011UiAS-2HnD (ROS 6.47.1)
  • APS Smart UPS SUA1500I
  • console cable for connect
    Router can monitor UPS:
/system ups print    
Flags: X - disabled, I - invalid 
 0    name="ups1" port=serial0 offline-time=0s min-runtime=never alarm-setting=immediate model="Smart-UPS 1500" version="653.13.I" 
      serial="AS0732322776" manufacture-date="08/10/07" load=29% on-line=yes nominal-battery-voltage=24V

I want monitor UPS status from Zabbix via Mikrotik over SNMP.

Ok, try get available OID’s

/system ups print oid            
Flags: X - disabled, I - invalid 
 0    model=.1.3.6.1.2.1.33.1.1.2 version=.1.3.6.1.2.1.33.1.1.3 status=.1.3.6.1.2.1.33.1.2.1 remaining=.1.3.6.1.2.1.33.1.2.3 
      battery-charge=.1.3.6.1.2.1.33.1.2.4 voltage=.1.3.6.1.2.1.33.1.2.5 temperature=.1.3.6.1.2.1.33.1.2.7 
      replace-battery=.1.3.6.1.2.1.33.1.6.2.1.2.1 low-battery=.1.3.6.1.2.1.33.1.6.2.1.2.2 overload=.1.3.6.1.2.1.33.1.6.2.1.2.3 
      line-voltage=.1.3.6.1.2.1.33.1.3.3.1.3.2 frequency=.1.3.6.1.2.1.33.1.3.3.1.2.2 output-voltage=.1.3.6.1.2.1.33.1.4.4.1.2.2 
      load=.1.3.6.1.2.1.33.1.4.4.1.5.2

Some formating

model=.1.3.6.1.2.1.33.1.1.2 
version=.1.3.6.1.2.1.33.1.1.3 
status=.1.3.6.1.2.1.33.1.2.1 
remaining=.1.3.6.1.2.1.33.1.2.3 
battery-charge=.1.3.6.1.2.1.33.1.2.4 
voltage=.1.3.6.1.2.1.33.1.2.5 
temperature=.1.3.6.1.2.1.33.1.2.7 
replace-battery=.1.3.6.1.2.1.33.1.6.2.1.2.1 
low-battery=.1.3.6.1.2.1.33.1.6.2.1.2.2 
overload=.1.3.6.1.2.1.33.1.6.2.1.2.3 
line-voltage=.1.3.6.1.2.1.33.1.3.3.1.3.2 
frequency=.1.3.6.1.2.1.33.1.3.3.1.2.2 
output-voltage=.1.3.6.1.2.1.33.1.4.4.1.2.2 
load=.1.3.6.1.2.1.33.1.4.4.1.5.2

And query from Zabbix sever for test:

snmpwalk -v2c -c public mikrotik_IP .1.3.6.1.2.1.33
iso.3.6.1.2.1.33.1.1.2.0 = STRING: "Smart-UPS 1500"
iso.3.6.1.2.1.33.1.1.3.0 = STRING: "653.13.I"
iso.3.6.1.2.1.33.1.2.1.0 = INTEGER: 2
iso.3.6.1.2.1.33.1.2.3.0 = INTEGER: 63
iso.3.6.1.2.1.33.1.2.4.0 = INTEGER: 100
iso.3.6.1.2.1.33.1.2.5.0 = INTEGER: 272
iso.3.6.1.2.1.33.1.2.7.0 = INTEGER: 3640
iso.3.6.1.2.1.33.1.3.2.0 = INTEGER: 1
iso.3.6.1.2.1.33.1.3.3.1.2.2 = INTEGER: 500
iso.3.6.1.2.1.33.1.3.3.1.3.2 = INTEGER: 221
iso.3.6.1.2.1.33.1.4.3.0 = INTEGER: 1
iso.3.6.1.2.1.33.1.4.4.1.2.2 = INTEGER: 221
iso.3.6.1.2.1.33.1.4.4.1.5.2 = INTEGER: 29
iso.3.6.1.2.1.33.1.6.1.0 = Gauge32: 0

And now some qustions:

  1. Why i can’t see?
replace-battery	.1.3.6.1.2.1.33.1.6.2.1.2.1
low-battery	.1.3.6.1.2.1.33.1.6.2.1.2.2
overload	.1.3.6.1.2.1.33.1.6.2.1.2.3
  1. What is data in this strings?
iso.3.6.1.2.1.33.1.3.2.0	INTEGER	1
iso.3.6.1.2.1.33.1.6.1.0	Gauge32	0
iso.3.6.1.2.1.33.1.4.3.0	INTEGER	1
  1. About mapping status on
status=.1.3.6.1.2.1.33.1.2.1

UPS is on-line

iso.3.6.1.2.1.33.1.2.1.0 = INTEGER: 2

UPS is on-battery

iso.3.6.1.2.1.33.1.2.1.0 = INTEGER: 3

Where i can found code for other UPS status?

Current monitoring status
mikrotik_ups_01.png

Some additional information

https://wiki.mikrotik.com/wiki/Manual:SNMP

MIBs used in RouterOS v6.x:

UPS-MIB

http://www.mibdepot.com/cgi-bin/getmib3.cgi?win=mib_a&i=1628&n=UPS-MIB&r=synso&f=UPS.mib&v=v2&t=tree - UPS-MIB (v2)Tree
See info about OID 1.3.6.1.2.1.33.1.2.1 (UPS Status in Mikrotik version, “2” when UPS on-line and “3” when UPS on-battery)

upsBatteryStatus:
Possible data:
unknown (1),
batteryNormal (2),
batteryLow (3),
batteryDepleted (4)
DESCRIPTION
“The indication of the capacity remaining in the UPS
system’s batteries. A value of batteryNormal
indicates that the remaining run-time is greater than
upsConfigLowBattTime. A value of batteryLow indicates
that the remaining battery run-time is less than or
equal to upsConfigLowBattTime. A value of
batteryDepleted indicates that the UPS will be unable
to sustain the present load when and if the utility
power is lost (including the possibility that the
utility power is currently absent and the UPS is
unable to sustain the output).”

Mikrotik use wrong OID for UPS status indication?

If see to UPS MIB this OID contain this information:

iso.3.6.1.2.1.33.1.3.2.0 - upsInputNumLines
DESCRIPTION
“The number of input lines utilized in this device.
This variable indicates the number of rows in the
input table.”

iso.3.6.1.2.1.33.1.6.1.0 - upsAlarmsPresent
DESCRIPTION
“The present number of active alarm conditions.”

iso.3.6.1.2.1.33.1.4.3.0 - upsOutputNumLines
DESCRIPTION
“The number of output lines utilized in this device.
This variable indicates the number of rows in the
output table.”

In Mikrotik version this OIDs contain this information? Or another information?

P.S. Sorry for my bad English, this is not my native language.

Summon the Mikrotik devs to this topic :slight_smile:

Up topic

Can you share zabbix template plz