diff --git a/html/images/logos/algcom.png b/html/images/logos/algcom.png new file mode 100644 index 0000000000..9671534463 Binary files /dev/null and b/html/images/logos/algcom.png differ diff --git a/html/images/os/algcom.png b/html/images/os/algcom.png new file mode 100644 index 0000000000..f861bc8da8 Binary files /dev/null and b/html/images/os/algcom.png differ 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