From 3753e7047670805d28016b1dbe3161c689800f40 Mon Sep 17 00:00:00 2001 From: Guilherme Poletto Date: Sat, 17 Oct 2020 17:05:02 -0300 Subject: [PATCH] initial support for DC-UPS-48 from algcom (#12209) * initial support for DC-UPS-48 from algom * add snmprec files for algcom-dc-ups * rename MIB and create json test unit * new MIB name, recapture test snmprec and json * remove unnecessary OS matching --- html/images/logos/algcom.png | Bin 0 -> 3307 bytes html/images/os/algcom.png | Bin 0 -> 7541 bytes includes/definitions/algcom-dc-ups.yaml | 14 + .../definitions/discovery/algcom-dc-ups.yaml | 169 ++++ mibs/algcom/ALGPOWER-v2 | 590 ++++++++++++++ tests/data/algcom-dc-ups.json | 745 ++++++++++++++++++ tests/snmpsim/algcom-dc-ups.snmprec | 28 + 7 files changed, 1546 insertions(+) create mode 100644 html/images/logos/algcom.png create mode 100644 html/images/os/algcom.png create mode 100644 includes/definitions/algcom-dc-ups.yaml create mode 100644 includes/definitions/discovery/algcom-dc-ups.yaml create mode 100644 mibs/algcom/ALGPOWER-v2 create mode 100644 tests/data/algcom-dc-ups.json create mode 100644 tests/snmpsim/algcom-dc-ups.snmprec diff --git a/html/images/logos/algcom.png b/html/images/logos/algcom.png new file mode 100644 index 0000000000000000000000000000000000000000..9671534463ab4cdfcf080427c62e42002432102b GIT binary patch literal 3307 zcmV

5Q;P)T1Y(FMTL zmOcQi)(EuY+Ic_$&=(jF3zkFhna; zsFk@MSQ!So_~|#rJyA&G@HsN;j%!a7z^5iS^#fpvR>soGTnCi; zz)gA$txP2_9jHli+T_6Zed)A))YL~e>!&)dy-c(+Ox^@$h~| zpkG$B2KFu;;JX6dfi40|@sojhf#MBXnSnW0ylz4=O$CM@p)NirFObt;DH^!BsXzy)-CxW4rDeQ+<6A7h zdL^4)-h97SruW{@E5krvl_uy&Hn3Z?DlUB!q>O(HsXsLbL7gQUy-;F{t#}hc!;fGW zFOF+`FVU#xEL#%z`+Y#W4BMInEO1=AE3g-+71JI!@oRxI0(I7DWlqoX8HNJO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bOM_k%VazX`(epuY`l#dPe{-; zEkV6!@Rp}vfk!!?0gM2y6_D-;>ly)DOMLTNyal3H0q4s1O~6Dv>i2-8jpxffX$h9o z(|7@54Dgs%=7c2Yb(0Y{QPPqJWaNJ;f!0o~Oidcs8w32A^mdob6D@BFi#g7pUM7*# zX-L~XEkLA_**1%Xl1U_%5;(o&%s;x-wvqK z%G3nogTPxZ#yhV4p_rpoplg3Xsf6z^yM1`@xH{cXn8#L@LRHF2?n;Guo|6$r-(~%2hgK|?|u@aZ6?6SO~n+)wa*Ni=@da){M~aM z9oN1=+S&wMmd15sV#YdXWyUt6^lX&xcxTA(2SvMI6Ky-_%Xs4QdV;n;^Bwn#cz-pS zGIxn&J>E-x0ZJX$eh|3UaqU>h#=}E_qvP5qi`knP;pR($60OYMW|#_h_8sq!*hZp7 znFj-=Ki5*53GmP1O(eu+I-r1R$FnS&08&jtqB z#EYT9%EOLQ?hgpZCusY-zT-8Gaq|TcM(Bnd-^0DYBU+hHXjyU>-U?sKmzxjwv1$u_ z=YAkTEJEzW$(e!jeX{S|)im5+_}9j``HYx5t;|ND2(y_r+AL|#aCt@947{zxEluiZ zIIA~In7T3vUh@Ntn}48h;G2o9N#g6vq|Cp7n}n>scgUCqE01NAE9L!q;LA76XrkoIgY?M0~JZL&GKN pk4qe8;cZs&clfVmz{P-F{|ERgAGmpzu3!KF002ovPDHLkV1k9-HJtze literal 0 HcmV?d00001 diff --git a/html/images/os/algcom.png b/html/images/os/algcom.png new file mode 100644 index 0000000000000000000000000000000000000000..f861bc8da8095cf9136e51ea374a71a2ab4b9893 GIT binary patch literal 7541 zcmaKQcQ_pV{`Tl4TJ#bjBqE94Eh_}kJ8Sj2`r5_nB`YFYl&DdoB`tOb{OM z%2Ld%Y%hwq^s@8xt1?Vj>nDC9>Uq4zd({*9>@wj2c1fbfQh+IT7aG%`&!f{5*l74# z{Gu-d)PJsVH^!~#1Bvm+ZTMre&aPj=PV%> zcnkn3ZKsKfj|hOljCacb(7euSS(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1UKlZC($*nOyc6)5;z43t)wzY(~_vURx7ukze?x z3y&6LQi5^x=t^a8HbuY62KrK>?>-Bf2QdwktA^`3_MRWor(y~UU}Yg&tu*xGaZlh! zqF8wb{ssneVC%kkXpI&p%0vWdW&NlfM#Ppj+V~|c^hJ7URRg@gLI2K^>HopcFIPJ*6~t!m0O+grg>M%QK|@JhHH@NwpP V(iX7N|M#CO4OLy0swcM3{|}To`gQ;S literal 0 HcmV?d00001 diff --git a/includes/definitions/algcom-dc-ups.yaml b/includes/definitions/algcom-dc-ups.yaml new file mode 100644 index 0000000000..9d1aca7298 --- /dev/null +++ b/includes/definitions/algcom-dc-ups.yaml @@ -0,0 +1,14 @@ +os: algcom-dc-ups +text: 'ALGCOM DC UPS' +type: power +icon: algcom + +over: + - { graph: device_current, text: Current } + - { graph: device_voltage, text: Voltage } + - { graph: device_temperature, text: Temperature } + +discovery: + - sysObjectID: + - .1.3.6.1.4.1.49136 +mib_dir: algcom diff --git a/includes/definitions/discovery/algcom-dc-ups.yaml b/includes/definitions/discovery/algcom-dc-ups.yaml new file mode 100644 index 0000000000..8eb077f817 --- /dev/null +++ b/includes/definitions/discovery/algcom-dc-ups.yaml @@ -0,0 +1,169 @@ +mib: ALGPOWER-v2-MIB +modules: + sensors: + voltage: + data: + - + oid: outputVoltage + num_oid: '.1.3.6.1.4.1.49136.1.1.1.{{ $index }}' + divisor: 10 + descr: 'DC Voltage' + index: outputVoltage + - + oid: batteryVoltage + num_oid: '.1.3.6.1.4.1.49136.1.2.1.{{ $index }}' + divisor: 10 + descr: 'Battery Voltage' + index: batteryVoltage + - + oid: supplyVoltage + num_oid: '.1.3.6.1.4.1.49136.1.6.1.{{ $index }}' + divisor: 10 + descr: 'AC Voltage (Optional)' + index: supplyVoltage + - + oid: btst-volt-i + num_oid: '.1.3.6.1.4.1.49136.1.8.5.{{ $index }}' + divisor: 10 + descr: 'Bat-test initial' + index: btst-volt-i + - + oid: btst-volt-f + num_oid: '.1.3.6.1.4.1.49136.1.8.7.{{ $index }}' + divisor: 10 + descr: 'Bat-test final' + index: btst-volt-f + current: + data: + - + oid: outputCurrent + num_oid: '.1.3.6.1.4.1.49136.1.1.2.{{ $index }}' + divisor: 1000 + descr: 'Total output current' + index: outputCurrent + - + oid: batteryCurrent + num_oid: '.1.3.6.1.4.1.49136.1.2.2.{{ $index }}' + divisor: 1000 + descr: 'Battery current' + index: batteryCurrent + - + oid: btst-amp-i + num_oid: '.1.3.6.1.4.1.49136.1.8.6.{{ $index }}' + divisor: 1000 + descr: 'Bat-test initial' + index: btst-amp-i + - + oid: btst-amp-f + num_oid: '.1.3.6.1.4.1.49136.1.8.8.{{ $index }}' + divisor: 1000 + descr: 'Bat-test final' + index: btst-amp-f + temperature: + data: + - + oid: innerTemperature + num_oid: '.1.3.6.1.4.1.49136.1.4.1.{{ $index }}' + multiplier: 1 + descr: 'Internal temperature' + index: innerTemperature + - + oid: outerTemperature + num_oid: '.1.3.6.1.4.1.49136.1.4.2.{{ $index }}' + multiplier: 1 + descr: 'External probe temperature' + index: outerTemperature + - + oid: heatSinkTemperature + num_oid: '.1.3.6.1.4.1.49136.1.4.3.{{ $index }}' + multiplier: 1 + descr: 'Heatsink temperature' + index: heatSinkTemperature + state: + data: + - + oid: chargerStatus + num_oid: '.1.3.6.1.4.1.49136.1.2.3.{{ $index }}' + descr: 'Charger Status' + index: chargerStatus + states: + - { graph: 1, value: 0, generic: 2, descr: BATTERY_DISCONNECTED } + - { graph: 1, value: 1, generic: 2, descr: WRONG_BATTERY_VOLTAGE } + - { graph: 1, value: 2, generic: 1, descr: DISCHARGING } + - { graph: 1, value: 3, generic: 0, descr: CHARGING_BULK } + - { graph: 1, value: 4, generic: 0, descr: CHARGING_ABSORPTION } + - { graph: 1, value: 5, generic: 0, descr: CHARGING_FLOAT } + - { graph: 1, value: 6, generic: 2, descr: CRITICAL_LOW_VOLTAGE } + - { graph: 1, value: 7, generic: 0, descr: BATTERY_UNDER_TEST } + - + oid: alarmOnBattery + num_oid: '.1.3.6.1.4.1.49136.1.3.1.{{ $index }}' + descr: 'Operation Mode' + index: alarmOnBattery + states: + - { graph: 1, value: 0, generic: 0, descr: AC } + - { graph: 1, value: 1, generic: 1, descr: BATTERY } + - + oid: acFail + num_oid: '.1.3.6.1.4.1.49136.1.3.2.{{ $index }}' + descr: 'AC Power' + index: acFail + states: + - { graph: 1, value: 0, generic: 0, descr: OK } + - { graph: 1, value: 1, generic: 1, descr: FAIL } + - + oid: batteryCharging + num_oid: '.1.3.6.1.4.1.49136.1.3.3.{{ $index }}' + descr: 'Charging' + index: batteryCharging + states: + - { graph: 1, value: 0, generic: 0, descr: NO } + - { graph: 1, value: 1, generic: 0, descr: YES } + - + oid: batteryDischarging + num_oid: '.1.3.6.1.4.1.49136.1.3.4.{{ $index }}' + descr: 'Discharging' + index: batteryDischarging + states: + - { graph: 1, value: 0, generic: 0, descr: NO } + - { graph: 1, value: 1, generic: 0, descr: YES } + - + oid: overheat + num_oid: '.1.3.6.1.4.1.49136.1.3.5.{{ $index }}' + descr: 'Temperature Status' + index: overheat + states: + - { graph: 1, value: 0, generic: 0, descr: OK } + - { graph: 1, value: 1, generic: 2, descr: OVERHEAT } + - + oid: overload + num_oid: '.1.3.6.1.4.1.49136.1.3.6.{{ $index }}' + descr: 'Load Capacity' + index: overload + states: + - { graph: 1, value: 0, generic: 0, descr: OK } + - { graph: 1, value: 1, generic: 2, descr: OVERLOAD } + - + oid: fanAfail + num_oid: '.1.3.6.1.4.1.49136.1.3.7.{{ $index }}' + descr: 'Fan A' + index: fanAfail + states: + - { graph: 0, value: 0, generic: 0, descr: OK } + - { graph: 0, value: 1, generic: 2, descr: FAIL } + - + oid: fanBfail + num_oid: '.1.3.6.1.4.1.49136.1.3.8.{{ $index }}' + descr: 'Fan B' + index: fanBfail + states: + - { graph: 0, value: 0, generic: 0, descr: OK } + - { graph: 0, value: 1, generic: 2, descr: FAIL } + count: + data: + - + oid: upTime + num_oid: '.1.3.6.1.4.1.49136.1.3.11.{{ $index }}' + descr: 'Horimeter' + multiplier: 1 + index: upTime diff --git a/mibs/algcom/ALGPOWER-v2 b/mibs/algcom/ALGPOWER-v2 new file mode 100644 index 0000000000..40e0891b19 --- /dev/null +++ b/mibs/algcom/ALGPOWER-v2 @@ -0,0 +1,590 @@ +ALGPOWER-v2-MIB DEFINITIONS ::= BEGIN + IMPORTS + DisplayString FROM RFC1213-MIB + OBJECT-TYPE FROM RFC-1212 + enterprises FROM RFC1155-SMI; + + algcom OBJECT IDENTIFIER ::= { enterprises 49136 } + upsObjects OBJECT IDENTIFIER ::= { algcom 1 } + output OBJECT IDENTIFIER ::= { upsObjects 1 } + battery OBJECT IDENTIFIER ::= { upsObjects 2 } + input OBJECT IDENTIFIER ::= { upsObjects 3 } + temperature OBJECT IDENTIFIER ::= { upsObjects 4 } + watchdog OBJECT IDENTIFIER ::= { upsObjects 5 } + supply OBJECT IDENTIFIER ::= { upsObjects 6 } + installation OBJECT IDENTIFIER ::= { upsObjects 7 } + bat-tst OBJECT IDENTIFIER ::= { upsObjects 8 } + + + outputVoltage OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Numeric value of instantaneous output voltage from + the source in tenths of a volt. To get the value + actual in volt should be divided by 10. + + Example: + Read value 241, actual value 24.1V." + ::= { output 1 } + + outputCurrent OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Numeric value of current output of converter AC/DC. + Real value reading in milli ampere. + + Example: + Read value 1087, Actual value 1.087 milli ampere + or 1.087A. + If the output is '0' the AC/DC is off and the output + for the equipments is provide from batteries" + ::= { output 2 } + + oidNotUsed0 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "OID not used." + ::= { output 3 } + + oidNotUsed1 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "OID not used." + ::= { output 4 } + + + batteryVoltage OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Numeric value of instantaneous voltage of battery bank. + To get the actual value in volt must be divided by 10. + + Example: + Read value 240, actual value 24.0V." + ::= { battery 1 } + + batteryCurrent OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Numeric value of current in Battery bank. Real + value reading in milli ampere. + If the value is negative the Battery bank is provide + energy for the output. + If the value is positive the Battery bank is under + charger + + Example: + Read value -2230, Actual value 2,230 ampere and the + battery bank is provide this current. + Read value 3000, Actual value 3.000 milli ampere and + the battery bank is absorve this current." + ::= { battery 2 } + + chargerStatus OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Show the status of battery charger: + 0 - The battery is not connected in DC UPS; + 1 - The battery is voltage incompatible with DC UPS; + 2 - The DC UPS is in nobreak mode; + 3 - The charger of Battery is in Bulk stage; + 4 - The charger of Battery is Absorption stage; + 5 - The charger of Battery is Float stage; + 6 - The Battery will be disconnected in 30s due to + low voltage and the DC-UPS output will be + turned off. + 7 - The Battery is under test" + ::= { battery 3 } + + + alarmOnBattery OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Shows the operation mode of DC-UPS: + + 0 - The DC-UPS output is provide by AC energy. + 1 - The DC-UPS output is provide by Battery" + ::= { input 1 } + + acFail OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm that alert about AC outages in the last 10 + minutes: + + 0 - DC-UPS in normal operation. + 1 - Occur a AC fail in the last 10 minutes." + ::= { input 2 } + + batteryCharging OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Show the status of charging Battery: + + 1 - The battery is on charging. + 0 - The battery is on discharging." + ::= { input 3 } + + batteryDischarging OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Show the status of discharging Battery: + + 1 - The battery is on discharging. + 0 - The battery is on charging." + ::= { input 4 } + + overheat OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm that alert about overtemperature of DC-UPS + + 1 - The DC-UPS is in condition of overtemperature. + 0 - The DC-UPS is in normal condition." + ::= { input 5 } + + overload OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm that alert about overload of DC-UPS + + 1 - The DC-UPS is in condition of overload. + 0 - The DC-UPS is in normal condition." + ::= { input 6 } + + fanAfail OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm that alert about fail in internal FAN A + + 1 - Internal FAN with fail. + 0 - Internal FAN ok" + ::= { input 7 } + + fanBfail OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm that alert about fail in internal FAN B + + 1 - Internal FAN with fail. + 0 - Internal FAN ok" + ::= { input 8 } + + oidNotUsed2 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "OID not used." + ::= { input 9 } + + oidNotUsed3 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "OID not used." + ::= { input 10 } + + upTime OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION "System Up time in hours" + ::= {input 11} + + + innerTemperature OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Show the internal temperature of power supply. + Uses the unit degree Celsius. + + Example + Read value: 25, temperature is 25degC." + ::= { temperature 1 } + + outerTemperature OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Show the temperature of external sensor (cable that + comes with power supply). + Uses the unit degree Celsius. + + Example + Read value: 25, temperature is 25degC." + ::= { temperature 2 } + + heatSinkTemperature OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Show the temperature of sensor in the heatsink of + power supply use the unit degree Celsius. + + Example + Read value: 25, temperature is 25degC." + ::= { temperature 3 } + + + watchdogPing1 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 1 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 1 acted on the output the last 10 + minutes. + 0 - The Watchdog 1 has not acted in the last 10 + minutes." + ::= { watchdog 1 } + + watchdogPing2 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 2 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 2 acted on the output the last 10 + minutes. + 0 - The Watchdog 2 has not acted in the last 10 + minutes." + ::= { watchdog 2 } + + watchdogPing3 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 3 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 3 acted on the output the last 10 + minutes. + 0 - The Watchdog 3 has not acted in the last 10 + minutes." + ::= { watchdog 3 } + + watchdogPing4 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 4 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 4 acted on the output the last 10 + minutes. + 0 - The Watchdog 4 has not acted in the last 10 + minutes." + ::= { watchdog 4 } + + watchdogPing5 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 5 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 5 acted on the output the last 10 + minutes. + 0 - The Watchdog 5 has not acted in the last 10 + minutes." + ::= { watchdog 5 } + + watchdogPing6 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 6 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 6 acted on the output the last 10 + minutes. + 0 - The Watchdog 6 has not acted in the last 10 + minutes." + ::= { watchdog 6 } + + watchdogPing7 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 7 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 7 acted on the output the last 10 + minutes. + 0 - The Watchdog 7 has not acted in the last 10 + minutes." + ::= { watchdog 7 } + + watchdogPing8 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 8 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 8 acted on the output the last 10 + minutes. + 0 - The Watchdog 8 has not acted in the last 10 + minutes." + ::= { watchdog 8 } + + watchdogPing9 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 9 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 9 acted on the output the last 10 + minutes. + 0 - The Watchdog 9 has not acted in the last 10 + minutes." + ::= { watchdog 9 } + + watchdogPing10 OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Alarm indicating the action of watchdog 10 + programmed in the last 10 minutes. The watchdog + acts on the output by turning it off when not + receive response from IP ping command + configured. + + 1 - The watchdog 10 acted on the output the last 10 + minutes. + 0 - The Watchdog 10 has not acted in the last 10 + minutes." + ::= { watchdog 10 } + + + supplyVoltage OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The supply AC voltage decivolt [dV] + Numeric value of instantaneous input voltage. + An optional sensor is required to read this value. + To get the actual value in volt it should be + divided by 10. + + Example: + Read value 2410, actual value 241 Vac." + ::= {supply 1} + + + popName OBJECT-TYPE + SYNTAX DisplayString (SIZE (30)) + ACCESS read-only + STATUS mandatory + DESCRIPTION "PoP name" + ::= {installation 1} + + facilityAddr OBJECT-TYPE + SYNTAX DisplayString (SIZE (40)) + ACCESS read-only + STATUS mandatory + DESCRIPTION "Facility address" + ::= {installation 2} + + facilityCity OBJECT-TYPE + SYNTAX DisplayString (SIZE (30)) + ACCESS read-only + STATUS mandatory + DESCRIPTION "Facility city" + ::= {installation 3} + + instDate OBJECT-TYPE + SYNTAX DisplayString (SIZE (10)) + ACCESS read-only + STATUS mandatory + DESCRIPTION "Installation date" + ::= {installation 4} + + batCapacity OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION "Battery capacity" + ::= {installation 5} + + batBrand OBJECT-TYPE + SYNTAX DisplayString (SIZE (30)) + ACCESS read-only + STATUS mandatory + DESCRIPTION "Battery brand" + ::= {installation 6} + + batInstDate OBJECT-TYPE + SYNTAX DisplayString (SIZE (10)) + ACCESS read-only + STATUS mandatory + DESCRIPTION "Battery installation date" + ::= {installation 7} + + respPers OBJECT-TYPE + SYNTAX DisplayString (SIZE (50)) + ACCESS read-only + STATUS mandatory + DESCRIPTION "Responsible person" + ::= {installation 8} + + btst-date OBJECT-TYPE + SYNTAX DisplayString (SIZE (10)) + ACCESS read-only + STATUS mandatory + DESCRIPTION "Battery test execution date (dd/mm/yyyy)" + ::= {bat-tst 1} + + btst-status OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION "Battery test status + 0 - NEVER DONE + 1 - Passed + 2 - Running + 3 - Aborted + 4 - Failed" + ::= {bat-tst 2} + + btst-duration OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION "Programmed test duration in minutes + * 999 - Perform the test until battery is fully discharged" + ::= {bat-tst 3} + + btst-elapsed OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION "Elapsed time in current\last battery test" + ::= {bat-tst 4} + + btst-volt-i OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The battery initial voltage [dV] + Numeric value of battery voltage when starting the battery test. + + Example: + Read value 241, actual value 24.1 V." + ::= {bat-tst 5} + + btst-amp-i OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The battery initial cuurent [mA] + Numeric value of battery current when starting the battery test. + + Example: + Read value 1522, actual value 1.55 A." + ::= {bat-tst 6} + + btst-volt-f OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The battery final voltage [dV] + Numeric value of battery voltage when the battery test is done. + + Example: + Read value 225, actual value 22.5 V." + ::= {bat-tst 7} + + btst-amp-f OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The battery initial cuurent [mA] + Numeric value of battery current when the battery test is done. + + Example: + Read value 1485, actual value 1.48 A." + ::= {bat-tst 8} + +END diff --git a/tests/data/algcom-dc-ups.json b/tests/data/algcom-dc-ups.json new file mode 100644 index 0000000000..42c1bfa76b --- /dev/null +++ b/tests/data/algcom-dc-ups.json @@ -0,0 +1,745 @@ +{ + "os": { + "discovery": { + "devices": [ + { + "sysName": "", + "sysObjectID": ".1.3.6.1.4.1.49136", + "sysDescr": "DC UPS ALGCOM", + "sysContact": null, + "version": null, + "hardware": null, + "features": null, + "os": "algcom-dc-ups", + "type": "power", + "serial": null, + "icon": "algcom.png", + "location": "" + } + ] + }, + "poller": { + "devices": [ + { + "sysName": "", + "sysObjectID": ".1.3.6.1.4.1.49136", + "sysDescr": "DC UPS ALGCOM", + "sysContact": "", + "version": null, + "hardware": null, + "features": null, + "os": "algcom-dc-ups", + "type": "power", + "serial": null, + "icon": "algcom.png", + "location": "" + } + ] + } + }, + "sensors": { + "discovery": { + "sensors": [ + { + "sensor_deleted": 0, + "sensor_class": "count", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.3.11.0", + "sensor_index": "upTime", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Horimeter", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 264, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "current", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.2.2.0", + "sensor_index": "batteryCurrent", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Battery current", + "group": null, + "sensor_divisor": 1000, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "current", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.8.8.0", + "sensor_index": "btst-amp-f", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Bat-test final", + "group": null, + "sensor_divisor": 1000, + "sensor_multiplier": 1, + "sensor_current": -1.897, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "current", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.8.6.0", + "sensor_index": "btst-amp-i", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Bat-test initial", + "group": null, + "sensor_divisor": 1000, + "sensor_multiplier": 1, + "sensor_current": -1.581, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "current", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.1.2.0", + "sensor_index": "outputCurrent", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Total output current", + "group": null, + "sensor_divisor": 1000, + "sensor_multiplier": 1, + "sensor_current": 1.374, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.3.2.0", + "sensor_index": "acFail", + "sensor_type": "acFail", + "sensor_descr": "AC Power", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "acFail" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.3.1.0", + "sensor_index": "alarmOnBattery", + "sensor_type": "alarmOnBattery", + "sensor_descr": "Operation Mode", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "alarmOnBattery" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.3.3.0", + "sensor_index": "batteryCharging", + "sensor_type": "batteryCharging", + "sensor_descr": "Charging", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 1, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "batteryCharging" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.3.4.0", + "sensor_index": "batteryDischarging", + "sensor_type": "batteryDischarging", + "sensor_descr": "Discharging", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "batteryDischarging" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.2.3.0", + "sensor_index": "chargerStatus", + "sensor_type": "chargerStatus", + "sensor_descr": "Charger Status", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 5, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "chargerStatus" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.3.7.0", + "sensor_index": "fanAfail", + "sensor_type": "fanAfail", + "sensor_descr": "Fan A", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "fanAfail" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.3.8.0", + "sensor_index": "fanBfail", + "sensor_type": "fanBfail", + "sensor_descr": "Fan B", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "fanBfail" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.3.5.0", + "sensor_index": "overheat", + "sensor_type": "overheat", + "sensor_descr": "Temperature Status", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "overheat" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.3.6.0", + "sensor_index": "overload", + "sensor_type": "overload", + "sensor_descr": "Load Capacity", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": null, + "sensor_limit_warn": null, + "sensor_limit_low": null, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "overload" + }, + { + "sensor_deleted": 0, + "sensor_class": "temperature", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.4.3.0", + "sensor_index": "heatSinkTemperature", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Heatsink temperature", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 28, + "sensor_limit": 48, + "sensor_limit_warn": null, + "sensor_limit_low": 18, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "temperature", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.4.1.0", + "sensor_index": "innerTemperature", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Internal temperature", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 37, + "sensor_limit": 57, + "sensor_limit_warn": null, + "sensor_limit_low": 27, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "temperature", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.4.2.0", + "sensor_index": "outerTemperature", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "External probe temperature", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": 20, + "sensor_limit_warn": null, + "sensor_limit_low": -10, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "voltage", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.2.1.0", + "sensor_index": "batteryVoltage", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Battery Voltage", + "group": null, + "sensor_divisor": 10, + "sensor_multiplier": 1, + "sensor_current": 53.9, + "sensor_limit": 61.985, + "sensor_limit_warn": null, + "sensor_limit_low": 45.815, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "voltage", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.8.7.0", + "sensor_index": "btst-volt-f", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Bat-test final", + "group": null, + "sensor_divisor": 10, + "sensor_multiplier": 1, + "sensor_current": 41.9, + "sensor_limit": 48.185, + "sensor_limit_warn": null, + "sensor_limit_low": 35.615, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "voltage", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.8.5.0", + "sensor_index": "btst-volt-i", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "Bat-test initial", + "group": null, + "sensor_divisor": 10, + "sensor_multiplier": 1, + "sensor_current": 51.7, + "sensor_limit": 59.455, + "sensor_limit_warn": null, + "sensor_limit_low": 43.945, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "voltage", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.1.1.0", + "sensor_index": "outputVoltage", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "DC Voltage", + "group": null, + "sensor_divisor": 10, + "sensor_multiplier": 1, + "sensor_current": 53.9, + "sensor_limit": 61.985, + "sensor_limit_warn": null, + "sensor_limit_low": 45.815, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "voltage", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.49136.1.6.1.0", + "sensor_index": "supplyVoltage", + "sensor_type": "algcom-dc-ups", + "sensor_descr": "AC Voltage (Optional)", + "group": null, + "sensor_divisor": 10, + "sensor_multiplier": 1, + "sensor_current": 0, + "sensor_limit": 0, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": null, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + } + ], + "state_indexes": [ + { + "state_name": "acFail", + "state_descr": "OK", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "acFail", + "state_descr": "FAIL", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "alarmOnBattery", + "state_descr": "AC", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "alarmOnBattery", + "state_descr": "BATTERY", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "batteryCharging", + "state_descr": "NO", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "batteryCharging", + "state_descr": "YES", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 0 + }, + { + "state_name": "batteryDischarging", + "state_descr": "NO", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "batteryDischarging", + "state_descr": "YES", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 0 + }, + { + "state_name": "chargerStatus", + "state_descr": "BATTERY_DISCONNECTED", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 2 + }, + { + "state_name": "chargerStatus", + "state_descr": "WRONG_BATTERY_VOLTAGE", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "chargerStatus", + "state_descr": "DISCHARGING", + "state_draw_graph": 1, + "state_value": 2, + "state_generic_value": 1 + }, + { + "state_name": "chargerStatus", + "state_descr": "CHARGING_BULK", + "state_draw_graph": 1, + "state_value": 3, + "state_generic_value": 0 + }, + { + "state_name": "chargerStatus", + "state_descr": "CHARGING_ABSORPTION", + "state_draw_graph": 1, + "state_value": 4, + "state_generic_value": 0 + }, + { + "state_name": "chargerStatus", + "state_descr": "CHARGING_FLOAT", + "state_draw_graph": 1, + "state_value": 5, + "state_generic_value": 0 + }, + { + "state_name": "chargerStatus", + "state_descr": "CRITICAL_LOW_VOLTAGE", + "state_draw_graph": 1, + "state_value": 6, + "state_generic_value": 2 + }, + { + "state_name": "chargerStatus", + "state_descr": "BATTERY_UNDER_TEST", + "state_draw_graph": 1, + "state_value": 7, + "state_generic_value": 0 + }, + { + "state_name": "fanAfail", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "fanAfail", + "state_descr": "FAIL", + "state_draw_graph": 0, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "fanBfail", + "state_descr": "OK", + "state_draw_graph": 0, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "fanBfail", + "state_descr": "FAIL", + "state_draw_graph": 0, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "overheat", + "state_descr": "OK", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "overheat", + "state_descr": "OVERHEAT", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "overload", + "state_descr": "OK", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "overload", + "state_descr": "OVERLOAD", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + } + ] + }, + "poller": "matches discovery" + } +} diff --git a/tests/snmpsim/algcom-dc-ups.snmprec b/tests/snmpsim/algcom-dc-ups.snmprec new file mode 100644 index 0000000000..879933d2f1 --- /dev/null +++ b/tests/snmpsim/algcom-dc-ups.snmprec @@ -0,0 +1,28 @@ +1.3.6.1.2.1.1.1.0|4|DC UPS ALGCOM +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.49136 +1.3.6.1.2.1.1.3.0|67|95160934 +1.3.6.1.2.1.1.4.0|4| +1.3.6.1.2.1.1.5.0|4| +1.3.6.1.2.1.1.6.0|4| +1.3.6.1.4.1.49136.1.1.1.0|2|539 +1.3.6.1.4.1.49136.1.1.2.0|2|1374 +1.3.6.1.4.1.49136.1.2.1.0|2|539 +1.3.6.1.4.1.49136.1.2.2.0|2|0 +1.3.6.1.4.1.49136.1.2.3.0|2|5 +1.3.6.1.4.1.49136.1.3.1.0|2|0 +1.3.6.1.4.1.49136.1.3.2.0|2|0 +1.3.6.1.4.1.49136.1.3.3.0|2|1 +1.3.6.1.4.1.49136.1.3.4.0|2|0 +1.3.6.1.4.1.49136.1.3.5.0|2|0 +1.3.6.1.4.1.49136.1.3.6.0|2|0 +1.3.6.1.4.1.49136.1.3.7.0|2|0 +1.3.6.1.4.1.49136.1.3.8.0|2|0 +1.3.6.1.4.1.49136.1.3.11.0|2|264 +1.3.6.1.4.1.49136.1.4.1.0|2|37 +1.3.6.1.4.1.49136.1.4.2.0|2|0 +1.3.6.1.4.1.49136.1.4.3.0|2|28 +1.3.6.1.4.1.49136.1.6.1.0|2|0 +1.3.6.1.4.1.49136.1.8.5.0|2|517 +1.3.6.1.4.1.49136.1.8.6.0|2|-1581 +1.3.6.1.4.1.49136.1.8.7.0|2|419 +1.3.6.1.4.1.49136.1.8.8.0|2|-1897