diff --git a/includes/discovery/sensors/pre-cache/linux.inc.php b/includes/discovery/sensors/pre-cache/linux.inc.php index 3b60a90777..2cea115349 100644 --- a/includes/discovery/sensors/pre-cache/linux.inc.php +++ b/includes/discovery/sensors/pre-cache/linux.inc.php @@ -25,3 +25,5 @@ echo 'RaspberryPi '; $pre_cache['raspberry_pi_sensors'] = snmpwalk_cache_oid($device, '.1.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121', [], "NET-SNMP-EXTEND-MIB"); +echo 'ups-nut '; +$pre_cache['ups_nut_sensors'] = snmpwalk_cache_oid($device, '.1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116', [], "NET-SNMP-EXTEND-MIB"); diff --git a/includes/discovery/sensors/state/linux.inc.php b/includes/discovery/sensors/state/linux.inc.php index 165e79a0be..30b16689a4 100644 --- a/includes/discovery/sensors/state/linux.inc.php +++ b/includes/discovery/sensors/state/linux.inc.php @@ -42,3 +42,47 @@ if (!empty($pre_cache['raspberry_pi_sensors'])) { } } } + +if (!empty($pre_cache['ups_nut_sensors'])) { + /* + * All the possible states from https://networkupstools.org/docs/developer-guide.chunked/ar01s04.html#_status_data + */ + $sensors = [ + ['state_name' => 'UPSOnLine' , 'genericT' => 0, 'genericF' => 1, 'descr' => 'UPS on line'], + ['state_name' => 'UPSOnBattery' , 'genericT' => 1, 'genericF' => 0, 'descr' => 'UPS on battery'], + ['state_name' => 'UPSLowBattery' , 'genericT' => 2, 'genericF' => 0, 'descr' => 'UPS low battery'], + ['state_name' => 'UPSHighBattery' , 'genericT' => 1, 'genericF' => 0, 'descr' => 'UPS high battery'], + ['state_name' => 'UPSBatteryReplace' , 'genericT' => 1, 'genericF' => 0, 'descr' => 'UPS the battery needs to be replaced'], + ['state_name' => 'UPSBatteryCharging' , 'genericT' => 1, 'genericF' => 0, 'descr' => 'UPS the battery is charging'], + ['state_name' => 'UPSBatteryDischarging', 'genericT' => 1, 'genericF' => 0, 'descr' => 'UPS the battery is discharging'], + ['state_name' => 'UPSUPSBypass' , 'genericT' => 1, 'genericF' => 0, 'descr' => 'UPS bypass circuit is active' ], + ['state_name' => 'UPSRuntimeCalibration', 'genericT' => 1, 'genericF' => 0, 'descr' => 'UPS is currently performing runtime calibration'], + ['state_name' => 'UPSOffline' , 'genericT' => 2, 'genericF' => 0, 'descr' => 'UPS is offline and is not supplying power to the load'], + ['state_name' => 'UPSUPSOverloaded' , 'genericT' => 2, 'genericF' => 0, 'descr' => 'UPS is overloaded.'], + ['state_name' => 'UPSUPSBuck' , 'genericT' => 1, 'genericF' => 0, 'descr' => 'UPS is trimming incoming voltage'], + ['state_name' => 'UPSUPSBoost' , 'genericT' => 1, 'genericF' => 0, 'descr' => 'UPS is boosting incoming voltage'], + ['state_name' => 'UPSForcedShutdown' , 'genericT' => 2, 'genericF' => 0, 'descr' => 'UPS forced shutdown'], + ]; + foreach ($sensors as $index => $sensor) { + $sensor_oid = 9 + $index; + $oid = '.1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.'. strval($sensor_oid); + $value = current($pre_cache['ups_nut_sensors']["ups-nut." . $sensor_oid]); + + if (!empty($value) or $value == "0") { + $state_name = $sensor['state_name']; + $descr = $sensor['descr']; + $states = [ + ['value' => 0, 'generic' => $sensor['genericF'], 'graph' => 1, 'descr' => 'False'], + ['value' => 1, 'generic' => $sensor['genericT'], 'graph' => 1, 'descr' => 'True'] + ]; + + create_state_index($state_name, $states); + + //Discover Sensors + discover_sensor($valid['sensor'], 'state', $device, $oid, $sensor_oid, $state_name, $descr, '1', '1', null, null, null, null, $value, 'snmp', $sensor_oid); + + //Create Sensor To State Index + create_sensor_to_state_index($device, $state_name, $sensor_oid); + } + } +} diff --git a/includes/polling/applications/ups-nut.inc.php b/includes/polling/applications/ups-nut.inc.php index 5d3e29ee34..3a4e3e25ca 100644 --- a/includes/polling/applications/ups-nut.inc.php +++ b/includes/polling/applications/ups-nut.inc.php @@ -42,8 +42,31 @@ if (!$ups_nut) { echo ' '.$name; -// (2016-11-25, R.Morris) Correct list and data below, to match latest ups-nut.sh script (missing one input, and misaligned). -list ($charge, $battery_low, $remaining, $bat_volt, $bat_nom, $line_nom, $input_volt, $load) = explode("\n", $ups_nut); +// (2020-05-13, Jon.W) Added ups status data and updated ups-nut.sh script. +list ( + $charge, + $battery_low, + $remaining, + $bat_volt, + $bat_nom, + $line_nom, + $input_volt, + $load, + $UPSOnLine, + $UPSOnBattery, + $UPSLowBattery, + $UPSHighBattery, + $UPSBatteryReplace, + $UPSBatteryCharging, + $UPSBatteryDischarging, + $UPSUPSBypass, + $UPSRuntimeCalibration, + $UPSOffline, + $UPSUPSOverloaded, + $UPSUPSBuck, + $UPSUPSBoost, + $UPSForcedShutdown + ) = explode("\n", $ups_nut); $rrd_name = array('app', $name, $app_id); $rrd_def = RrdDefinition::make() @@ -67,6 +90,28 @@ $fields = array( 'load' => $load ); +$sensors = [ + ['state_name' => 'UPSOnLine' , 'value' => $UPSOnLine], + ['state_name' => 'UPSOnBattery' , 'value' => $UPSOnBattery], + ['state_name' => 'UPSLowBattery' , 'value' => $UPSLowBattery], + ['state_name' => 'UPSHighBattery' , 'value' => $UPSHighBattery], + ['state_name' => 'UPSBatteryReplace' , 'value' => $UPSBatteryReplace], + ['state_name' => 'UPSBatteryCharging' , 'value' => $UPSBatteryCharging], + ['state_name' => 'UPSBatteryDischarging', 'value' => $UPSBatteryDischarging], + ['state_name' => 'UPSUPSBypass' , 'value' => $UPSUPSBypass], + ['state_name' => 'UPSRuntimeCalibration', 'value' => $UPSRuntimeCalibration], + ['state_name' => 'UPSOffline' , 'value' => $UPSOffline], + ['state_name' => 'UPSUPSOverloaded' , 'value' => $UPSUPSOverloaded], + ['state_name' => 'UPSUPSBuck' , 'value' => $UPSUPSBuck], + ['state_name' => 'UPSUPSBoost' , 'value' => $UPSUPSBoost], + ['state_name' => 'UPSForcedShutdown' , 'value' => $UPSForcedShutdown] +]; + +foreach ($sensors as $index => $sensor) { + $rrd_def->addDataset($sensor['state_name'], 'GAUGE', 0); + $fields[$sensor['state_name']]= $sensor['value']; +} + $tags = compact('name', 'app_id', 'rrd_name', 'rrd_def'); data_update($device, 'app', $tags, $fields); update_application($app, $ups_nut, $fields); diff --git a/misc/alert_rules.json b/misc/alert_rules.json index 58afb242f4..0d72832474 100644 --- a/misc/alert_rules.json +++ b/misc/alert_rules.json @@ -456,5 +456,57 @@ "name": "CustomOID under warning limit", "severity": "warning", "default": true + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSOnBattery\" AND macros.state_sensor_warning = 1", + "name": "UPS-NUT on battery" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSLowBattery\" AND macros.state_sensor_critical = 1", + "name": "UPS-NUT low battery" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSHighBattery\" AND macros.state_sensor_warning = 1", + "name": "UPS-NUT high battery" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSBatteryReplace\" AND macros.state_sensor_warning = 1", + "name": "UPS-NUT battery needs to be replaced" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSBatteryCharging\" AND macros.state_sensor_warning = 1", + "name": "UPS-NUT battery is charging" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSBatteryDischarging\" AND macros.state_sensor_warning = 1", + "name": "UPS-NUT battery is discharging" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSUPSBypass\" AND macros.state_sensor_warning = 1", + "name": "UPS-NUT bypass circuit is active" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSRuntimeCalibration\" AND macros.state_sensor_warning = 1", + "name": "UPS-NUT performing runtime calibration" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSOffline\" AND macros.state_sensor_critical = 1", + "name": "UPS-NUT offline and is not supplying power to the load" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSUPSOverloaded\" AND macros.state_sensor_critical = 1", + "name": "UPS-NUT overloaded" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSUPSBuck\" AND macros.state_sensor_warning = 1", + "name": "UPS-NUT trimming incoming voltage" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSUPSBoost\" AND macros.state_sensor_warning = 1", + "name": "UPS-NUT boosting incoming voltage" + }, + { + "rule": "applications.app_type = \"ups-nut\" AND state_indexes.state_name = \"UPSForcedShutdown\" AND macros.state_sensor_critical = 1", + "name": "UPS-NUT trimming incoming voltage" } ] diff --git a/tests/data/linux_ups-nut.json b/tests/data/linux_ups-nut.json new file mode 100644 index 0000000000..9a94695452 --- /dev/null +++ b/tests/data/linux_ups-nut.json @@ -0,0 +1,1454 @@ +{ + "os": { + "discovery": { + "devices": [ + { + "sysName": "", + "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", + "sysDescr": "Linux some.host.name 4.9.0 #1 SMP Mon Dec 12 14:44:53 CST 2016 x86_64", + "sysContact": null, + "version": null, + "hardware": null, + "features": null, + "os": "linux", + "type": "server", + "serial": null, + "icon": "linux.svg", + "location": null + } + ] + }, + "poller": { + "devices": [ + { + "sysName": "", + "sysObjectID": ".1.3.6.1.4.1.8072.3.2.10", + "sysDescr": "Linux some.host.name 4.9.0 #1 SMP Mon Dec 12 14:44:53 CST 2016 x86_64", + "sysContact": "", + "version": "4.9.0", + "hardware": "Generic x86 64-bit", + "features": null, + "os": "linux", + "type": "server", + "serial": null, + "icon": "linux.svg", + "location": "" + } + ] + } + }, + "sensors": { + "discovery": { + "sensors": [ + { + "sensor_deleted": 0, + "sensor_class": "charge", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.1", + "sensor_index": "1", + "sensor_type": "ups-nut", + "sensor_descr": "Battery Charge", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 100, + "sensor_limit": 100, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 10, + "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": "load", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.8", + "sensor_index": "8", + "sensor_type": "ups-nut", + "sensor_descr": "Ups Load", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 17, + "sensor_limit": 100, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "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": "runtime", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.3", + "sensor_index": "3", + "sensor_type": "ups-nut", + "sensor_descr": "Time Remaining", + "group": null, + "sensor_divisor": 60, + "sensor_multiplier": 1, + "sensor_current": 2280, + "sensor_limit": 1000, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "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.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.14", + "sensor_index": "14", + "sensor_type": "UPSBatteryCharging", + "sensor_descr": "UPS the battery is 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": "14", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSBatteryCharging" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.15", + "sensor_index": "15", + "sensor_type": "UPSBatteryDischarging", + "sensor_descr": "UPS the battery is discharging", + "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": "15", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSBatteryDischarging" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.13", + "sensor_index": "13", + "sensor_type": "UPSBatteryReplace", + "sensor_descr": "UPS the battery needs to be replaced", + "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": "13", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSBatteryReplace" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.22", + "sensor_index": "22", + "sensor_type": "UPSForcedShutdown", + "sensor_descr": "UPS forced shutdown", + "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": "22", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSForcedShutdown" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.12", + "sensor_index": "12", + "sensor_type": "UPSHighBattery", + "sensor_descr": "UPS high battery", + "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": "12", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSHighBattery" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.11", + "sensor_index": "11", + "sensor_type": "UPSLowBattery", + "sensor_descr": "UPS low battery", + "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": "11", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSLowBattery" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.18", + "sensor_index": "18", + "sensor_type": "UPSOffline", + "sensor_descr": "UPS is offline and is not supplying power to the load", + "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": "18", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSOffline" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.10", + "sensor_index": "10", + "sensor_type": "UPSOnBattery", + "sensor_descr": "UPS on battery", + "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": "10", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSOnBattery" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.9", + "sensor_index": "9", + "sensor_type": "UPSOnLine", + "sensor_descr": "UPS on line", + "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": "9", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSOnLine" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.17", + "sensor_index": "17", + "sensor_type": "UPSRuntimeCalibration", + "sensor_descr": "UPS is currently performing runtime calibration", + "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": "17", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSRuntimeCalibration" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.21", + "sensor_index": "21", + "sensor_type": "UPSUPSBoost", + "sensor_descr": "UPS is boosting incoming voltage", + "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": "21", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSUPSBoost" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.20", + "sensor_index": "20", + "sensor_type": "UPSUPSBuck", + "sensor_descr": "UPS is trimming incoming voltage", + "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": "20", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSUPSBuck" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.16", + "sensor_index": "16", + "sensor_type": "UPSUPSBypass", + "sensor_descr": "UPS bypass circuit is active", + "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": "16", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSUPSBypass" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.19", + "sensor_index": "19", + "sensor_type": "UPSUPSOverloaded", + "sensor_descr": "UPS is overloaded.", + "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": "19", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSUPSOverloaded" + }, + { + "sensor_deleted": 0, + "sensor_class": "voltage", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.4", + "sensor_index": "4", + "sensor_type": "ups-nut", + "sensor_descr": "Battery Voltage", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 44, + "sensor_limit": 60, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "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.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.5", + "sensor_index": "5", + "sensor_type": "ups-nut", + "sensor_descr": "Battery Nominal", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 45, + "sensor_limit": 60, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "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.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.6", + "sensor_index": "6", + "sensor_type": "ups-nut", + "sensor_descr": "Line Nominal", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 230, + "sensor_limit": 0, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "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.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.7", + "sensor_index": "7", + "sensor_type": "ups-nut", + "sensor_descr": "Input Voltage", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 252, + "sensor_limit": 280, + "sensor_limit_warn": null, + "sensor_limit_low": 200, + "sensor_limit_low_warn": 0, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + } + ], + "state_indexes": [ + { + "state_name": "UPSBatteryCharging", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSBatteryCharging", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSBatteryDischarging", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSBatteryDischarging", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSBatteryReplace", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSBatteryReplace", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSForcedShutdown", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSForcedShutdown", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "UPSHighBattery", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSHighBattery", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSLowBattery", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSLowBattery", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "UPSOffline", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSOffline", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "UPSOnBattery", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSOnBattery", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSOnLine", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 1 + }, + { + "state_name": "UPSOnLine", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 0 + }, + { + "state_name": "UPSRuntimeCalibration", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSRuntimeCalibration", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSUPSBoost", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSUPSBoost", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSUPSBuck", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSUPSBuck", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSUPSBypass", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSUPSBypass", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSUPSOverloaded", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSUPSOverloaded", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + } + ] + }, + "poller": { + "sensors": [ + { + "sensor_deleted": 0, + "sensor_class": "charge", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.1", + "sensor_index": "1", + "sensor_type": "ups-nut", + "sensor_descr": "Battery Charge", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 100, + "sensor_limit": 100, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 10, + "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": "load", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.8", + "sensor_index": "8", + "sensor_type": "ups-nut", + "sensor_descr": "Ups Load", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 17, + "sensor_limit": 100, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "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": "runtime", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.3", + "sensor_index": "3", + "sensor_type": "ups-nut", + "sensor_descr": "Time Remaining", + "group": null, + "sensor_divisor": 60, + "sensor_multiplier": 1, + "sensor_current": 38, + "sensor_limit": 1000, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": 2280, + "user_func": null, + "state_name": null + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.14", + "sensor_index": "14", + "sensor_type": "UPSBatteryCharging", + "sensor_descr": "UPS the battery is 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": "14", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSBatteryCharging" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.15", + "sensor_index": "15", + "sensor_type": "UPSBatteryDischarging", + "sensor_descr": "UPS the battery is discharging", + "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": "15", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSBatteryDischarging" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.13", + "sensor_index": "13", + "sensor_type": "UPSBatteryReplace", + "sensor_descr": "UPS the battery needs to be replaced", + "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": "13", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSBatteryReplace" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.22", + "sensor_index": "22", + "sensor_type": "UPSForcedShutdown", + "sensor_descr": "UPS forced shutdown", + "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": "22", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSForcedShutdown" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.12", + "sensor_index": "12", + "sensor_type": "UPSHighBattery", + "sensor_descr": "UPS high battery", + "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": "12", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSHighBattery" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.11", + "sensor_index": "11", + "sensor_type": "UPSLowBattery", + "sensor_descr": "UPS low battery", + "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": "11", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSLowBattery" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.18", + "sensor_index": "18", + "sensor_type": "UPSOffline", + "sensor_descr": "UPS is offline and is not supplying power to the load", + "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": "18", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSOffline" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.10", + "sensor_index": "10", + "sensor_type": "UPSOnBattery", + "sensor_descr": "UPS on battery", + "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": "10", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSOnBattery" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.9", + "sensor_index": "9", + "sensor_type": "UPSOnLine", + "sensor_descr": "UPS on line", + "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": "9", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSOnLine" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.17", + "sensor_index": "17", + "sensor_type": "UPSRuntimeCalibration", + "sensor_descr": "UPS is currently performing runtime calibration", + "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": "17", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSRuntimeCalibration" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.21", + "sensor_index": "21", + "sensor_type": "UPSUPSBoost", + "sensor_descr": "UPS is boosting incoming voltage", + "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": "21", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSUPSBoost" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.20", + "sensor_index": "20", + "sensor_type": "UPSUPSBuck", + "sensor_descr": "UPS is trimming incoming voltage", + "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": "20", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSUPSBuck" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.16", + "sensor_index": "16", + "sensor_type": "UPSUPSBypass", + "sensor_descr": "UPS bypass circuit is active", + "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": "16", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSUPSBypass" + }, + { + "sensor_deleted": 0, + "sensor_class": "state", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.19", + "sensor_index": "19", + "sensor_type": "UPSUPSOverloaded", + "sensor_descr": "UPS is overloaded.", + "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": "19", + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": "UPSUPSOverloaded" + }, + { + "sensor_deleted": 0, + "sensor_class": "voltage", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.4", + "sensor_index": "4", + "sensor_type": "ups-nut", + "sensor_descr": "Battery Voltage", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 44, + "sensor_limit": 60, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "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.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.5", + "sensor_index": "5", + "sensor_type": "ups-nut", + "sensor_descr": "Battery Nominal", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 45, + "sensor_limit": 60, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "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.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.6", + "sensor_index": "6", + "sensor_type": "ups-nut", + "sensor_descr": "Line Nominal", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 230, + "sensor_limit": 0, + "sensor_limit_warn": null, + "sensor_limit_low": 0, + "sensor_limit_low_warn": 0, + "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.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.7", + "sensor_index": "7", + "sensor_type": "ups-nut", + "sensor_descr": "Input Voltage", + "group": null, + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 252, + "sensor_limit": 280, + "sensor_limit_warn": null, + "sensor_limit_low": 200, + "sensor_limit_low_warn": 0, + "sensor_alert": 1, + "sensor_custom": "No", + "entPhysicalIndex": null, + "entPhysicalIndex_measured": null, + "sensor_prev": null, + "user_func": null, + "state_name": null + } + ], + "state_indexes": [ + { + "state_name": "UPSBatteryCharging", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSBatteryCharging", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSBatteryDischarging", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSBatteryDischarging", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSBatteryReplace", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSBatteryReplace", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSForcedShutdown", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSForcedShutdown", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "UPSHighBattery", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSHighBattery", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSLowBattery", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSLowBattery", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "UPSOffline", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSOffline", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "UPSOnBattery", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSOnBattery", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSOnLine", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 1 + }, + { + "state_name": "UPSOnLine", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 0 + }, + { + "state_name": "UPSRuntimeCalibration", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSRuntimeCalibration", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSUPSBoost", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSUPSBoost", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSUPSBuck", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSUPSBuck", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSUPSBypass", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSUPSBypass", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 1 + }, + { + "state_name": "UPSUPSOverloaded", + "state_descr": "False", + "state_draw_graph": 1, + "state_value": 0, + "state_generic_value": 0 + }, + { + "state_name": "UPSUPSOverloaded", + "state_descr": "True", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + } + ] + } + } +} diff --git a/tests/snmpsim/linux_ups-nut.snmprec b/tests/snmpsim/linux_ups-nut.snmprec new file mode 100644 index 0000000000..584b2e1d72 --- /dev/null +++ b/tests/snmpsim/linux_ups-nut.snmprec @@ -0,0 +1,27 @@ +1.3.6.1.2.1.1.1.0|4|Linux some.host.name 4.9.0 #1 SMP Mon Dec 12 14:44:53 CST 2016 x86_64 +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10 +1.3.6.1.2.1.1.3.0|67|17827727 +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.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.1|4|100 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.3|4|2280 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.4|4|44 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.5|4|45 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.6|4|230 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.7|4|252.0 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.8|4|17 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.9|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.10|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.11|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.12|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.13|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.14|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.15|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.16|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.17|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.18|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.19|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.20|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.21|4|1 +1.3.6.1.4.1.8072.1.3.2.4.1.2.7.117.112.115.45.110.117.116.22|4|1