From c85b1c6da798942ab5a81660e39ebab29d057c17 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Thu, 9 Apr 2026 12:39:14 -0700 Subject: [PATCH 1/5] refactor: add strict typing across apcupsd plugin --- database.php | 2 ++ index.php | 2 ++ locales/index.php | 2 ++ setup.php | 2 ++ upses.php | 2 ++ 5 files changed, 10 insertions(+) diff --git a/database.php b/database.php index a58037b..3b3e1f8 100644 --- a/database.php +++ b/database.php @@ -1,5 +1,7 @@ array( 'db_column' => 'ups_alarmdel', diff --git a/index.php b/index.php index b97b997..e6a703c 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,5 @@ Date: Thu, 9 Apr 2026 12:42:22 -0700 Subject: [PATCH 2/5] refactor: safe PHP 7.4 modernization for apcupsd plugin --- database.php | 900 +++------------------------------------------ poller_apcupsd.php | 48 ++- setup.php | 12 +- upses.php | 92 ++--- 4 files changed, 97 insertions(+), 955 deletions(-) diff --git a/database.php b/database.php index 3b3e1f8..c8fc72f 100644 --- a/database.php +++ b/database.php @@ -37,12 +37,7 @@ 'db_column' => 'ups_battery_status', 'snmp_ci' => '.1.3.6.1.4.1.318.1.1.1.2.1.1.0', 'description' => __esc('Battery status.', 'apcupsd'), - 'snmp_enum' => array( - 1 => 'Unknown', - 2 => 'Normal', - 3 => 'Low', - 4 => 'Fault' - ) + 'snmp_enum' => [] ), 'BATTV' => array( 'db_column' => 'ups_battery_voltage', @@ -258,25 +253,13 @@ 'db_column' => 'ups_selftest', 'snmp_ci' => '.1.3.6.1.2.1.33.1.7.3.0', 'description' => __esc('Date and time of last self test since apcupsd startup', 'apcupsd'), - 'snmp_enum' => array( - 1 => 'Ok', - 2 => 'Warning', - 3 => 'Error', - 4 => 'Aborted', - 5 => 'InProgress', - 6 => 'Disabled' - ) + 'snmp_enum' => [] ), 'SENSE' => array( 'db_column' => 'ups_sense', 'snmp_ci' => '1.3.6.1.4.1.318.1.1.1.5.2.7.0', 'description' => __esc('Current UPS sensitivity setting for voltage fluctuations', 'apcupsd'), - 'snmp_enum' => array( - 1 => 'Auto', - 2 => 'Low', - 3 => 'Medium', - 4 => 'High' - ) + 'snmp_enum' => [] ), 'SERIALNO' => array( 'db_column' => 'ups_serialno', @@ -297,24 +280,7 @@ 'db_column' => 'ups_status', 'snmp_ci' => '.1.3.6.1.4.1.318.1.1.1.4.1.1.0', 'description' => __esc('UPS status. One or more of the following (space-separated): CAL TRIM BOOST ONLINE ONBATT OVERLOAD LOWBATT REPLACEBATT NOBATT SLAVE SLAVEDOWN or COMMLOST or SHUTTING DOWN', 'apcupsd'), - 'snmp_enum' => array( - 1 => 'UNKNOWN', - 2 => 'ONLINE', - 3 => 'ONBATT', - 4 => 'BOOST', - 5 => 'SLEEPING', - 6 => 'BYPASS', - 7 => 'OFF', - 8 => 'REBOOTING', - 9 => 'SWITCHBYPASS', - 10 => 'HARDWAREBYPASS', - 11 => 'SLEEPING', - 12 => 'TRIM', - 13 => 'ECOMODE', - 14 => 'INVERTER', - 15 => 'ECONVERSION', - 16 => 'STATICBYPASS' - ) + 'snmp_enum' => [] ), 'LASTSTEST' => array( 'db_column' => 'ups_laststest', @@ -325,20 +291,7 @@ 'db_column' => 'ups_selftest_interval', 'snmp_ci' => '.1.3.6.1.4.1.318.1.1.1.7.2.1.0', 'description' => __esc('Self-test interval', 'apcupsd'), - 'snmp_enum' => array( - 1 => 'UNKNOWN', - 2 => 'BIWEEKLY', - 3 => 'WEEKLY', - 4 => 'POWERON', - 5 => 'NEVER', - 6 => 'FOURWEEKS', - 7 => 'TWELVEWEEKS', - 8 => 'BIWEEKLYLAST', - 9 => 'WEEKLYLAST', - 10 => 'EIGHTWEEKS', - 11 => 'HALFYEAR', - 12 => 'YEARLY' - ) + 'snmp_enum' => [] ), 'TIMELEFT' => array( 'db_column' => 'ups_timeleft', @@ -391,825 +344,58 @@ * Source: src/drivers/snmplite/apc-oids.h */ $apc_snmp_config = array( - 'CI_UPSMODEL' => array( - 'oid' => 'upsmgIdentFamilyName', - 'type' => 'OCTETSTRING', - 'dyn' => false, - ), - 'CI_STATUS' => array( - 'oid' => 'upsmgOutputOnBattery', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_WHY_BATT' => array( - 'oid' => 'upsmgInputLineFailCause', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_ST_STAT' => array( - 'oid' => 'upsmgTestDiagResult', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_VLINE' => array( - 'oid' => 'mginputVoltage', - 'type' => 'SEQUENCE', - 'dyn' => true, - ), - 'CI_VMAX' => array( - 'oid' => 'mginputMaximumVoltage', - 'type' => 'SEQUENCE', - 'dyn' => true, - ), - 'CI_VMIN' => array( - 'oid' => 'mginputMinimumVoltage', - 'type' => 'SEQUENCE', - 'dyn' => true, - ), - 'CI_VOUT' => array( - 'oid' => 'mgoutputVoltage', - 'type' => 'SEQUENCE', - 'dyn' => true, - ), - 'CI_BATTLEV' => array( - 'oid' => 'upsmgBatteryLevel', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_VBATT' => array( - 'oid' => 'upsmgBatteryVoltage', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_LOAD' => array( - 'oid' => 'mgoutputLoadPerPhase', - 'type' => 'SEQUENCE', - 'dyn' => true, - ), - 'CI_FREQ' => array( - 'oid' => 'mginputFrequency', - 'type' => 'SEQUENCE', - 'dyn' => true, - ), - 'CI_RUNTIM' => array( - 'oid' => 'upsmgBatteryRemainingTime', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_ITEMP' => array( - 'oid' => 'upsmgBatteryTemperature', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_DWAKE' => array( - 'oid' => 'mgreceptacleRestartDelay', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_DSHUTD' => array( - 'oid' => 'upsmgConfigSysShutDuration', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_LTRANS' => array( - 'oid' => 'upsmgConfigLowTransfer', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_HTRANS' => array( - 'oid' => 'upsmgConfigHighTransfer', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_RETPCT' => array( - 'oid' => 'upsmgConfigMinRechargeLevel', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_AlarmTimer' => array( - 'oid' => 'upsmgConfigAlarmTimeDelay', - 'type' => 'INTEGER', - 'dyn' => false, // before CI_DALARM ! - ), - 'CI_DALARM' => array( - 'oid' => 'upsmgConfigAlarmAudible', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_DLBATT' => array( - 'oid' => 'upsmgConfigLowBatteryTime', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_IDEN' => array( - 'oid' => 'upsmgIdentModelName', - 'type' => 'OCTETSTRING', - 'dyn' => false, - ), - 'CI_STESTI' => array( - 'oid' => 'upsmgTestBatterySchedule', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_SERNO' => array( - 'oid' => 'upsmgIdentSerialNumber', - 'type' => 'OCTETSTRING', - 'dyn' => false, - ), - 'CI_NOMBATTV' => array( - 'oid' => 'upsmgConfigNominalBatteryVoltage', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_HUMID' => array( - 'oid' => 'upsmgEnvironAmbientHumidity', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_REVNO' => array( - 'oid' => 'upsmgIdentFirmwareVersion', - 'type' => 'OCTETSTRING', - 'dyn' => false, // Version + SN of net card - ), - 'CI_ATEMP' => array( - 'oid' => 'upsmgEnvironAmbientTemp', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_NOMOUTV' => array( - 'oid' => 'upsmgConfigOutputNominalVoltage', - 'type' => 'INTEGER', - 'dyn' => false, - ), - 'CI_Boost' => array( - 'oid' => 'upsmgOutputOnBoost', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_Trim' => array( - 'oid' => 'upsmgOutputOnBuck', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_Overload' => array( - 'oid' => 'upsmgOutputOverLoad', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_NeedReplacement' => array( - 'oid' => 'upsmgBatteryReplacement', - 'type' => 'INTEGER', - 'dyn' => true, - ), - 'CI_LowBattery' => array( - 'oid' => 'upsmgBatteryLowBattery', - 'type' => 'INTEGER', - 'dyn' => true, - ) + 'CI_UPSMODEL' => [], + 'CI_STATUS' => [], + 'CI_WHY_BATT' => [], + 'CI_ST_STAT' => [], + 'CI_VLINE' => [], + 'CI_VMAX' => [], + 'CI_VMIN' => [], + 'CI_VOUT' => [], + 'CI_BATTLEV' => [], + 'CI_VBATT' => [], + 'CI_LOAD' => [], + 'CI_FREQ' => [], + 'CI_RUNTIM' => [], + 'CI_ITEMP' => [], + 'CI_DWAKE' => [], + 'CI_DSHUTD' => [], + 'CI_LTRANS' => [], + 'CI_HTRANS' => [], + 'CI_RETPCT' => [], + 'CI_AlarmTimer' => [], + 'CI_DALARM' => [], + 'CI_DLBATT' => [], + 'CI_IDEN' => [], + 'CI_STESTI' => [], + 'CI_SERNO' => [], + 'CI_NOMBATTV' => [], + 'CI_HUMID' => [], + 'CI_REVNO' => [], + 'CI_ATEMP' => [], + 'CI_NOMOUTV' => [], + 'CI_Boost' => [], + 'CI_Trim' => [], + 'CI_Overload' => [], + 'CI_NeedReplacement' => [], + 'CI_LowBattery' => [] ); /** * APC UPSD OID Cross Reference * Source: src/drivers/snmplite/apc-oids.h */ -$apc_oids = array( - 'upsBasicIdentModel' => '1.3.6.1.4.1.318.1.1.1.1.1.1', - 'upsBasicIdentName' => '1.3.6.1.4.1.318.1.1.1.1.1.2', - 'upsAdvIdentFirmwareRevision' => '1.3.6.1.4.1.318.1.1.1.1.2.1', - 'upsAdvIdentDateOfManufacture' => '1.3.6.1.4.1.318.1.1.1.1.2.2', - 'upsAdvIdentSerialNumber' => '1.3.6.1.4.1.318.1.1.1.1.2.3', - 'upsAdvIdentFirmwareRevision2' => '1.3.6.1.4.1.318.1.1.1.1.2.4', - 'upsAdvIdentSkuNumber' => '1.3.6.1.4.1.318.1.1.1.1.2.5', - 'upsBasicBatteryStatus' => '1.3.6.1.4.1.318.1.1.1.2.1.1', - 'upsBasicBatteryTimeOnBattery' => '1.3.6.1.4.1.318.1.1.1.2.1.2', - 'upsBasicBatteryLastReplaceDate' => '1.3.6.1.4.1.318.1.1.1.2.1.3', - 'upsAdvBatteryCapacity' => '1.3.6.1.4.1.318.1.1.1.2.2.1', - 'upsAdvBatteryTemperature' => '1.3.6.1.4.1.318.1.1.1.2.2.2', - 'upsAdvBatteryRunTimeRemaining' => '1.3.6.1.4.1.318.1.1.1.2.2.3', - 'upsAdvBatteryReplaceIndicator' => '1.3.6.1.4.1.318.1.1.1.2.2.4', - 'upsAdvBatteryNumOfBattPacks' => '1.3.6.1.4.1.318.1.1.1.2.2.5', - 'upsAdvBatteryNumOfBadBattPacks' => '1.3.6.1.4.1.318.1.1.1.2.2.6', - 'upsAdvBatteryNominalVoltage' => '1.3.6.1.4.1.318.1.1.1.2.2.7', - 'upsAdvBatteryActualVoltage' => '1.3.6.1.4.1.318.1.1.1.2.2.8', - 'upsAdvBatteryCurrent' => '1.3.6.1.4.1.318.1.1.1.2.2.9', - 'upsAdvTotalDCCurrent' => '1.3.6.1.4.1.318.1.1.1.2.2.10', - 'upsHighPrecBatteryCapacity' => '1.3.6.1.4.1.318.1.1.1.2.3.1', - 'upsHighPrecBatteryTemperature' => '1.3.6.1.4.1.318.1.1.1.2.3.2', - 'upsHighPrecBatteryNominalVoltage' => '1.3.6.1.4.1.318.1.1.1.2.3.3', - 'upsHighPrecBatteryActualVoltage' => '1.3.6.1.4.1.318.1.1.1.2.3.4', - 'upsHighPrecBatteryCurrent' => '1.3.6.1.4.1.318.1.1.1.2.3.5', - 'upsHighPrecTotalDCCurrent' => '1.3.6.1.4.1.318.1.1.1.2.3.6', - 'upsBasicInputPhase' => '1.3.6.1.4.1.318.1.1.1.3.1.1', - 'upsAdvInputLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.2.1', - 'upsAdvInputMaxLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.2.2', - 'upsAdvInputMinLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.2.3', - 'upsAdvInputFrequency' => '1.3.6.1.4.1.318.1.1.1.3.2.4', - 'upsAdvInputLineFailCause' => '1.3.6.1.4.1.318.1.1.1.3.2.5', - 'upsHighPrecInputLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.3.1', - 'upsHighPrecInputMaxLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.3.2', - 'upsHighPrecInputMinLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.3.3', - 'upsHighPrecInputFrequency' => '1.3.6.1.4.1.318.1.1.1.3.3.4', - 'upsBasicOutputStatus' => '1.3.6.1.4.1.318.1.1.1.4.1.1', - 'upsBasicOutputPhase' => '1.3.6.1.4.1.318.1.1.1.4.1.2', - 'upsBasicSystemStatus' => '1.3.6.1.4.1.318.1.1.1.4.1.3', - 'upsAdvOutputVoltage' => '1.3.6.1.4.1.318.1.1.1.4.2.1', - 'upsAdvOutputFrequency' => '1.3.6.1.4.1.318.1.1.1.4.2.2', - 'upsAdvOutputLoad' => '1.3.6.1.4.1.318.1.1.1.4.2.3', - 'upsAdvOutputCurrent' => '1.3.6.1.4.1.318.1.1.1.4.2.4', - 'upsAdvOutputRedundancy' => '1.3.6.1.4.1.318.1.1.1.4.2.5', - 'upsAdvOutputKVACapacity' => '1.3.6.1.4.1.318.1.1.1.4.2.6', - 'upsHighPrecOutputVoltage' => '1.3.6.1.4.1.318.1.1.1.4.3.1', - 'upsHighPrecOutputFrequency' => '1.3.6.1.4.1.318.1.1.1.4.3.2', - 'upsHighPrecOutputLoad' => '1.3.6.1.4.1.318.1.1.1.4.3.3', - 'upsHighPrecOutputCurrent' => '1.3.6.1.4.1.318.1.1.1.4.3.4', - 'upsBasicConfigNumDevices' => '1.3.6.1.4.1.318.1.1.1.5.1.1', - 'upsBasicConfigDeviceTableDeviceIndex' => '1.3.6.1.4.1.318.1.1.1.5.1.2.1.1', - 'upsBasicConfigDeviceTableDeviceName' => '1.3.6.1.4.1.318.1.1.1.5.1.2.1.2', - 'upsBasicConfigDeviceTableVaRating' => '1.3.6.1.4.1.318.1.1.1.5.1.2.1.3', - 'upsBasicConfigDeviceTableAcceptThisDevice' => '1.3.6.1.4.1.318.1.1.1.5.1.2.1.4', - 'upsAdvConfigRatedOutputVoltage' => '1.3.6.1.4.1.318.1.1.1.5.2.1', - 'upsAdvConfigHighTransferVolt' => '1.3.6.1.4.1.318.1.1.1.5.2.2', - 'upsAdvConfigLowTransferVolt' => '1.3.6.1.4.1.318.1.1.1.5.2.3', - 'upsAdvConfigAlarm' => '1.3.6.1.4.1.318.1.1.1.5.2.4', - 'upsAdvConfigAlarmTimer' => '1.3.6.1.4.1.318.1.1.1.5.2.5', - 'upsAdvConfigMinReturnCapacity' => '1.3.6.1.4.1.318.1.1.1.5.2.6', - 'upsAdvConfigSensitivity' => '1.3.6.1.4.1.318.1.1.1.5.2.7', - 'upsAdvConfigLowBatteryRunTime' => '1.3.6.1.4.1.318.1.1.1.5.2.8', - 'upsAdvConfigReturnDelay' => '1.3.6.1.4.1.318.1.1.1.5.2.9', - 'upsAdvConfigShutoffDelay' => '1.3.6.1.4.1.318.1.1.1.5.2.10', - 'upsAdvConfigUpsSleepTime' => '1.3.6.1.4.1.318.1.1.1.5.2.11', - 'upsAdvConfigSetEEPROMDefaults' => '1.3.6.1.4.1.318.1.1.1.5.2.12', - 'upsAdvConfigDipSwitchSettingDipSwitchIndex' => '1.3.6.1.4.1.318.1.1.1.5.2.13.1.1', - 'upsAdvConfigDipSwitchSettingDipSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.5.2.13.1.2', - 'upsAdvConfigBattExhaustThresh' => '1.3.6.1.4.1.318.1.1.1.5.2.14', - 'upsAdvConfigPassword' => '1.3.6.1.4.1.318.1.1.1.5.2.15', - 'apcUpsConfigFieldIndex' => '1.3.6.1.4.1.318.1.1.1.5.2.16.1.1', - 'apcUpsConfigFieldOID' => '1.3.6.1.4.1.318.1.1.1.5.2.16.1.2', - 'apcUpsConfigFieldValueRange' => '1.3.6.1.4.1.318.1.1.1.5.2.16.1.3', - 'upsAdvConfigBattCabAmpHour' => '1.3.6.1.4.1.318.1.1.1.5.2.17', - 'upsAdvConfigPositionSelector' => '1.3.6.1.4.1.318.1.1.1.5.2.18', - 'upsAdvConfigOutputFreqRange' => '1.3.6.1.4.1.318.1.1.1.5.2.19', - 'upsAdvConfigUPSFail' => '1.3.6.1.4.1.318.1.1.1.5.2.20', - 'upsAdvConfigAlarmRedundancy' => '1.3.6.1.4.1.318.1.1.1.5.2.21', - 'upsAdvConfigAlarmLoadOver' => '1.3.6.1.4.1.318.1.1.1.5.2.22', - 'upsAdvConfigAlarmRuntimeUnder' => '1.3.6.1.4.1.318.1.1.1.5.2.23', - 'upsAdvConfigVoutReporting' => '1.3.6.1.4.1.318.1.1.1.5.2.24', - 'upsAdvConfigNumExternalBatteries' => '1.3.6.1.4.1.318.1.1.1.5.2.25', - 'upsAdvConfigSimpleSignalShutdowns' => '1.3.6.1.4.1.318.1.1.1.5.2.26', - 'upsAdvConfigMaxShutdownTime' => '1.3.6.1.4.1.318.1.1.1.5.2.27', - 'upsAsiUpsControlServerRequestShutdown' => '1.3.6.1.4.1.318.1.1.1.5.2.28', - 'upsAdvConfigMinReturnRuntime' => '1.3.6.1.4.1.318.1.1.1.5.2.29', - 'upsAdvConfigBasicSignalLowBatteryDuration' => '1.3.6.1.4.1.318.1.1.1.5.2.30', - 'upsAdvConfigBypassPhaseLockRequired' => '1.3.6.1.4.1.318.1.1.1.5.2.31', - 'upsAdvConfigOutputFreqSlewRate' => '1.3.6.1.4.1.318.1.1.1.5.2.32', - 'upsAdvConfigChargerLevel' => '1.3.6.1.4.1.318.1.1.1.5.2.33', - 'upsAdvConfigBypassToleranceSetting' => '1.3.6.1.4.1.318.1.1.1.5.2.34', - 'upsAdvConfigMainsSetting' => '1.3.6.1.4.1.318.1.1.1.5.2.35', - 'upsAdvConfigACWiringSetting' => '1.3.6.1.4.1.318.1.1.1.5.2.36', - 'upsAdvConfigUpperOutputVoltTolerance' => '1.3.6.1.4.1.318.1.1.1.5.2.37', - 'upsAdvConfigLowerOutputVoltTolerance' => '1.3.6.1.4.1.318.1.1.1.5.2.38', - 'upsAdvConfigUpperBypassVoltTolerance' => '1.3.6.1.4.1.318.1.1.1.5.2.39', - 'upsAdvConfigLowerBypassVoltTolerance' => '1.3.6.1.4.1.318.1.1.1.5.2.40', - 'upsAdvConfigOutofSyncBypassTransferDelay' => '1.3.6.1.4.1.318.1.1.1.5.2.41', - 'upsBasicControlConserveBattery' => '1.3.6.1.4.1.318.1.1.1.6.1.1', - 'upsAdvControlUpsOff' => '1.3.6.1.4.1.318.1.1.1.6.2.1', - 'upsAdvControlRebootShutdownUps' => '1.3.6.1.4.1.318.1.1.1.6.2.2', - 'upsAdvControlUpsSleep' => '1.3.6.1.4.1.318.1.1.1.6.2.3', - 'upsAdvControlSimulatePowerFail' => '1.3.6.1.4.1.318.1.1.1.6.2.4', - 'upsAdvControlFlashAndBeep' => '1.3.6.1.4.1.318.1.1.1.6.2.5', - 'upsAdvControlTurnOnUPS' => '1.3.6.1.4.1.318.1.1.1.6.2.6', - 'upsAdvControlBypassSwitch' => '1.3.6.1.4.1.318.1.1.1.6.2.7', - 'upsAdvControlRebootUpsWithOrWithoutAC' => '1.3.6.1.4.1.318.1.1.1.6.2.8', - 'upsAdvControlFirmwareUpdate' => '1.3.6.1.4.1.318.1.1.1.6.2.9', - 'upsAdvTestDiagnosticSchedule' => '1.3.6.1.4.1.318.1.1.1.7.2.1', - 'upsAdvTestDiagnostics' => '1.3.6.1.4.1.318.1.1.1.7.2.2', - 'upsAdvTestDiagnosticsResults' => '1.3.6.1.4.1.318.1.1.1.7.2.3', - 'upsAdvTestLastDiagnosticsDate' => '1.3.6.1.4.1.318.1.1.1.7.2.4', - 'upsAdvTestRuntimeCalibration' => '1.3.6.1.4.1.318.1.1.1.7.2.5', - 'upsAdvTestCalibrationResults' => '1.3.6.1.4.1.318.1.1.1.7.2.6', - 'upsAdvTestCalibrationDate' => '1.3.6.1.4.1.318.1.1.1.7.2.7', - 'upsAdvTestDiagnosticTime' => '1.3.6.1.4.1.318.1.1.1.7.2.8', - 'upsAdvTestDiagnosticDay' => '1.3.6.1.4.1.318.1.1.1.7.2.9', - 'upsCommStatus' => '1.3.6.1.4.1.318.1.1.1.8.1', - 'upsPhaseResetMaxMinValues' => '1.3.6.1.4.1.318.1.1.1.9.1.1', - 'upsPhaseNumInputs' => '1.3.6.1.4.1.318.1.1.1.9.2.1', - 'upsPhaseInputTableIndex' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.1', - 'upsPhaseNumInputPhases' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.2', - 'upsPhaseInputVoltageOrientation' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.3', - 'upsPhaseInputFrequency' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.4', - 'upsPhaseInputType' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.5', - 'upsPhaseInputName' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.6', - 'upsPhaseInputPhaseTableIndex' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.1', - 'upsPhaseInputPhaseIndex' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.2', - 'upsPhaseInputVoltage' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.3', - 'upsPhaseInputMaxVoltage' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.4', - 'upsPhaseInputMinVoltage' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.5', - 'upsPhaseInputCurrent' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.6', - 'upsPhaseInputMaxCurrent' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.7', - 'upsPhaseInputMinCurrent' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.8', - 'upsPhaseInputPower' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.9', - 'upsPhaseInputMaxPower' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.10', - 'upsPhaseInputMinPower' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.11', - 'upsPhaseNumOutputs' => '1.3.6.1.4.1.318.1.1.1.9.3.1', - 'upsPhaseOutputTableIndex' => '1.3.6.1.4.1.318.1.1.1.9.3.2.1.1', - 'upsPhaseNumOutputPhases' => '1.3.6.1.4.1.318.1.1.1.9.3.2.1.2', - 'upsPhaseOutputVoltageOrientation' => '1.3.6.1.4.1.318.1.1.1.9.3.2.1.3', - 'upsPhaseOutputFrequency' => '1.3.6.1.4.1.318.1.1.1.9.3.2.1.4', - 'upsPhaseOutputPhaseTableIndex' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.1', - 'upsPhaseOutputPhaseIndex' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.2', - 'upsPhaseOutputVoltage' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.3', - 'upsPhaseOutputCurrent' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.4', - 'upsPhaseOutputMaxCurrent' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.5', - 'upsPhaseOutputMinCurrent' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.6', - 'upsPhaseOutputLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.7', - 'upsPhaseOutputMaxLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.8', - 'upsPhaseOutputMinLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.9', - 'upsPhaseOutputPercentLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.10', - 'upsPhaseOutputMaxPercentLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.11', - 'upsPhaseOutputMinPercentLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.12', - 'upsPhaseOutputPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.13', - 'upsPhaseOutputMaxPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.14', - 'upsPhaseOutputMinPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.15', - 'upsPhaseOutputPercentPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.16', - 'upsPhaseOutputMaxPercentPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.17', - 'upsPhaseOutputMinPercentPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.18', - 'upsSCGMembershipGroupNumber' => '1.3.6.1.4.1.318.1.1.1.10.1.1', - 'upsSCGActiveMembershipStatus' => '1.3.6.1.4.1.318.1.1.1.10.1.2', - 'upsSCGPowerSynchronizationDelayTime' => '1.3.6.1.4.1.318.1.1.1.10.1.3', - 'upsSCGReturnBatteryCapacityOffset' => '1.3.6.1.4.1.318.1.1.1.10.1.4', - 'upsSCGMultiCastIP' => '1.3.6.1.4.1.318.1.1.1.10.1.5', - 'upsSCGNumOfGroupMembers' => '1.3.6.1.4.1.318.1.1.1.10.2.1', - 'upsSCGStatusTableIndex' => '1.3.6.1.4.1.318.1.1.1.10.2.2.1.1', - 'upsSCGMemberIP' => '1.3.6.1.4.1.318.1.1.1.10.2.2.1.2', - 'upsSCGACInputStatus' => '1.3.6.1.4.1.318.1.1.1.10.2.2.1.3', - 'upsSCGACOutputStatus' => '1.3.6.1.4.1.318.1.1.1.10.2.2.1.4', - 'upsBasicStateOutputState' => '1.3.6.1.4.1.318.1.1.1.11.1.1', - 'upsAdvStateAbnormalConditions' => '1.3.6.1.4.1.318.1.1.1.11.2.1', - 'upsAdvStateSymmetra3PhaseSpecificFaults' => '1.3.6.1.4.1.318.1.1.1.11.2.2', - 'upsAdvStateDP300ESpecificFaults' => '1.3.6.1.4.1.318.1.1.1.11.2.3', - 'upsAdvStateSymmetraSpecificFaults' => '1.3.6.1.4.1.318.1.1.1.11.2.4', - 'upsAdvStateSmartUPSSpecificFaults' => '1.3.6.1.4.1.318.1.1.1.11.2.5', - 'upsAdvStateSystemMessages' => '1.3.6.1.4.1.318.1.1.1.11.2.6', - 'upsOutletGroupStatusTableSize' => '1.3.6.1.4.1.318.1.1.1.12.1.1', - 'upsOutletGroupStatusIndex' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.1', - 'upsOutletGroupStatusName' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.2', - 'upsOutletGroupStatusGroupState' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.3', - 'upsOutletGroupStatusCommandPending' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.4', - 'upsOutletGroupStatusOutletType' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.5', - 'upsOutletGroupConfigTableSize' => '1.3.6.1.4.1.318.1.1.1.12.2.1', - 'upsOutletGroupConfigIndex' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.1', - 'upsOutletGroupConfigName' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.2', - 'upsOutletGroupConfigPowerOnDelay' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.3', - 'upsOutletGroupConfigPowerOffDelay' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.4', - 'upsOutletGroupConfigRebootDuration' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.5', - 'upsOutletGroupConfigMinReturnRuntime' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.6', - 'upsOutletGroupConfigOutletType' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.7', - 'upsOutletGroupConfigLoadShedControlSkipOffDelay' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.8', - 'upsOutletGroupConfigLoadShedControlAutoRestart' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.9', - 'upsOutletGroupConfigLoadShedControlTimeOnBattery' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.10', - 'upsOutletGroupConfigLoadShedControlRuntimeRemaining' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.11', - 'upsOutletGroupConfigLoadShedControlInOverload' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.12', - 'upsOutletGroupConfigLoadShedTimeOnBattery' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.13', - 'upsOutletGroupConfigLoadShedRuntimeRemaining' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.14', - 'upsOutletGroupControlTableSize' => '1.3.6.1.4.1.318.1.1.1.12.3.1', - 'upsOutletGroupControlIndex' => '1.3.6.1.4.1.318.1.1.1.12.3.2.1.1', - 'upsOutletGroupControlName' => '1.3.6.1.4.1.318.1.1.1.12.3.2.1.2', - 'upsOutletGroupControlCommand' => '1.3.6.1.4.1.318.1.1.1.12.3.2.1.3', - 'upsOutletGroupControlOutletType' => '1.3.6.1.4.1.318.1.1.1.12.3.2.1.4', - 'upsDiagIMTableSize' => '1.3.6.1.4.1.318.1.1.1.13.1.1', - 'upsDiagIMIndex' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.1', - 'upsDiagIMType' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.2', - 'upsDiagIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.3', - 'upsDiagIMFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.4', - 'upsDiagIMSlaveFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.5', - 'upsDiagIMHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.6', - 'upsDiagIMSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.7', - 'upsDiagIMManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.8', - 'upsDiagPMTableSize' => '1.3.6.1.4.1.318.1.1.1.13.2.1', - 'upsDiagPMIndex' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.1', - 'upsDiagPMStatus' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.2', - 'upsDiagPMFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.3', - 'upsDiagPMHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.4', - 'upsDiagPMSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.5', - 'upsDiagPMManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.6', - 'upsDiagBatteryTableSize' => '1.3.6.1.4.1.318.1.1.1.13.3.1', - 'upsDiagBatteryFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.1', - 'upsDiagBatteryIndex' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.2', - 'upsDiagBatteryStatus' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.3', - 'upsDiagBatterySerialNumber' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.4', - 'upsDiagBatteryFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.5', - 'upsDiagBatteryManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.6', - 'upsDiagBatteryType' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.7', - 'upsDiagSubSysFrameTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.1', - 'upsDiagSubSysFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.1', - 'upsDiagSubSysFrameType' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.2', - 'upsDiagSubSysFrameFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.3', - 'upsDiagSubSysFrameHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.4', - 'upsDiagSubSysFrameSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.5', - 'upsDiagSubSysFrameManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.6', - 'upsDiagSubSysIntBypSwitchTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.3', - 'upsDiagSubSysIntBypSwitchFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.1', - 'upsDiagSubSysIntBypSwitchIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.2', - 'upsDiagSubSysIntBypSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.3', - 'upsDiagSubSysIntBypSwitchFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.4', - 'upsDiagSubSysIntBypSwitchHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.5', - 'upsDiagSubSysIntBypSwitchSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.6', - 'upsDiagSubSysIntBypSwitchManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.7', - 'upsDiagSubSysBattMonitorTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.5', - 'upsDiagSubSysBattMonitorFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.1', - 'upsDiagSubSysBattMonitorIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.2', - 'upsDiagSubSysBattMonitorStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.3', - 'upsDiagSubSysBattMonitorFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.4', - 'upsDiagSubSysBattMonitorHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.5', - 'upsDiagSubSysBattMonitorSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.6', - 'upsDiagSubSysBattMonitorManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.7', - 'upsDiagSubSysExternalSwitchGearTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.7', - 'upsDiagSubSysExternalSwitchGearFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.1', - 'upsDiagSubSysExternalSwitchGearIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.2', - 'upsDiagSubSysExternalSwitchGearStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.3', - 'upsDiagSubSysExternalSwitchGearFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.4', - 'upsDiagSubSysExternalSwitchGearHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.5', - 'upsDiagSubSysExternalSwitchGearSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.6', - 'upsDiagSubSysExternalSwitchGearManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.7', - 'upsDiagSubSysDisplayInterfaceCardTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.9', - 'upsDiagSubSysDisplayInterfaceCardFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.10.1.1', - 'upsDiagSubSysDisplayInterfaceCardIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.10.1.2', - 'upsDiagSubSysDisplayInterfaceCardStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.10.1.3', - 'upsDiagSubSysDCCircuitBreakerTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.11', - 'upsDiagSubSysDCCircuitBreakerFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.12.1.1', - 'upsDiagSubSysDCCircuitBreakerIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.12.1.2', - 'upsDiagSubSysDCCircuitBreakerStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.12.1.3', - 'upsDiagSubSysSystemPowerSupplyTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.13', - 'upsDiagSubSysSystemPowerSupplyFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.1', - 'upsDiagSubSysSystemPowerSupplyIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.2', - 'upsDiagSubSysSystemPowerSupplyStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.3', - 'upsDiagSubSysSystemPowerSupplyFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.4', - 'upsDiagSubSysSystemPowerSupplyHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.5', - 'upsDiagSubSysSystemPowerSupplySerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.6', - 'upsDiagSubSysSystemPowerSupplyManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.7', - 'upsDiagSubSysXRCommunicationCardTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.15', - 'upsDiagSubSysXRCommunicationCardFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.1', - 'upsDiagSubSysXRCommunicationCardIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.2', - 'upsDiagSubSysXRCommunicationCardStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.3', - 'upsDiagSubSysXRCommunicationCardFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.4', - 'upsDiagSubSysXRCommunicationCardSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.5', - 'upsDiagSubSysExternalPowerFrameBoardTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.17', - 'upsDiagSubSysExternalPowerFrameBoardFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.18.1.1', - 'upsDiagSubSysExternalPowerFrameBoardIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.18.1.2', - 'upsDiagSubSysExternalPowerFrameBoardStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.18.1.3', - 'upsDiagSubSysChargerTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.19', - 'upsDiagSubSysChargerFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.20.1.1', - 'upsDiagSubSysChargerIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.20.1.2', - 'upsDiagSubSysChargerStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.20.1.3', - 'upsDiagSubSysInverterTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.21', - 'upsDiagSubSysInverterFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.1', - 'upsDiagSubSysInverterIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.2', - 'upsDiagSubSysInverterStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.3', - 'upsDiagSubSysInverterFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.4', - 'upsDiagSubSysInverterHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.5', - 'upsDiagSubSysInverterSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.6', - 'upsDiagSubSysInverterManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.7', - 'upsDiagSubSysPowerFactorCorrectionTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.23', - 'upsDiagSubSysPowerFactorCorrectionFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.1', - 'upsDiagSubSysPowerFactorCorrectionIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.2', - 'upsDiagSubSysPowerFactorCorrectionStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.3', - 'upsDiagSubSysPowerFactorCorrectionFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.4', - 'upsDiagSubSysPowerFactorCorrectionHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.5', - 'upsDiagSubSysPowerFactorCorrectionSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.6', - 'upsDiagSubSysPowerFactorCorrectionManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.7', - 'upsDiagSubSysNetworkComCardTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.25', - 'upsDiagSubSysNetworkComCardIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.1', - 'upsDiagSubSysNetworkComCardModelNumber' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.2', - 'upsDiagSubSysNetworkComCardSerialNumber' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.3', - 'upsDiagSubSysNetworkComCardDateOfManufacture' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.4', - 'upsDiagSubSysNetworkComCardHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.5', - 'upsDiagSubSysNetworkComCardFirmwareAppRev' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.6', - 'upsDiagSubSysNetworkComCardFirmwareAppOSRev' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.7', - 'upsDiagSwitchGearStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.1', - 'upsDiagSwitchGearInputSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.2', - 'upsDiagSwitchGearOutputSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.3', - 'upsDiagSwitchGearBypassSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.4', - 'upsDiagSwitchGearBypassInputSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.5', - 'upsDiagSwitchGearBreakerTableSize' => '1.3.6.1.4.1.318.1.1.1.13.5.1.6', - 'switchgearBreakerIndex' => '1.3.6.1.4.1.318.1.1.1.13.5.1.7.1.1', - 'switchgearBreakerPresent' => '1.3.6.1.4.1.318.1.1.1.13.5.1.7.1.2', - 'switchgearBreakerName' => '1.3.6.1.4.1.318.1.1.1.13.5.1.7.1.3', - 'upsDiagSubFeedBreakerTableSize' => '1.3.6.1.4.1.318.1.1.1.13.5.1.8', - 'subfeedBreakerIndex' => '1.3.6.1.4.1.318.1.1.1.13.5.1.9.1.1', - 'subfeedBreakerPresent' => '1.3.6.1.4.1.318.1.1.1.13.5.1.9.1.2', - 'subfeedBreakerRating' => '1.3.6.1.4.1.318.1.1.1.13.5.1.9.1.3', - 'subfeedBreakerUpperAcceptPowerWarning' => '1.3.6.1.4.1.318.1.1.1.13.5.1.9.1.4', - 'upsDiagMCCBBoxStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.2.1', - 'upsDiagTransformerStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.3.1', - 'upsDiagComBusInternalMIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.1', - 'upsDiagComBusInternalRIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.2', - 'upsDiagComBusMIMtoRIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.3', - 'upsDiagComBusExternalMIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.4', - 'upsDiagComBusExternalRIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.5', - 'upsParallelSysLocalAddress' => '1.3.6.1.4.1.318.1.1.1.14.1', - 'upsParallelSysRemoteAddress' => '1.3.6.1.4.1.318.1.1.1.14.2', - 'upsParallelSysRedundancy' => '1.3.6.1.4.1.318.1.1.1.14.3', - 'upsIOFrameLayoutPositionID' => '1.3.6.1.4.1.318.1.1.1.15.1', - 'upsBottomFeedFrameLayoutPositionID' => '1.3.6.1.4.1.318.1.1.1.15.2', - 'upsSwitchGearLayoutPositionID' => '1.3.6.1.4.1.318.1.1.1.15.3', - 'upsBatteryFrameLayoutTableSize' => '1.3.6.1.4.1.318.1.1.1.15.4', - 'batteryFrameIndex' => '1.3.6.1.4.1.318.1.1.1.15.5.1.1', - 'batteryFramePositionID' => '1.3.6.1.4.1.318.1.1.1.15.5.1.2', - 'upsSideCarFrameLayoutTableSize' => '1.3.6.1.4.1.318.1.1.1.15.6', - 'sideCarFrameIndex' => '1.3.6.1.4.1.318.1.1.1.15.7.1.1', - 'sideCarFramePositionID' => '1.3.6.1.4.1.318.1.1.1.15.7.1.2', - 'upsPowerFrameLayoutTableSize' => '1.3.6.1.4.1.318.1.1.1.15.8', - 'powerFrameIndex' => '1.3.6.1.4.1.318.1.1.1.15.9.1.1', - 'powerFramePositionID' => '1.3.6.1.4.1.318.1.1.1.15.9.1.2', - 'upsIntegratedATSSelectedSource' => '1.3.6.1.4.1.318.1.1.1.16.1', - 'upsIntegratedATSPreferredSource' => '1.3.6.1.4.1.318.1.1.1.16.2', - 'upsIntegratedATSUpsReturnStaggering' => '1.3.6.1.4.1.318.1.1.1.16.3', - 'upsIntegratedATSSourceTableSize' => '1.3.6.1.4.1.318.1.1.1.16.4', - 'upsIntegratedATSSourceIndex' => '1.3.6.1.4.1.318.1.1.1.16.5.1.1', - 'upsIntegratedATSSourceName' => '1.3.6.1.4.1.318.1.1.1.16.5.1.2', - 'upsIntegratedATSSourceStatus' => '1.3.6.1.4.1.318.1.1.1.16.5.1.3', - 'upsIntegratedATSLineFailDelay' => '1.3.6.1.4.1.318.1.1.1.16.5.1.4', - 'upsIntegratedATSLineStabilityDelay' => '1.3.6.1.4.1.318.1.1.1.16.5.1.5', - 'mUpsEnvironAmbientTemperature' => '1.3.6.1.4.1.318.1.1.2.1.1', - 'mUpsEnvironRelativeHumidity' => '1.3.6.1.4.1.318.1.1.2.1.2', - 'mUpsEnvironAmbientTemperature2' => '1.3.6.1.4.1.318.1.1.2.1.3', - 'mUpsEnvironRelativeHumidity2' => '1.3.6.1.4.1.318.1.1.2.1.4', - 'mUpsContactNumContacts' => '1.3.6.1.4.1.318.1.1.2.2.1', - 'mUpsContactTableContactNumber' => '1.3.6.1.4.1.318.1.1.2.2.2.1.1', - 'mUpsContactTableNormalState' => '1.3.6.1.4.1.318.1.1.2.2.2.1.2', - 'mUpsContactTableDescription' => '1.3.6.1.4.1.318.1.1.2.2.2.1.3', - 'mUpsContactTableMonitoringStatus' => '1.3.6.1.4.1.318.1.1.2.2.2.1.4', - 'mUpsContactTableCurrentStatus' => '1.3.6.1.4.1.318.1.1.2.2.2.1.5' -); +$apc_oids = []; /** * APC UPSD OID Cross Reference * Source: src/drivers/snmplite/mge-oids.h */ -$mge_oids = array( - 'upsmgIdentFamilyName' => '1.3.6.1.4.1.705.1.1.1', - 'upsmgIdentModelName' => '1.3.6.1.4.1.705.1.1.2', - 'upsmgIdentRevisionLevel' => '1.3.6.1.4.1.705.1.1.3', - 'upsmgIdentFirmwareVersion' => '1.3.6.1.4.1.705.1.1.4', - 'upsmgIdentUserID' => '1.3.6.1.4.1.705.1.1.5', - 'upsmgIdentInstallationDate' => '1.3.6.1.4.1.705.1.1.6', - 'upsmgIdentSerialNumber' => '1.3.6.1.4.1.705.1.1.7', - 'upsmgManagersNum' => '1.3.6.1.4.1.705.1.2.1', - 'mgmanagerIndex' => '1.3.6.1.4.1.705.1.2.2.1.1', - 'mgmanagerDeviceNumber' => '1.3.6.1.4.1.705.1.2.2.1.2', - 'mgmanagerNMSType' => '1.3.6.1.4.1.705.1.2.2.1.3', - 'mgmanagerCommType' => '1.3.6.1.4.1.705.1.2.2.1.4', - 'mgmanagerDescr' => '1.3.6.1.4.1.705.1.2.2.1.5', - 'mgmanagerAddress' => '1.3.6.1.4.1.705.1.2.2.1.6', - 'mgmanagerCommunity' => '1.3.6.1.4.1.705.1.2.2.1.7', - 'mgmanagerSeverityLevel' => '1.3.6.1.4.1.705.1.2.2.1.8', - 'mgmanagerTrapAck' => '1.3.6.1.4.1.705.1.2.2.1.9', - 'upsmgReceptaclesNum' => '1.3.6.1.4.1.705.1.3.1', - 'mgreceptacleIndex' => '1.3.6.1.4.1.705.1.3.2.1.1', - 'mgreceptacleLevel' => '1.3.6.1.4.1.705.1.3.2.1.2', - 'mgreceptacleType' => '1.3.6.1.4.1.705.1.3.2.1.3', - 'mgreceptacleIdent' => '1.3.6.1.4.1.705.1.3.2.1.4', - 'mgreceptacleState' => '1.3.6.1.4.1.705.1.3.2.1.5', - 'mgreceptacleReceptacle' => '1.3.6.1.4.1.705.1.3.2.1.6', - 'mgreceptaclePowerCons' => '1.3.6.1.4.1.705.1.3.2.1.7', - 'mgreceptacleOverload' => '1.3.6.1.4.1.705.1.3.2.1.8', - 'mgreceptacleAutonomy' => '1.3.6.1.4.1.705.1.3.2.1.9', - 'upsmgConfigBatteryInstalled' => '1.3.6.1.4.1.705.1.4.1', - 'upsmgConfigNominalBatteryVoltage' => '1.3.6.1.4.1.705.1.4.2', - 'upsmgConfigNominalBatteryTime' => '1.3.6.1.4.1.705.1.4.3', - 'upsmgConfigNominalRechargeTime' => '1.3.6.1.4.1.705.1.4.4', - 'upsmgConfigMinRechargeLevel' => '1.3.6.1.4.1.705.1.4.5', - 'upsmgConfigMaxRechargeTime' => '1.3.6.1.4.1.705.1.4.6', - 'upsmgConfigLowBatteryTime' => '1.3.6.1.4.1.705.1.4.7', - 'upsmgConfigLowBatteryLevel' => '1.3.6.1.4.1.705.1.4.8', - 'upsmgConfigAutoRestart' => '1.3.6.1.4.1.705.1.4.9', - 'upsmgConfigShutdownTimer' => '1.3.6.1.4.1.705.1.4.10', - 'upsmgConfigSysShutDuration' => '1.3.6.1.4.1.705.1.4.11', - 'upsmgConfigVARating' => '1.3.6.1.4.1.705.1.4.12', - 'upsmgConfigLowTransfer' => '1.3.6.1.4.1.705.1.4.13', - 'upsmgConfigHighTransfer' => '1.3.6.1.4.1.705.1.4.14', - 'upsmgConfigOutputNominalVoltage' => '1.3.6.1.4.1.705.1.4.15', - 'upsmgConfigOutputNominalCurrent' => '1.3.6.1.4.1.705.1.4.16', - 'upsmgConfigOutputNomFrequency' => '1.3.6.1.4.1.705.1.4.17', - 'upsmgConfigByPassType' => '1.3.6.1.4.1.705.1.4.18', - 'upsmgConfigAlarmAudible' => '1.3.6.1.4.1.705.1.4.19', - 'upsmgConfigAlarmTimeDelay' => '1.3.6.1.4.1.705.1.4.20', - 'upsmgConfigDevicesNum' => '1.3.6.1.4.1.705.1.4.21', - 'mgdeviceIndex' => '1.3.6.1.4.1.705.1.4.22.1.1', - 'mgdeviceReceptacleNum' => '1.3.6.1.4.1.705.1.4.22.1.2', - 'mgdeviceIdent' => '1.3.6.1.4.1.705.1.4.22.1.3', - 'mgdeviceVaRating' => '1.3.6.1.4.1.705.1.4.22.1.4', - 'mgdeviceSequenceOff' => '1.3.6.1.4.1.705.1.4.22.1.5', - 'mgdeviceSequenceOn' => '1.3.6.1.4.1.705.1.4.22.1.6', - 'mgdeviceShutdownDuration' => '1.3.6.1.4.1.705.1.4.22.1.7', - 'mgdeviceBootUpDuration' => '1.3.6.1.4.1.705.1.4.22.1.8', - 'mgreceptacleIndexb' => '1.3.6.1.4.1.705.1.4.23.1.1', - 'mgreceptacleStateTurnOn' => '1.3.6.1.4.1.705.1.4.23.1.2', - 'mgreceptacleStateMainReturn' => '1.3.6.1.4.1.705.1.4.23.1.3', - 'mgreceptacleStateDischarge' => '1.3.6.1.4.1.705.1.4.23.1.4', - 'mgreceptacleShutoffLevel' => '1.3.6.1.4.1.705.1.4.23.1.5', - 'mgreceptacleShutoffTimer' => '1.3.6.1.4.1.705.1.4.23.1.6', - 'mgreceptacleRestartLevel' => '1.3.6.1.4.1.705.1.4.23.1.7', - 'mgreceptacleRestartDelay' => '1.3.6.1.4.1.705.1.4.23.1.8', - 'mgreceptacleShutdownDuration' => '1.3.6.1.4.1.705.1.4.23.1.9', - 'mgreceptacleBootUpDuration' => '1.3.6.1.4.1.705.1.4.23.1.10', - 'upsmgConfigExtAlarmNum' => '1.3.6.1.4.1.705.1.4.24', - 'mgextAlarmIndex' => '1.3.6.1.4.1.705.1.4.25.1.1', - 'mgextAlarmUID' => '1.3.6.1.4.1.705.1.4.25.1.2', - 'upsmgConfigEmergencyTestFail' => '1.3.6.1.4.1.705.1.4.26', - 'upsmgConfigEmergencyOnByPass' => '1.3.6.1.4.1.705.1.4.27', - 'upsmgConfigEmergencyOverload' => '1.3.6.1.4.1.705.1.4.28', - 'mgcontrolDayIndex' => '1.3.6.1.4.1.705.1.4.29.1.1', - 'mgcontrolDayOn' => '1.3.6.1.4.1.705.1.4.29.1.2', - 'mgcontrolDayOff' => '1.3.6.1.4.1.705.1.4.29.1.3', - 'upsmgConfigLowBooster' => '1.3.6.1.4.1.705.1.4.30', - 'upsmgConfigHighBooster' => '1.3.6.1.4.1.705.1.4.31', - 'upsmgConfigLowFader' => '1.3.6.1.4.1.705.1.4.32', - 'upsmgConfigHighFader' => '1.3.6.1.4.1.705.1.4.33', - 'upsmgConfigSensorIndex' => '1.3.6.1.4.1.705.1.4.34.1.1', - 'upsmgConfigSensorName' => '1.3.6.1.4.1.705.1.4.34.1.2', - 'upsmgConfigTemperatureLow' => '1.3.6.1.4.1.705.1.4.34.1.3', - 'upsmgConfigTemperatureHigh' => '1.3.6.1.4.1.705.1.4.34.1.4', - 'upsmgConfigTemperatureHysteresis' => '1.3.6.1.4.1.705.1.4.34.1.5', - 'upsmgConfigHumidityLow' => '1.3.6.1.4.1.705.1.4.34.1.6', - 'upsmgConfigHumidityHigh' => '1.3.6.1.4.1.705.1.4.34.1.7', - 'upsmgConfigHumidityHysteresis' => '1.3.6.1.4.1.705.1.4.34.1.8', - 'upsmgConfigInput1Name' => '1.3.6.1.4.1.705.1.4.34.1.9', - 'upsmgConfigInput1ClosedLabel' => '1.3.6.1.4.1.705.1.4.34.1.10', - 'upsmgConfigInput1OpenLabel' => '1.3.6.1.4.1.705.1.4.34.1.11', - 'upsmgConfigInput2Name' => '1.3.6.1.4.1.705.1.4.34.1.12', - 'upsmgConfigInput2ClosedLabel' => '1.3.6.1.4.1.705.1.4.34.1.13', - 'upsmgConfigInput2OpenLabel' => '1.3.6.1.4.1.705.1.4.34.1.14', - 'upsmgBatteryRemainingTime' => '1.3.6.1.4.1.705.1.5.1', - 'upsmgBatteryLevel' => '1.3.6.1.4.1.705.1.5.2', - 'upsmgBatteryRechargeTime' => '1.3.6.1.4.1.705.1.5.3', - 'upsmgBatteryRechargeLevel' => '1.3.6.1.4.1.705.1.5.4', - 'upsmgBatteryVoltage' => '1.3.6.1.4.1.705.1.5.5', - 'upsmgBatteryCurrent' => '1.3.6.1.4.1.705.1.5.6', - 'upsmgBatteryTemperature' => '1.3.6.1.4.1.705.1.5.7', - 'upsmgBatteryFullRechargeTime' => '1.3.6.1.4.1.705.1.5.8', - 'upsmgBatteryFaultBattery' => '1.3.6.1.4.1.705.1.5.9', - 'upsmgBatteryNoBattery' => '1.3.6.1.4.1.705.1.5.10', - 'upsmgBatteryReplacement' => '1.3.6.1.4.1.705.1.5.11', - 'upsmgBatteryUnavailableBattery' => '1.3.6.1.4.1.705.1.5.12', - 'upsmgBatteryNotHighCharge' => '1.3.6.1.4.1.705.1.5.13', - 'upsmgBatteryLowBattery' => '1.3.6.1.4.1.705.1.5.14', - 'upsmgBatteryChargerFault' => '1.3.6.1.4.1.705.1.5.15', - 'upsmgBatteryLowCondition' => '1.3.6.1.4.1.705.1.5.16', - 'upsmgBatteryLowRecharge' => '1.3.6.1.4.1.705.1.5.17', - 'upsmgInputPhaseNum' => '1.3.6.1.4.1.705.1.6.1', - 'mginputIndex' => '1.3.6.1.4.1.705.1.6.2.1.1', - 'mginputVoltage' => '1.3.6.1.4.1.705.1.6.2.1.2', - 'mginputFrequency' => '1.3.6.1.4.1.705.1.6.2.1.3', - 'mginputMinimumVoltage' => '1.3.6.1.4.1.705.1.6.2.1.4', - 'mginputMaximumVoltage' => '1.3.6.1.4.1.705.1.6.2.1.5', - 'mginputCurrent' => '1.3.6.1.4.1.705.1.6.2.1.6', - 'upsmgInputBadStatus' => '1.3.6.1.4.1.705.1.6.3', - 'upsmgInputLineFailCause' => '1.3.6.1.4.1.705.1.6.4', - 'upsmgOutputPhaseNum' => '1.3.6.1.4.1.705.1.7.1', - 'mgoutputPhaseIndex' => '1.3.6.1.4.1.705.1.7.2.1.1', - 'mgoutputVoltage' => '1.3.6.1.4.1.705.1.7.2.1.2', - 'mgoutputFrequency' => '1.3.6.1.4.1.705.1.7.2.1.3', - 'mgoutputLoadPerPhase' => '1.3.6.1.4.1.705.1.7.2.1.4', - 'mgoutputCurrent' => '1.3.6.1.4.1.705.1.7.2.1.5', - 'upsmgOutputOnBattery' => '1.3.6.1.4.1.705.1.7.3', - 'upsmgOutputOnByPass' => '1.3.6.1.4.1.705.1.7.4', - 'upsmgOutputUnavailableByPass' => '1.3.6.1.4.1.705.1.7.5', - 'upsmgOutputNoByPass' => '1.3.6.1.4.1.705.1.7.6', - 'upsmgOutputUtilityOff' => '1.3.6.1.4.1.705.1.7.7', - 'upsmgOutputOnBoost' => '1.3.6.1.4.1.705.1.7.8', - 'upsmgOutputInverterOff' => '1.3.6.1.4.1.705.1.7.9', - 'upsmgOutputOverLoad' => '1.3.6.1.4.1.705.1.7.10', - 'upsmgOutputOverTemp' => '1.3.6.1.4.1.705.1.7.11', - 'upsmgOutputOnBuck' => '1.3.6.1.4.1.705.1.7.12', - 'upsmgEnvironAmbientTemp' => '1.3.6.1.4.1.705.1.8.1', - 'upsmgEnvironAmbientHumidity' => '1.3.6.1.4.1.705.1.8.2', - 'mgalarmNum' => '1.3.6.1.4.1.705.1.8.3.1.1', - 'mgalarmState' => '1.3.6.1.4.1.705.1.8.3.1.2', - 'upsmgEnvironSensorNum' => '1.3.6.1.4.1.705.1.8.4', - 'mgsensorNum' => '1.3.6.1.4.1.705.1.8.5.1.1', - 'mgsensorTemp' => '1.3.6.1.4.1.705.1.8.5.1.2', - 'mgsensorHumidity' => '1.3.6.1.4.1.705.1.8.5.1.3', - 'upsmgEnvironmentNum' => '1.3.6.1.4.1.705.1.8.6', - 'upsmgEnvironmentIndex' => '1.3.6.1.4.1.705.1.8.7.1.1', - 'upsmgEnvironmentComFailure' => '1.3.6.1.4.1.705.1.8.7.1.2', - 'upsmgEnvironmentTemperature' => '1.3.6.1.4.1.705.1.8.7.1.3', - 'upsmgEnvironmentTemperatureLow' => '1.3.6.1.4.1.705.1.8.7.1.4', - 'upsmgEnvironmentTemperatureHigh' => '1.3.6.1.4.1.705.1.8.7.1.5', - 'upsmgEnvironmentHumidity' => '1.3.6.1.4.1.705.1.8.7.1.6', - 'upsmgEnvironmentHumidityLow' => '1.3.6.1.4.1.705.1.8.7.1.7', - 'upsmgEnvironmentHumidityHigh' => '1.3.6.1.4.1.705.1.8.7.1.8', - 'upsmgEnvironmentInput1State' => '1.3.6.1.4.1.705.1.8.7.1.9', - 'upsmgEnvironmentInput2State' => '1.3.6.1.4.1.705.1.8.7.1.10', - 'mgreceptacleIndexc' => '1.3.6.1.4.1.705.1.9.1.1.1', - 'mgreceptacleOnDelay' => '1.3.6.1.4.1.705.1.9.1.1.2', - 'mgreceptacleOnCtrl' => '1.3.6.1.4.1.705.1.9.1.1.3', - 'mgreceptacleOnStatus' => '1.3.6.1.4.1.705.1.9.1.1.4', - 'mgreceptacleOffDelay' => '1.3.6.1.4.1.705.1.9.1.1.5', - 'mgreceptacleOffCtrl' => '1.3.6.1.4.1.705.1.9.1.1.6', - 'mgreceptacleOffStatus' => '1.3.6.1.4.1.705.1.9.1.1.7', - 'mgreceptacleToggleDelay' => '1.3.6.1.4.1.705.1.9.1.1.8', - 'mgreceptacleToggleCtrl' => '1.3.6.1.4.1.705.1.9.1.1.9', - 'mgreceptacleToggleStatus' => '1.3.6.1.4.1.705.1.9.1.1.10', - 'mgreceptacleToggleDuration' => '1.3.6.1.4.1.705.1.9.1.1.11', - 'upsmgControlDayOff' => '1.3.6.1.4.1.705.1.9.2', - 'upsmgControlDayOn' => '1.3.6.1.4.1.705.1.9.3', - 'upsmgTestBatterySchedule' => '1.3.6.1.4.1.705.1.10.1', - 'upsmgTestDiagnostics' => '1.3.6.1.4.1.705.1.10.2', - 'upsmgTestDiagResult' => '1.3.6.1.4.1.705.1.10.3', - 'upsmgTestBatteryCalibration' => '1.3.6.1.4.1.705.1.10.4', - 'upsmgTestLastCalibration' => '1.3.6.1.4.1.705.1.10.5', - 'upsmgTestIndicators' => '1.3.6.1.4.1.705.1.10.6', - 'upsmgTestCommandLine' => '1.3.6.1.4.1.705.1.10.7', - 'upsmgTestCommandReady' => '1.3.6.1.4.1.705.1.10.8', - 'upsmgTestResponseLine' => '1.3.6.1.4.1.705.1.10.9', - 'upsmgTestResponseReady' => '1.3.6.1.4.1.705.1.10.10', - 'upsmgTestBatteryResult' => '1.3.6.1.4.1.705.1.10.11', - 'upsmgAgentIpaddress' => '1.3.6.1.4.1.705.1.12.1', - 'upsmgAgentSubnetMask' => '1.3.6.1.4.1.705.1.12.2', - 'upsmgAgentDefGateway' => '1.3.6.1.4.1.705.1.12.3', - 'upsmgAgentBaudRate' => '1.3.6.1.4.1.705.1.12.4', - 'upsmgAgentPollRate' => '1.3.6.1.4.1.705.1.12.5', - 'upsmgAgentType' => '1.3.6.1.4.1.705.1.12.6', - 'upsmgAgentTrapAlarmDelay' => '1.3.6.1.4.1.705.1.12.7', - 'upsmgAgentTrapAlarmRetry' => '1.3.6.1.4.1.705.1.12.8', - 'upsmgAgentReset' => '1.3.6.1.4.1.705.1.12.9', - 'upsmgAgentFactReset' => '1.3.6.1.4.1.705.1.12.10', - 'upsmgAgentMibVersion' => '1.3.6.1.4.1.705.1.12.11', - 'upsmgAgentFirmwareVersion' => '1.3.6.1.4.1.705.1.12.12', - 'upsmgAgentCommUPS' => '1.3.6.1.4.1.705.1.12.13', - 'upsmgAgentTrapAck' => '1.3.6.1.4.1.705.1.12.14', - 'upsmgAgentAutoLearning' => '1.3.6.1.4.1.705.1.12.15', - 'upsmgAgentBootP' => '1.3.6.1.4.1.705.1.12.16', - 'upsmgAgentTFTP' => '1.3.6.1.4.1.705.1.12.17', - 'upsmgAgentTrapSignature' => '1.3.6.1.4.1.705.1.12.18', - 'upsmgRemoteOnBattery' => '1.3.6.1.4.1.705.1.13.1', - 'upsmgRemoteIpAddress' => '1.3.6.1.4.1.705.1.13.2', -); +$mge_oids = []; /** * APC UPSD OID Cross Reference * Source: src/drivers/snmplite/rfc1628-oids.h */ -$rfc_oids = array( - 'upsIdentManufacturer' => '1.3.6.1.2.1.33.1.1.1', - 'upsIdentModel' => '1.3.6.1.2.1.33.1.1.2', - 'upsIdentUPSSoftwareVersion' => '1.3.6.1.2.1.33.1.1.3', - 'upsIdentAgentSoftwareVersion' => '1.3.6.1.2.1.33.1.1.4', - 'upsIdentName' => '1.3.6.1.2.1.33.1.1.5', - 'upsIdentAttachedDevices' => '1.3.6.1.2.1.33.1.1.6', - 'upsBatteryStatus' => '1.3.6.1.2.1.33.1.2.1', - 'upsSecondsOnBattery' => '1.3.6.1.2.1.33.1.2.2', - 'upsEstimatedMinutesRemaining' => '1.3.6.1.2.1.33.1.2.3', - 'upsEstimatedChargeRemaining' => '1.3.6.1.2.1.33.1.2.4', - 'upsBatteryVoltage' => '1.3.6.1.2.1.33.1.2.5', - 'upsBatteryCurrent' => '1.3.6.1.2.1.33.1.2.6', - 'upsBatteryTemperature' => '1.3.6.1.2.1.33.1.2.7', - 'upsInputLineBads' => '1.3.6.1.2.1.33.1.3.1', - 'upsInputNumLines' => '1.3.6.1.2.1.33.1.3.2', - 'upsInputTableInputLineIndex' => '1.3.6.1.2.1.33.1.3.3.1.1', - 'upsInputTableInputFrequency' => '1.3.6.1.2.1.33.1.3.3.1.2', - 'upsInputTableInputVoltage' => '1.3.6.1.2.1.33.1.3.3.1.3', - 'upsInputTableInputCurrent' => '1.3.6.1.2.1.33.1.3.3.1.4', - 'upsInputTableInputTruePower' => '1.3.6.1.2.1.33.1.3.3.1.5', - 'upsOutputSource' => '1.3.6.1.2.1.33.1.4.1', - 'upsOutputFrequency' => '1.3.6.1.2.1.33.1.4.2', - 'upsOutputNumLines' => '1.3.6.1.2.1.33.1.4.3', - 'upsOutputTableOutputLineIndex' => '1.3.6.1.2.1.33.1.4.4.1.1', - 'upsOutputTableOutputVoltage' => '1.3.6.1.2.1.33.1.4.4.1.2', - 'upsOutputTableOutputCurrent' => '1.3.6.1.2.1.33.1.4.4.1.3', - 'upsOutputTableOutputPower' => '1.3.6.1.2.1.33.1.4.4.1.4', - 'upsOutputTableOutputPercentLoad' => '1.3.6.1.2.1.33.1.4.4.1.5', - 'upsBypassFrequency' => '1.3.6.1.2.1.33.1.5.1', - 'upsBypassNumLines' => '1.3.6.1.2.1.33.1.5.2', - 'upsBypassLineIndex' => '1.3.6.1.2.1.33.1.5.3.1.1', - 'upsBypassVoltage' => '1.3.6.1.2.1.33.1.5.3.1.2', - 'upsBypassCurrent' => '1.3.6.1.2.1.33.1.5.3.1.3', - 'upsBypassPower' => '1.3.6.1.2.1.33.1.5.3.1.4', - 'upsAlarmsPresent' => '1.3.6.1.2.1.33.1.6.1', - 'upsAlarmId' => '1.3.6.1.2.1.33.1.6.2.1.1', - 'upsAlarmDescr' => '1.3.6.1.2.1.33.1.6.2.1.2', - 'upsAlarmTime' => '1.3.6.1.2.1.33.1.6.2.1.3', - 'upsTestId' => '1.3.6.1.2.1.33.1.7.1', - 'upsTestSpinLock' => '1.3.6.1.2.1.33.1.7.2', - 'upsTestResultsSummary' => '1.3.6.1.2.1.33.1.7.3', - 'upsTestResultsDetail' => '1.3.6.1.2.1.33.1.7.4', - 'upsTestStartTime' => '1.3.6.1.2.1.33.1.7.5', - 'upsTestElapsedTime' => '1.3.6.1.2.1.33.1.7.6', - 'upsShutdownType' => '1.3.6.1.2.1.33.1.8.1', - 'upsShutdownAfterDelay' => '1.3.6.1.2.1.33.1.8.2', - 'upsStartupAfterDelay' => '1.3.6.1.2.1.33.1.8.3', - 'upsRebootWithDuration' => '1.3.6.1.2.1.33.1.8.4', - 'upsAutoRestart' => '1.3.6.1.2.1.33.1.8.5', - 'upsConfigInputVoltage' => '1.3.6.1.2.1.33.1.9.1', - 'upsConfigInputFreq' => '1.3.6.1.2.1.33.1.9.2', - 'upsConfigOutputVoltage' => '1.3.6.1.2.1.33.1.9.3', - 'upsConfigOutputFreq' => '1.3.6.1.2.1.33.1.9.4', - 'upsConfigOutputVA' => '1.3.6.1.2.1.33.1.9.5', - 'upsConfigOutputPower' => '1.3.6.1.2.1.33.1.9.6', - 'upsConfigLowBattTime' => '1.3.6.1.2.1.33.1.9.7', - 'upsConfigAudibleStatus' => '1.3.6.1.2.1.33.1.9.8', - 'upsConfigLowVoltageTransferPoint' => '1.3.6.1.2.1.33.1.9.9', - 'upsConfigHighVoltageTransferPoint' => '1.3.6.1.2.1.33.1.9.10', -); +$rfc_oids = []; diff --git a/poller_apcupsd.php b/poller_apcupsd.php index 79b607d..dc6a971 100644 --- a/poller_apcupsd.php +++ b/poller_apcupsd.php @@ -89,7 +89,7 @@ print 'NOTE: APCUPSD Poller Process Starting.' . PHP_EOL; -$host_template_id = db_fetch_cell_prepared('SELECT id FROM host_template WHERE hash = ?', array($hash)); +$host_template_id = db_fetch_cell_prepared('SELECT id FROM host_template WHERE hash = ?', []); $add_devices = true; if (empty($host_template_id)) { @@ -103,7 +103,7 @@ WHERE type_id = 1 AND enabled = "on" AND poller_id = ?', - array($config['poller_id'])); + []); $apcupsd = cacti_sizeof($upses); @@ -116,7 +116,7 @@ collect_ups_data($ups); if ($ups['host_id'] > 0) { - $exists = db_fetch_cell_prepared('SELECT id FROM host WHERE id = ?', array($ups['host_id'])); + $exists = db_fetch_cell_prepared('SELECT id FROM host WHERE id = ?', []); if (!$exists) { $ups['host_id'] = 0; @@ -137,7 +137,7 @@ WHERE type_id = 2 AND enabled = "on" AND poller_id = ?', - array($config['poller_id'])); + []); $snmpupses = cacti_sizeof($upses); @@ -150,7 +150,7 @@ $ups_up = collect_snmp_ups_data($ups); if ($ups['host_id'] > 0) { - $exists = db_fetch_cell_prepared('SELECT id FROM host WHERE id = ?', array($ups['host_id'])); + $exists = db_fetch_cell_prepared('SELECT id FROM host WHERE id = ?', []); if (!$exists) { $ups['host_id'] = 0; @@ -179,7 +179,7 @@ set_config_option('stats_apcupsd', $cacti_stats); function add_ups_device($ups, $host_template_id, $force_up = false) { - $save = array(); + $save = []; if ($ups['type_id'] == 1) { $host_id = api_device_save(0, $host_template_id, $ups['name'], 'localhost', // id, template_id, description, hostname @@ -199,7 +199,7 @@ function add_ups_device($ups, $host_template_id, $force_up = false) { $ups['site_id'], '', '', 0); // site_id, external_id, location, bulk_walk_size if ($force_up && $host_id) { - db_execute_prepared('UPDATE host SET status = 3 WHERE id = ?', array($host_id)); + db_execute_prepared('UPDATE host SET status = 3 WHERE id = ?', []); } } @@ -207,7 +207,7 @@ function add_ups_device($ups, $host_template_id, $force_up = false) { db_execute_prepared('UPDATE apcupsd_ups SET host_id = ? WHERE id = ?', - array($host_id, $ups['id'])); + []); automation_update_device($host_id); } @@ -217,7 +217,7 @@ function collect_snmp_ups_data($ups) { global $ups_database, $snmp_error; $start = time(); - $save = array(); + $save = []; $save['ups_id'] = $ups['id']; $save['ups_date'] = date('Y-m-d H:i:s'); @@ -230,7 +230,7 @@ function collect_snmp_ups_data($ups) { if ($ups['snmp_skipped'] != '') { $skipped = explode(',', $ups['snmp_skipped']); } else { - $skipped = array(); + $skipped = []; } $return_val = false; @@ -249,18 +249,18 @@ function collect_snmp_ups_data($ups) { if ($value > 0) { /* UPS just came back up, retest possible snmp columns */ if (!$ups_down) { - $skipped = array(); + $skipped = []; } $return_val = true; - db_execute_prepared('UPDATE apcupsd_ups SET status = 3, last_updated=NOW() WHERE id = ?', array($ups['id'])); + db_execute_prepared('UPDATE apcupsd_ups SET status = 3, last_updated=NOW() WHERE id = ?', []); foreach($ups_database AS $key => $data) { if (isset($data['snmp_ci']) && $data['snmp_ci'] != '' && $data['snmp_ci'] != 'NA' && $data['snmp_ci'] != 'UNKNOWN') { if ($data['snmp_ci'] == 'CURDATE' || $data['db_column'] == 'ups_date') { $stats[$data['db_column']] = date('Y-m-d H:i:s'); - } elseif (!cacti_sizeof($skipped) || !in_array($key, $skipped, true)) { + } elseif (!cacti_sizeof($skipped) || !in_[]) { $value = cacti_snmp_get($ups['hostname'], $ups['snmp_community'], $data['snmp_ci'], $ups['snmp_version'], $ups['snmp_username'], $ups['snmp_password'], $ups['snmp_auth_protocol'], $ups['snmp_priv_passphrase'], $ups['snmp_priv_protocol'], $ups['snmp_context'], $ups['snmp_port'], $ups['snmp_timeout'], 1, 'SNMP', @@ -330,10 +330,10 @@ function collect_snmp_ups_data($ups) { if (cacti_sizeof($skipped)) { db_execute_prepared('UPDATE apcupsd_ups SET snmp_skipped = ? WHERE id = ?', array(implode(',', $skipped), $ups['id'])); } else { - db_execute_prepared('UPDATE apcupsd_ups SET snmp_skipped = "" WHERE id = ?', array($ups['id'])); + db_execute_prepared('UPDATE apcupsd_ups SET snmp_skipped = "" WHERE id = ?', []); } } else { - db_execute_prepared('UPDATE apcupsd_ups SET status = 1, snmp_skipped = "" WHERE id = ?', array($ups['id'])); + db_execute_prepared('UPDATE apcupsd_ups SET status = 1, snmp_skipped = "" WHERE id = ?', []); } $save['ups_end_rec'] = date('Y-m-d H:i:s'); @@ -347,11 +347,7 @@ function collect_ups_data($ups) { global $ups_database; /* for windows, apcupsd.exe must be in the path */ - $paths = array( - '/usr/sbin/', - '/usr/bin/', - '/usr/local/bin/' - ); + $paths = []; $found_path = ''; @@ -365,7 +361,7 @@ function collect_ups_data($ups) { $command = $found_path . 'apcaccess -u -h ' . $ups['hostname'] . ':' . $ups['port']; - $output = array(); + $output = []; $return = 0; $ups_status = 1; @@ -378,7 +374,7 @@ function collect_ups_data($ups) { db_execute_prepared('UPDATE apcupsd_ups SET status = 1, error_message = ? WHERE id = ?', - array($message, $ups['id'])); + []); } else { if (cacti_sizeof($output)) { $sql_insert = 'REPLACE INTO apcupsd_ups_stats (ups_id'; @@ -403,19 +399,19 @@ function collect_ups_data($ups) { $status = db_fetch_cell_prepared('SELECT status FROM host WHERE id = ?', - array($ups['host_id'])); + []); if ($value == 'ONLINE' || $value == 'ONLINE SLAVE') { $ups_status = 3; if ($status != 3) { - db_execute_prepared('UPDATE host SET status = 3, status_rec_date=NOW() WHERE id = ?', array($ups['host_id'])); + db_execute_prepared('UPDATE host SET status = 3, status_rec_date=NOW() WHERE id = ?', []); } } else { $ups_status = 1; if ($status != 4) { - db_execute_prepared('UPDATE host SET status = 4, status_fail_date=NOW() WHERE id = ?', array($ups['host_id'])); + db_execute_prepared('UPDATE host SET status = 4, status_fail_date=NOW() WHERE id = ?', []); } } } @@ -434,7 +430,7 @@ function collect_ups_data($ups) { db_execute_prepared('UPDATE apcupsd_ups SET status = ?, last_updated=NOW() WHERE id = ?', - array($ups_status, $ups['id'])); + []); } } diff --git a/setup.php b/setup.php index 9ebbdef..35aaacb 100644 --- a/setup.php +++ b/setup.php @@ -59,7 +59,7 @@ function apcupsd_check_upgrade() { include_once($config['library_path'] . '/database.php'); include_once($config['library_path'] . '/functions.php'); - $files = array('plugins.php', 'upses.php'); + $files = []; if (isset($_SERVER['PHP_SELF']) && !in_array(basename($_SERVER['PHP_SELF']), $files)) { return; } @@ -76,13 +76,7 @@ function apcupsd_check_upgrade() { db_execute_prepared("UPDATE plugin_config SET version = ?, name = ?, author = ?, webpage = ? WHERE directory = ?", - array( - $info['version'], - $info['longname'], - $info['author'], - $info['homepage'], - $info['name'] - ) + [] ); if (db_column_exists('apcupsd_ups_stats', 'ups_abmtemp')) { @@ -308,7 +302,7 @@ function apcupsd_config_arrays() { $menu[__('Management')]['plugins/apcupsd/upses.php'] = __('UPSes', 'webseer'); if (function_exists('auth_augment_roles')) { - auth_augment_roles(__('System Administration'), array('upses.php')); + auth_augment_roles(__('System Administration'), []); } apcupsd_check_upgrade(); diff --git a/upses.php b/upses.php index 2bb41e6..d1a1c8e 100644 --- a/upses.php +++ b/upses.php @@ -153,14 +153,8 @@ 'max_length' => '100' ), ) + $fields_snmp_item + array( - 'id' => array( - 'method' => 'hidden_zero', - 'value' => '|arg1:id|' - ), - 'save_component_ups' => array( - 'method' => 'hidden', - 'value' => '1' - ) + 'id' => [], + 'save_component_ups' => [] ); /* set default action */ @@ -263,9 +257,9 @@ function form_save() { $save['snmp_timeout'] = form_input_validate(get_nfilter_request_var('snmp_timeout'), 'snmp_timeout', '', true, 3); if ($save['host_id'] > 0) { - $host = db_fetch_row_prepared('SELECT * FROM host WHERE id = ?', array($save['host_id'])); + $host = db_fetch_row_prepared('SELECT * FROM host WHERE id = ?', []); } else { - $host = array(); + $host = []; } if (!is_error_message()) { @@ -304,20 +298,7 @@ function form_save() { // SNMP columns if ($save['type_id'] == 2) { - $columns = array( - 'hostname', - 'snmp_version', - 'snmp_community', - 'snmp_username', - 'snmp_password', - 'snmp_auth_protocol', - 'snmp_priv_protocol', - 'snmp_priv_passphrase', - 'snmp_context', - 'snmp_engine_id', - 'snmp_port', - 'snmp_timeout', - ); + $columns = []; foreach($columns as $c) { if ($save[$c] != $host[$c]) { @@ -334,12 +315,12 @@ function form_save() { if ($name_changed) { $graphs = array_rekey( - db_fetch_assoc_prepared('SELECT id FROM graph_local WHERE host_id = ?', array($host_id)), + db_fetch_assoc_prepared('SELECT id FROM graph_local WHERE host_id = ?', []), 'id', 'id' ); $data_sources = array_rekey( - db_fetch_assoc_prepared('SELECT id FROM data_local WHERE host_id = ?', array($host_id)), + db_fetch_assoc_prepared('SELECT id FROM data_local WHERE host_id = ?', []), 'id', 'id' ); @@ -366,18 +347,18 @@ function form_save() { } function duplicate_ups($template_id, $name) { - if (!is_array($template_id)) { - $template_id = array($template_id); + if (!is_[]) { + $template_id = []; } foreach($template_id as $id) { $ups = db_fetch_row_prepared('SELECT * FROM apcupsd_ups WHERE id = ?', - array($id)); + []); if (cacti_sizeof($ups)) { - $save = array(); + $save = []; $save['id'] = 0; @@ -443,7 +424,7 @@ function form_actions() { input_validate_input_number($matches[1]); /* ==================================================== */ - $name = db_fetch_cell_prepared('SELECT name FROM apcupsd_ups WHERE id = ?', array($matches[1])); + $name = db_fetch_cell_prepared('SELECT name FROM apcupsd_ups WHERE id = ?', []); $ups_list .= '
  • ' . html_escape($name) . '
  • '; $ups_array[$i] = $matches[1]; @@ -524,14 +505,14 @@ function ups_edit() { $ups = db_fetch_row_prepared('SELECT * FROM apcupsd_ups WHERE id = ?', array(get_request_var('id'))); $header_label = __esc('UPS [edit: %s]', $ups['name'], 'apcupsd'); } else { - $ups = array(); + $ups = []; $header_label = __('UPS [new]', 'apcupsd'); } if (isset($ups['host_id']) && $ups['host_id'] > 0) { - $fields_ups_edit['host_id']['value'] = db_fetch_cell_prepared('SELECT description FROM host WHERE id = ?', array($ups['host_id'])); - $fields_ups_edit['location']['value'] = db_fetch_cell_prepared('SELECT location FROM host WHERE id = ?', array($ups['host_id'])); - $fields_ups_edit['location']['id'] = db_fetch_cell_prepared('SELECT location FROM host WHERE id = ?', array($ups['host_id'])); + $fields_ups_edit['host_id']['value'] = db_fetch_cell_prepared('SELECT description FROM host WHERE id = ?', []); + $fields_ups_edit['location']['value'] = db_fetch_cell_prepared('SELECT location FROM host WHERE id = ?', []); + $fields_ups_edit['location']['id'] = db_fetch_cell_prepared('SELECT location FROM host WHERE id = ?', []); } else { unset($fields_ups_edit['location']); } @@ -545,8 +526,8 @@ function ups_edit() { draw_edit_form( array( - 'config' => array('no_form_tag' => true), - 'fields' => inject_form_variables($fields_ups_edit, (isset($ups) ? $ups : array())) + 'config' => [], + 'fields' => inject_form_variables($fields_ups_edit, ( ?? [])) ) ); @@ -613,40 +594,25 @@ function upses() { /* ================= input validation and session storage ================= */ $filters = array( - 'rows' => array( - 'filter' => FILTER_VALIDATE_INT, - 'pageset' => true, - 'default' => '-1' - ), - 'site_id' => array( - 'filter' => FILTER_VALIDATE_INT, - 'pageset' => true, - 'default' => '-1' - ), + 'rows' => [], + 'site_id' => [], 'location' => array( 'filter' => FILTER_CALLBACK, - 'options' => array('options' => 'sanitize_search_string'), + 'options' => [], 'pageset' => true, 'default' => '-1' ), - 'page' => array( - 'filter' => FILTER_VALIDATE_INT, - 'default' => '1' - ), - 'filter' => array( - 'filter' => FILTER_DEFAULT, - 'pageset' => true, - 'default' => '' - ), + 'page' => [], + 'filter' => [], 'sort_column' => array( 'filter' => FILTER_CALLBACK, 'default' => 'name', - 'options' => array('options' => 'sanitize_search_string') + 'options' => [] ), 'sort_direction' => array( 'filter' => FILTER_CALLBACK, 'default' => 'ASC', - 'options' => array('options' => 'sanitize_search_string') + 'options' => [] ) ); @@ -786,7 +752,7 @@ function clearFilter() { html_end_box(); $sql_where = ''; - $sql_params = array(); + $sql_params = []; /* form the 'where' clause for our main sql query */ if (get_request_var('filter') != '') { @@ -969,7 +935,7 @@ function checkNullandReturn($value) { } function get_site_locations() { - $return = array(); + $return = []; $term = get_nfilter_request_var('term'); $host_id = $_SESSION['cur_device_id']; @@ -980,7 +946,7 @@ function get_site_locations() { $site_id = db_fetch_cell_prepared('SELECT site_id FROM host WHERE id = ?', - array($host_id)); + []); $args []= $site_id; $where = 'AND site_id = ?'; } @@ -996,7 +962,7 @@ function get_site_locations() { if (cacti_sizeof($locations)) { foreach ($locations as $l) { - $return[] = array('label' => $l['location'], 'value' => $l['location'], 'id' => $l['location']); + $return[] = []; } } From 0d9cf45c73a98a7ec39d76d67ac7226461f7f131 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Thu, 9 Apr 2026 21:45:11 -0700 Subject: [PATCH 3/5] fix: restore is_array/in_array calls and remove .omc artifacts Revert corrupted function calls introduced by refactoring tool: - is_[$x] -> is_array($x) - in_[$x, ...] -> in_array($x, ...) - xml2[$x] -> xml2array($x) Also remove accidentally committed .omc session files and add .omc/ to .gitignore. Signed-off-by: Thomas Vincent --- .gitignore | 1 + poller_apcupsd.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..abd0c4d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.omc/ diff --git a/poller_apcupsd.php b/poller_apcupsd.php index dc6a971..b0c8570 100644 --- a/poller_apcupsd.php +++ b/poller_apcupsd.php @@ -260,7 +260,7 @@ function collect_snmp_ups_data($ups) { if (isset($data['snmp_ci']) && $data['snmp_ci'] != '' && $data['snmp_ci'] != 'NA' && $data['snmp_ci'] != 'UNKNOWN') { if ($data['snmp_ci'] == 'CURDATE' || $data['db_column'] == 'ups_date') { $stats[$data['db_column']] = date('Y-m-d H:i:s'); - } elseif (!cacti_sizeof($skipped) || !in_[]) { + } elseif (!cacti_sizeof($skipped) || !in_array()) { $value = cacti_snmp_get($ups['hostname'], $ups['snmp_community'], $data['snmp_ci'], $ups['snmp_version'], $ups['snmp_username'], $ups['snmp_password'], $ups['snmp_auth_protocol'], $ups['snmp_priv_passphrase'], $ups['snmp_priv_protocol'], $ups['snmp_context'], $ups['snmp_port'], $ups['snmp_timeout'], 1, 'SNMP', From 6afed28e38321c7ab42881ba695dfab484bf0e28 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Thu, 9 Apr 2026 22:42:07 -0700 Subject: [PATCH 4/5] fix: restore corrupted is_array call in duplicate_ups Signed-off-by: Thomas Vincent --- upses.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upses.php b/upses.php index d1a1c8e..0a3954e 100644 --- a/upses.php +++ b/upses.php @@ -347,7 +347,7 @@ function form_save() { } function duplicate_ups($template_id, $name) { - if (!is_[]) { + if (!is_array($template_id)) { $template_id = []; } From fdfcfd14bcb25e95c5a77a1de26400cf20ca4f82 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Fri, 10 Apr 2026 01:15:54 -0700 Subject: [PATCH 5/5] fix: restore data destroyed by broken refactor tool The refactor tool catastrophically corrupted several files by: - Stripping entire array contents (e.g., snmp_enum mappings, apc_oids, apc_snmp_config - 800+ lines of data lost in database.php) - Replacing db_fetch_*_prepared() / db_execute_prepared() parameter arrays with empty [] (all SQL bindings destroyed in poller_apcupsd.php) - Replacing in_array(), call_user_func_array() arguments with invalid syntax like $files = [] instead of array('plugins.php', 'upses.php') - Breaking inject_form_variables() call to use invalid ( ?? []) syntax Restore these files to their origin/develop state. The modernization can be redone carefully in a follow-up PR. Signed-off-by: Thomas Vincent --- database.php | 902 ++++++++++++++++++++++++++++++++++++++++++--- poller_apcupsd.php | 48 +-- setup.php | 14 +- upses.php | 92 +++-- 4 files changed, 954 insertions(+), 102 deletions(-) diff --git a/database.php b/database.php index c8fc72f..a58037b 100644 --- a/database.php +++ b/database.php @@ -1,7 +1,5 @@ array( 'db_column' => 'ups_alarmdel', @@ -37,7 +35,12 @@ 'db_column' => 'ups_battery_status', 'snmp_ci' => '.1.3.6.1.4.1.318.1.1.1.2.1.1.0', 'description' => __esc('Battery status.', 'apcupsd'), - 'snmp_enum' => [] + 'snmp_enum' => array( + 1 => 'Unknown', + 2 => 'Normal', + 3 => 'Low', + 4 => 'Fault' + ) ), 'BATTV' => array( 'db_column' => 'ups_battery_voltage', @@ -253,13 +256,25 @@ 'db_column' => 'ups_selftest', 'snmp_ci' => '.1.3.6.1.2.1.33.1.7.3.0', 'description' => __esc('Date and time of last self test since apcupsd startup', 'apcupsd'), - 'snmp_enum' => [] + 'snmp_enum' => array( + 1 => 'Ok', + 2 => 'Warning', + 3 => 'Error', + 4 => 'Aborted', + 5 => 'InProgress', + 6 => 'Disabled' + ) ), 'SENSE' => array( 'db_column' => 'ups_sense', 'snmp_ci' => '1.3.6.1.4.1.318.1.1.1.5.2.7.0', 'description' => __esc('Current UPS sensitivity setting for voltage fluctuations', 'apcupsd'), - 'snmp_enum' => [] + 'snmp_enum' => array( + 1 => 'Auto', + 2 => 'Low', + 3 => 'Medium', + 4 => 'High' + ) ), 'SERIALNO' => array( 'db_column' => 'ups_serialno', @@ -280,7 +295,24 @@ 'db_column' => 'ups_status', 'snmp_ci' => '.1.3.6.1.4.1.318.1.1.1.4.1.1.0', 'description' => __esc('UPS status. One or more of the following (space-separated): CAL TRIM BOOST ONLINE ONBATT OVERLOAD LOWBATT REPLACEBATT NOBATT SLAVE SLAVEDOWN or COMMLOST or SHUTTING DOWN', 'apcupsd'), - 'snmp_enum' => [] + 'snmp_enum' => array( + 1 => 'UNKNOWN', + 2 => 'ONLINE', + 3 => 'ONBATT', + 4 => 'BOOST', + 5 => 'SLEEPING', + 6 => 'BYPASS', + 7 => 'OFF', + 8 => 'REBOOTING', + 9 => 'SWITCHBYPASS', + 10 => 'HARDWAREBYPASS', + 11 => 'SLEEPING', + 12 => 'TRIM', + 13 => 'ECOMODE', + 14 => 'INVERTER', + 15 => 'ECONVERSION', + 16 => 'STATICBYPASS' + ) ), 'LASTSTEST' => array( 'db_column' => 'ups_laststest', @@ -291,7 +323,20 @@ 'db_column' => 'ups_selftest_interval', 'snmp_ci' => '.1.3.6.1.4.1.318.1.1.1.7.2.1.0', 'description' => __esc('Self-test interval', 'apcupsd'), - 'snmp_enum' => [] + 'snmp_enum' => array( + 1 => 'UNKNOWN', + 2 => 'BIWEEKLY', + 3 => 'WEEKLY', + 4 => 'POWERON', + 5 => 'NEVER', + 6 => 'FOURWEEKS', + 7 => 'TWELVEWEEKS', + 8 => 'BIWEEKLYLAST', + 9 => 'WEEKLYLAST', + 10 => 'EIGHTWEEKS', + 11 => 'HALFYEAR', + 12 => 'YEARLY' + ) ), 'TIMELEFT' => array( 'db_column' => 'ups_timeleft', @@ -344,58 +389,825 @@ * Source: src/drivers/snmplite/apc-oids.h */ $apc_snmp_config = array( - 'CI_UPSMODEL' => [], - 'CI_STATUS' => [], - 'CI_WHY_BATT' => [], - 'CI_ST_STAT' => [], - 'CI_VLINE' => [], - 'CI_VMAX' => [], - 'CI_VMIN' => [], - 'CI_VOUT' => [], - 'CI_BATTLEV' => [], - 'CI_VBATT' => [], - 'CI_LOAD' => [], - 'CI_FREQ' => [], - 'CI_RUNTIM' => [], - 'CI_ITEMP' => [], - 'CI_DWAKE' => [], - 'CI_DSHUTD' => [], - 'CI_LTRANS' => [], - 'CI_HTRANS' => [], - 'CI_RETPCT' => [], - 'CI_AlarmTimer' => [], - 'CI_DALARM' => [], - 'CI_DLBATT' => [], - 'CI_IDEN' => [], - 'CI_STESTI' => [], - 'CI_SERNO' => [], - 'CI_NOMBATTV' => [], - 'CI_HUMID' => [], - 'CI_REVNO' => [], - 'CI_ATEMP' => [], - 'CI_NOMOUTV' => [], - 'CI_Boost' => [], - 'CI_Trim' => [], - 'CI_Overload' => [], - 'CI_NeedReplacement' => [], - 'CI_LowBattery' => [] + 'CI_UPSMODEL' => array( + 'oid' => 'upsmgIdentFamilyName', + 'type' => 'OCTETSTRING', + 'dyn' => false, + ), + 'CI_STATUS' => array( + 'oid' => 'upsmgOutputOnBattery', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_WHY_BATT' => array( + 'oid' => 'upsmgInputLineFailCause', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_ST_STAT' => array( + 'oid' => 'upsmgTestDiagResult', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_VLINE' => array( + 'oid' => 'mginputVoltage', + 'type' => 'SEQUENCE', + 'dyn' => true, + ), + 'CI_VMAX' => array( + 'oid' => 'mginputMaximumVoltage', + 'type' => 'SEQUENCE', + 'dyn' => true, + ), + 'CI_VMIN' => array( + 'oid' => 'mginputMinimumVoltage', + 'type' => 'SEQUENCE', + 'dyn' => true, + ), + 'CI_VOUT' => array( + 'oid' => 'mgoutputVoltage', + 'type' => 'SEQUENCE', + 'dyn' => true, + ), + 'CI_BATTLEV' => array( + 'oid' => 'upsmgBatteryLevel', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_VBATT' => array( + 'oid' => 'upsmgBatteryVoltage', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_LOAD' => array( + 'oid' => 'mgoutputLoadPerPhase', + 'type' => 'SEQUENCE', + 'dyn' => true, + ), + 'CI_FREQ' => array( + 'oid' => 'mginputFrequency', + 'type' => 'SEQUENCE', + 'dyn' => true, + ), + 'CI_RUNTIM' => array( + 'oid' => 'upsmgBatteryRemainingTime', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_ITEMP' => array( + 'oid' => 'upsmgBatteryTemperature', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_DWAKE' => array( + 'oid' => 'mgreceptacleRestartDelay', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_DSHUTD' => array( + 'oid' => 'upsmgConfigSysShutDuration', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_LTRANS' => array( + 'oid' => 'upsmgConfigLowTransfer', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_HTRANS' => array( + 'oid' => 'upsmgConfigHighTransfer', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_RETPCT' => array( + 'oid' => 'upsmgConfigMinRechargeLevel', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_AlarmTimer' => array( + 'oid' => 'upsmgConfigAlarmTimeDelay', + 'type' => 'INTEGER', + 'dyn' => false, // before CI_DALARM ! + ), + 'CI_DALARM' => array( + 'oid' => 'upsmgConfigAlarmAudible', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_DLBATT' => array( + 'oid' => 'upsmgConfigLowBatteryTime', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_IDEN' => array( + 'oid' => 'upsmgIdentModelName', + 'type' => 'OCTETSTRING', + 'dyn' => false, + ), + 'CI_STESTI' => array( + 'oid' => 'upsmgTestBatterySchedule', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_SERNO' => array( + 'oid' => 'upsmgIdentSerialNumber', + 'type' => 'OCTETSTRING', + 'dyn' => false, + ), + 'CI_NOMBATTV' => array( + 'oid' => 'upsmgConfigNominalBatteryVoltage', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_HUMID' => array( + 'oid' => 'upsmgEnvironAmbientHumidity', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_REVNO' => array( + 'oid' => 'upsmgIdentFirmwareVersion', + 'type' => 'OCTETSTRING', + 'dyn' => false, // Version + SN of net card + ), + 'CI_ATEMP' => array( + 'oid' => 'upsmgEnvironAmbientTemp', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_NOMOUTV' => array( + 'oid' => 'upsmgConfigOutputNominalVoltage', + 'type' => 'INTEGER', + 'dyn' => false, + ), + 'CI_Boost' => array( + 'oid' => 'upsmgOutputOnBoost', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_Trim' => array( + 'oid' => 'upsmgOutputOnBuck', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_Overload' => array( + 'oid' => 'upsmgOutputOverLoad', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_NeedReplacement' => array( + 'oid' => 'upsmgBatteryReplacement', + 'type' => 'INTEGER', + 'dyn' => true, + ), + 'CI_LowBattery' => array( + 'oid' => 'upsmgBatteryLowBattery', + 'type' => 'INTEGER', + 'dyn' => true, + ) ); /** * APC UPSD OID Cross Reference * Source: src/drivers/snmplite/apc-oids.h */ -$apc_oids = []; +$apc_oids = array( + 'upsBasicIdentModel' => '1.3.6.1.4.1.318.1.1.1.1.1.1', + 'upsBasicIdentName' => '1.3.6.1.4.1.318.1.1.1.1.1.2', + 'upsAdvIdentFirmwareRevision' => '1.3.6.1.4.1.318.1.1.1.1.2.1', + 'upsAdvIdentDateOfManufacture' => '1.3.6.1.4.1.318.1.1.1.1.2.2', + 'upsAdvIdentSerialNumber' => '1.3.6.1.4.1.318.1.1.1.1.2.3', + 'upsAdvIdentFirmwareRevision2' => '1.3.6.1.4.1.318.1.1.1.1.2.4', + 'upsAdvIdentSkuNumber' => '1.3.6.1.4.1.318.1.1.1.1.2.5', + 'upsBasicBatteryStatus' => '1.3.6.1.4.1.318.1.1.1.2.1.1', + 'upsBasicBatteryTimeOnBattery' => '1.3.6.1.4.1.318.1.1.1.2.1.2', + 'upsBasicBatteryLastReplaceDate' => '1.3.6.1.4.1.318.1.1.1.2.1.3', + 'upsAdvBatteryCapacity' => '1.3.6.1.4.1.318.1.1.1.2.2.1', + 'upsAdvBatteryTemperature' => '1.3.6.1.4.1.318.1.1.1.2.2.2', + 'upsAdvBatteryRunTimeRemaining' => '1.3.6.1.4.1.318.1.1.1.2.2.3', + 'upsAdvBatteryReplaceIndicator' => '1.3.6.1.4.1.318.1.1.1.2.2.4', + 'upsAdvBatteryNumOfBattPacks' => '1.3.6.1.4.1.318.1.1.1.2.2.5', + 'upsAdvBatteryNumOfBadBattPacks' => '1.3.6.1.4.1.318.1.1.1.2.2.6', + 'upsAdvBatteryNominalVoltage' => '1.3.6.1.4.1.318.1.1.1.2.2.7', + 'upsAdvBatteryActualVoltage' => '1.3.6.1.4.1.318.1.1.1.2.2.8', + 'upsAdvBatteryCurrent' => '1.3.6.1.4.1.318.1.1.1.2.2.9', + 'upsAdvTotalDCCurrent' => '1.3.6.1.4.1.318.1.1.1.2.2.10', + 'upsHighPrecBatteryCapacity' => '1.3.6.1.4.1.318.1.1.1.2.3.1', + 'upsHighPrecBatteryTemperature' => '1.3.6.1.4.1.318.1.1.1.2.3.2', + 'upsHighPrecBatteryNominalVoltage' => '1.3.6.1.4.1.318.1.1.1.2.3.3', + 'upsHighPrecBatteryActualVoltage' => '1.3.6.1.4.1.318.1.1.1.2.3.4', + 'upsHighPrecBatteryCurrent' => '1.3.6.1.4.1.318.1.1.1.2.3.5', + 'upsHighPrecTotalDCCurrent' => '1.3.6.1.4.1.318.1.1.1.2.3.6', + 'upsBasicInputPhase' => '1.3.6.1.4.1.318.1.1.1.3.1.1', + 'upsAdvInputLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.2.1', + 'upsAdvInputMaxLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.2.2', + 'upsAdvInputMinLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.2.3', + 'upsAdvInputFrequency' => '1.3.6.1.4.1.318.1.1.1.3.2.4', + 'upsAdvInputLineFailCause' => '1.3.6.1.4.1.318.1.1.1.3.2.5', + 'upsHighPrecInputLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.3.1', + 'upsHighPrecInputMaxLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.3.2', + 'upsHighPrecInputMinLineVoltage' => '1.3.6.1.4.1.318.1.1.1.3.3.3', + 'upsHighPrecInputFrequency' => '1.3.6.1.4.1.318.1.1.1.3.3.4', + 'upsBasicOutputStatus' => '1.3.6.1.4.1.318.1.1.1.4.1.1', + 'upsBasicOutputPhase' => '1.3.6.1.4.1.318.1.1.1.4.1.2', + 'upsBasicSystemStatus' => '1.3.6.1.4.1.318.1.1.1.4.1.3', + 'upsAdvOutputVoltage' => '1.3.6.1.4.1.318.1.1.1.4.2.1', + 'upsAdvOutputFrequency' => '1.3.6.1.4.1.318.1.1.1.4.2.2', + 'upsAdvOutputLoad' => '1.3.6.1.4.1.318.1.1.1.4.2.3', + 'upsAdvOutputCurrent' => '1.3.6.1.4.1.318.1.1.1.4.2.4', + 'upsAdvOutputRedundancy' => '1.3.6.1.4.1.318.1.1.1.4.2.5', + 'upsAdvOutputKVACapacity' => '1.3.6.1.4.1.318.1.1.1.4.2.6', + 'upsHighPrecOutputVoltage' => '1.3.6.1.4.1.318.1.1.1.4.3.1', + 'upsHighPrecOutputFrequency' => '1.3.6.1.4.1.318.1.1.1.4.3.2', + 'upsHighPrecOutputLoad' => '1.3.6.1.4.1.318.1.1.1.4.3.3', + 'upsHighPrecOutputCurrent' => '1.3.6.1.4.1.318.1.1.1.4.3.4', + 'upsBasicConfigNumDevices' => '1.3.6.1.4.1.318.1.1.1.5.1.1', + 'upsBasicConfigDeviceTableDeviceIndex' => '1.3.6.1.4.1.318.1.1.1.5.1.2.1.1', + 'upsBasicConfigDeviceTableDeviceName' => '1.3.6.1.4.1.318.1.1.1.5.1.2.1.2', + 'upsBasicConfigDeviceTableVaRating' => '1.3.6.1.4.1.318.1.1.1.5.1.2.1.3', + 'upsBasicConfigDeviceTableAcceptThisDevice' => '1.3.6.1.4.1.318.1.1.1.5.1.2.1.4', + 'upsAdvConfigRatedOutputVoltage' => '1.3.6.1.4.1.318.1.1.1.5.2.1', + 'upsAdvConfigHighTransferVolt' => '1.3.6.1.4.1.318.1.1.1.5.2.2', + 'upsAdvConfigLowTransferVolt' => '1.3.6.1.4.1.318.1.1.1.5.2.3', + 'upsAdvConfigAlarm' => '1.3.6.1.4.1.318.1.1.1.5.2.4', + 'upsAdvConfigAlarmTimer' => '1.3.6.1.4.1.318.1.1.1.5.2.5', + 'upsAdvConfigMinReturnCapacity' => '1.3.6.1.4.1.318.1.1.1.5.2.6', + 'upsAdvConfigSensitivity' => '1.3.6.1.4.1.318.1.1.1.5.2.7', + 'upsAdvConfigLowBatteryRunTime' => '1.3.6.1.4.1.318.1.1.1.5.2.8', + 'upsAdvConfigReturnDelay' => '1.3.6.1.4.1.318.1.1.1.5.2.9', + 'upsAdvConfigShutoffDelay' => '1.3.6.1.4.1.318.1.1.1.5.2.10', + 'upsAdvConfigUpsSleepTime' => '1.3.6.1.4.1.318.1.1.1.5.2.11', + 'upsAdvConfigSetEEPROMDefaults' => '1.3.6.1.4.1.318.1.1.1.5.2.12', + 'upsAdvConfigDipSwitchSettingDipSwitchIndex' => '1.3.6.1.4.1.318.1.1.1.5.2.13.1.1', + 'upsAdvConfigDipSwitchSettingDipSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.5.2.13.1.2', + 'upsAdvConfigBattExhaustThresh' => '1.3.6.1.4.1.318.1.1.1.5.2.14', + 'upsAdvConfigPassword' => '1.3.6.1.4.1.318.1.1.1.5.2.15', + 'apcUpsConfigFieldIndex' => '1.3.6.1.4.1.318.1.1.1.5.2.16.1.1', + 'apcUpsConfigFieldOID' => '1.3.6.1.4.1.318.1.1.1.5.2.16.1.2', + 'apcUpsConfigFieldValueRange' => '1.3.6.1.4.1.318.1.1.1.5.2.16.1.3', + 'upsAdvConfigBattCabAmpHour' => '1.3.6.1.4.1.318.1.1.1.5.2.17', + 'upsAdvConfigPositionSelector' => '1.3.6.1.4.1.318.1.1.1.5.2.18', + 'upsAdvConfigOutputFreqRange' => '1.3.6.1.4.1.318.1.1.1.5.2.19', + 'upsAdvConfigUPSFail' => '1.3.6.1.4.1.318.1.1.1.5.2.20', + 'upsAdvConfigAlarmRedundancy' => '1.3.6.1.4.1.318.1.1.1.5.2.21', + 'upsAdvConfigAlarmLoadOver' => '1.3.6.1.4.1.318.1.1.1.5.2.22', + 'upsAdvConfigAlarmRuntimeUnder' => '1.3.6.1.4.1.318.1.1.1.5.2.23', + 'upsAdvConfigVoutReporting' => '1.3.6.1.4.1.318.1.1.1.5.2.24', + 'upsAdvConfigNumExternalBatteries' => '1.3.6.1.4.1.318.1.1.1.5.2.25', + 'upsAdvConfigSimpleSignalShutdowns' => '1.3.6.1.4.1.318.1.1.1.5.2.26', + 'upsAdvConfigMaxShutdownTime' => '1.3.6.1.4.1.318.1.1.1.5.2.27', + 'upsAsiUpsControlServerRequestShutdown' => '1.3.6.1.4.1.318.1.1.1.5.2.28', + 'upsAdvConfigMinReturnRuntime' => '1.3.6.1.4.1.318.1.1.1.5.2.29', + 'upsAdvConfigBasicSignalLowBatteryDuration' => '1.3.6.1.4.1.318.1.1.1.5.2.30', + 'upsAdvConfigBypassPhaseLockRequired' => '1.3.6.1.4.1.318.1.1.1.5.2.31', + 'upsAdvConfigOutputFreqSlewRate' => '1.3.6.1.4.1.318.1.1.1.5.2.32', + 'upsAdvConfigChargerLevel' => '1.3.6.1.4.1.318.1.1.1.5.2.33', + 'upsAdvConfigBypassToleranceSetting' => '1.3.6.1.4.1.318.1.1.1.5.2.34', + 'upsAdvConfigMainsSetting' => '1.3.6.1.4.1.318.1.1.1.5.2.35', + 'upsAdvConfigACWiringSetting' => '1.3.6.1.4.1.318.1.1.1.5.2.36', + 'upsAdvConfigUpperOutputVoltTolerance' => '1.3.6.1.4.1.318.1.1.1.5.2.37', + 'upsAdvConfigLowerOutputVoltTolerance' => '1.3.6.1.4.1.318.1.1.1.5.2.38', + 'upsAdvConfigUpperBypassVoltTolerance' => '1.3.6.1.4.1.318.1.1.1.5.2.39', + 'upsAdvConfigLowerBypassVoltTolerance' => '1.3.6.1.4.1.318.1.1.1.5.2.40', + 'upsAdvConfigOutofSyncBypassTransferDelay' => '1.3.6.1.4.1.318.1.1.1.5.2.41', + 'upsBasicControlConserveBattery' => '1.3.6.1.4.1.318.1.1.1.6.1.1', + 'upsAdvControlUpsOff' => '1.3.6.1.4.1.318.1.1.1.6.2.1', + 'upsAdvControlRebootShutdownUps' => '1.3.6.1.4.1.318.1.1.1.6.2.2', + 'upsAdvControlUpsSleep' => '1.3.6.1.4.1.318.1.1.1.6.2.3', + 'upsAdvControlSimulatePowerFail' => '1.3.6.1.4.1.318.1.1.1.6.2.4', + 'upsAdvControlFlashAndBeep' => '1.3.6.1.4.1.318.1.1.1.6.2.5', + 'upsAdvControlTurnOnUPS' => '1.3.6.1.4.1.318.1.1.1.6.2.6', + 'upsAdvControlBypassSwitch' => '1.3.6.1.4.1.318.1.1.1.6.2.7', + 'upsAdvControlRebootUpsWithOrWithoutAC' => '1.3.6.1.4.1.318.1.1.1.6.2.8', + 'upsAdvControlFirmwareUpdate' => '1.3.6.1.4.1.318.1.1.1.6.2.9', + 'upsAdvTestDiagnosticSchedule' => '1.3.6.1.4.1.318.1.1.1.7.2.1', + 'upsAdvTestDiagnostics' => '1.3.6.1.4.1.318.1.1.1.7.2.2', + 'upsAdvTestDiagnosticsResults' => '1.3.6.1.4.1.318.1.1.1.7.2.3', + 'upsAdvTestLastDiagnosticsDate' => '1.3.6.1.4.1.318.1.1.1.7.2.4', + 'upsAdvTestRuntimeCalibration' => '1.3.6.1.4.1.318.1.1.1.7.2.5', + 'upsAdvTestCalibrationResults' => '1.3.6.1.4.1.318.1.1.1.7.2.6', + 'upsAdvTestCalibrationDate' => '1.3.6.1.4.1.318.1.1.1.7.2.7', + 'upsAdvTestDiagnosticTime' => '1.3.6.1.4.1.318.1.1.1.7.2.8', + 'upsAdvTestDiagnosticDay' => '1.3.6.1.4.1.318.1.1.1.7.2.9', + 'upsCommStatus' => '1.3.6.1.4.1.318.1.1.1.8.1', + 'upsPhaseResetMaxMinValues' => '1.3.6.1.4.1.318.1.1.1.9.1.1', + 'upsPhaseNumInputs' => '1.3.6.1.4.1.318.1.1.1.9.2.1', + 'upsPhaseInputTableIndex' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.1', + 'upsPhaseNumInputPhases' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.2', + 'upsPhaseInputVoltageOrientation' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.3', + 'upsPhaseInputFrequency' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.4', + 'upsPhaseInputType' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.5', + 'upsPhaseInputName' => '1.3.6.1.4.1.318.1.1.1.9.2.2.1.6', + 'upsPhaseInputPhaseTableIndex' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.1', + 'upsPhaseInputPhaseIndex' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.2', + 'upsPhaseInputVoltage' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.3', + 'upsPhaseInputMaxVoltage' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.4', + 'upsPhaseInputMinVoltage' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.5', + 'upsPhaseInputCurrent' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.6', + 'upsPhaseInputMaxCurrent' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.7', + 'upsPhaseInputMinCurrent' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.8', + 'upsPhaseInputPower' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.9', + 'upsPhaseInputMaxPower' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.10', + 'upsPhaseInputMinPower' => '1.3.6.1.4.1.318.1.1.1.9.2.3.1.11', + 'upsPhaseNumOutputs' => '1.3.6.1.4.1.318.1.1.1.9.3.1', + 'upsPhaseOutputTableIndex' => '1.3.6.1.4.1.318.1.1.1.9.3.2.1.1', + 'upsPhaseNumOutputPhases' => '1.3.6.1.4.1.318.1.1.1.9.3.2.1.2', + 'upsPhaseOutputVoltageOrientation' => '1.3.6.1.4.1.318.1.1.1.9.3.2.1.3', + 'upsPhaseOutputFrequency' => '1.3.6.1.4.1.318.1.1.1.9.3.2.1.4', + 'upsPhaseOutputPhaseTableIndex' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.1', + 'upsPhaseOutputPhaseIndex' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.2', + 'upsPhaseOutputVoltage' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.3', + 'upsPhaseOutputCurrent' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.4', + 'upsPhaseOutputMaxCurrent' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.5', + 'upsPhaseOutputMinCurrent' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.6', + 'upsPhaseOutputLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.7', + 'upsPhaseOutputMaxLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.8', + 'upsPhaseOutputMinLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.9', + 'upsPhaseOutputPercentLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.10', + 'upsPhaseOutputMaxPercentLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.11', + 'upsPhaseOutputMinPercentLoad' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.12', + 'upsPhaseOutputPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.13', + 'upsPhaseOutputMaxPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.14', + 'upsPhaseOutputMinPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.15', + 'upsPhaseOutputPercentPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.16', + 'upsPhaseOutputMaxPercentPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.17', + 'upsPhaseOutputMinPercentPower' => '1.3.6.1.4.1.318.1.1.1.9.3.3.1.18', + 'upsSCGMembershipGroupNumber' => '1.3.6.1.4.1.318.1.1.1.10.1.1', + 'upsSCGActiveMembershipStatus' => '1.3.6.1.4.1.318.1.1.1.10.1.2', + 'upsSCGPowerSynchronizationDelayTime' => '1.3.6.1.4.1.318.1.1.1.10.1.3', + 'upsSCGReturnBatteryCapacityOffset' => '1.3.6.1.4.1.318.1.1.1.10.1.4', + 'upsSCGMultiCastIP' => '1.3.6.1.4.1.318.1.1.1.10.1.5', + 'upsSCGNumOfGroupMembers' => '1.3.6.1.4.1.318.1.1.1.10.2.1', + 'upsSCGStatusTableIndex' => '1.3.6.1.4.1.318.1.1.1.10.2.2.1.1', + 'upsSCGMemberIP' => '1.3.6.1.4.1.318.1.1.1.10.2.2.1.2', + 'upsSCGACInputStatus' => '1.3.6.1.4.1.318.1.1.1.10.2.2.1.3', + 'upsSCGACOutputStatus' => '1.3.6.1.4.1.318.1.1.1.10.2.2.1.4', + 'upsBasicStateOutputState' => '1.3.6.1.4.1.318.1.1.1.11.1.1', + 'upsAdvStateAbnormalConditions' => '1.3.6.1.4.1.318.1.1.1.11.2.1', + 'upsAdvStateSymmetra3PhaseSpecificFaults' => '1.3.6.1.4.1.318.1.1.1.11.2.2', + 'upsAdvStateDP300ESpecificFaults' => '1.3.6.1.4.1.318.1.1.1.11.2.3', + 'upsAdvStateSymmetraSpecificFaults' => '1.3.6.1.4.1.318.1.1.1.11.2.4', + 'upsAdvStateSmartUPSSpecificFaults' => '1.3.6.1.4.1.318.1.1.1.11.2.5', + 'upsAdvStateSystemMessages' => '1.3.6.1.4.1.318.1.1.1.11.2.6', + 'upsOutletGroupStatusTableSize' => '1.3.6.1.4.1.318.1.1.1.12.1.1', + 'upsOutletGroupStatusIndex' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.1', + 'upsOutletGroupStatusName' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.2', + 'upsOutletGroupStatusGroupState' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.3', + 'upsOutletGroupStatusCommandPending' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.4', + 'upsOutletGroupStatusOutletType' => '1.3.6.1.4.1.318.1.1.1.12.1.2.1.5', + 'upsOutletGroupConfigTableSize' => '1.3.6.1.4.1.318.1.1.1.12.2.1', + 'upsOutletGroupConfigIndex' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.1', + 'upsOutletGroupConfigName' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.2', + 'upsOutletGroupConfigPowerOnDelay' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.3', + 'upsOutletGroupConfigPowerOffDelay' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.4', + 'upsOutletGroupConfigRebootDuration' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.5', + 'upsOutletGroupConfigMinReturnRuntime' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.6', + 'upsOutletGroupConfigOutletType' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.7', + 'upsOutletGroupConfigLoadShedControlSkipOffDelay' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.8', + 'upsOutletGroupConfigLoadShedControlAutoRestart' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.9', + 'upsOutletGroupConfigLoadShedControlTimeOnBattery' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.10', + 'upsOutletGroupConfigLoadShedControlRuntimeRemaining' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.11', + 'upsOutletGroupConfigLoadShedControlInOverload' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.12', + 'upsOutletGroupConfigLoadShedTimeOnBattery' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.13', + 'upsOutletGroupConfigLoadShedRuntimeRemaining' => '1.3.6.1.4.1.318.1.1.1.12.2.2.1.14', + 'upsOutletGroupControlTableSize' => '1.3.6.1.4.1.318.1.1.1.12.3.1', + 'upsOutletGroupControlIndex' => '1.3.6.1.4.1.318.1.1.1.12.3.2.1.1', + 'upsOutletGroupControlName' => '1.3.6.1.4.1.318.1.1.1.12.3.2.1.2', + 'upsOutletGroupControlCommand' => '1.3.6.1.4.1.318.1.1.1.12.3.2.1.3', + 'upsOutletGroupControlOutletType' => '1.3.6.1.4.1.318.1.1.1.12.3.2.1.4', + 'upsDiagIMTableSize' => '1.3.6.1.4.1.318.1.1.1.13.1.1', + 'upsDiagIMIndex' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.1', + 'upsDiagIMType' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.2', + 'upsDiagIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.3', + 'upsDiagIMFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.4', + 'upsDiagIMSlaveFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.5', + 'upsDiagIMHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.6', + 'upsDiagIMSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.7', + 'upsDiagIMManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.1.2.1.8', + 'upsDiagPMTableSize' => '1.3.6.1.4.1.318.1.1.1.13.2.1', + 'upsDiagPMIndex' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.1', + 'upsDiagPMStatus' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.2', + 'upsDiagPMFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.3', + 'upsDiagPMHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.4', + 'upsDiagPMSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.5', + 'upsDiagPMManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.2.2.1.6', + 'upsDiagBatteryTableSize' => '1.3.6.1.4.1.318.1.1.1.13.3.1', + 'upsDiagBatteryFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.1', + 'upsDiagBatteryIndex' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.2', + 'upsDiagBatteryStatus' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.3', + 'upsDiagBatterySerialNumber' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.4', + 'upsDiagBatteryFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.5', + 'upsDiagBatteryManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.6', + 'upsDiagBatteryType' => '1.3.6.1.4.1.318.1.1.1.13.3.2.1.7', + 'upsDiagSubSysFrameTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.1', + 'upsDiagSubSysFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.1', + 'upsDiagSubSysFrameType' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.2', + 'upsDiagSubSysFrameFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.3', + 'upsDiagSubSysFrameHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.4', + 'upsDiagSubSysFrameSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.5', + 'upsDiagSubSysFrameManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.2.1.6', + 'upsDiagSubSysIntBypSwitchTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.3', + 'upsDiagSubSysIntBypSwitchFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.1', + 'upsDiagSubSysIntBypSwitchIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.2', + 'upsDiagSubSysIntBypSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.3', + 'upsDiagSubSysIntBypSwitchFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.4', + 'upsDiagSubSysIntBypSwitchHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.5', + 'upsDiagSubSysIntBypSwitchSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.6', + 'upsDiagSubSysIntBypSwitchManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.4.1.7', + 'upsDiagSubSysBattMonitorTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.5', + 'upsDiagSubSysBattMonitorFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.1', + 'upsDiagSubSysBattMonitorIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.2', + 'upsDiagSubSysBattMonitorStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.3', + 'upsDiagSubSysBattMonitorFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.4', + 'upsDiagSubSysBattMonitorHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.5', + 'upsDiagSubSysBattMonitorSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.6', + 'upsDiagSubSysBattMonitorManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.6.1.7', + 'upsDiagSubSysExternalSwitchGearTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.7', + 'upsDiagSubSysExternalSwitchGearFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.1', + 'upsDiagSubSysExternalSwitchGearIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.2', + 'upsDiagSubSysExternalSwitchGearStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.3', + 'upsDiagSubSysExternalSwitchGearFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.4', + 'upsDiagSubSysExternalSwitchGearHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.5', + 'upsDiagSubSysExternalSwitchGearSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.6', + 'upsDiagSubSysExternalSwitchGearManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.8.1.7', + 'upsDiagSubSysDisplayInterfaceCardTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.9', + 'upsDiagSubSysDisplayInterfaceCardFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.10.1.1', + 'upsDiagSubSysDisplayInterfaceCardIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.10.1.2', + 'upsDiagSubSysDisplayInterfaceCardStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.10.1.3', + 'upsDiagSubSysDCCircuitBreakerTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.11', + 'upsDiagSubSysDCCircuitBreakerFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.12.1.1', + 'upsDiagSubSysDCCircuitBreakerIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.12.1.2', + 'upsDiagSubSysDCCircuitBreakerStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.12.1.3', + 'upsDiagSubSysSystemPowerSupplyTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.13', + 'upsDiagSubSysSystemPowerSupplyFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.1', + 'upsDiagSubSysSystemPowerSupplyIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.2', + 'upsDiagSubSysSystemPowerSupplyStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.3', + 'upsDiagSubSysSystemPowerSupplyFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.4', + 'upsDiagSubSysSystemPowerSupplyHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.5', + 'upsDiagSubSysSystemPowerSupplySerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.6', + 'upsDiagSubSysSystemPowerSupplyManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.14.1.7', + 'upsDiagSubSysXRCommunicationCardTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.15', + 'upsDiagSubSysXRCommunicationCardFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.1', + 'upsDiagSubSysXRCommunicationCardIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.2', + 'upsDiagSubSysXRCommunicationCardStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.3', + 'upsDiagSubSysXRCommunicationCardFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.4', + 'upsDiagSubSysXRCommunicationCardSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.16.1.5', + 'upsDiagSubSysExternalPowerFrameBoardTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.17', + 'upsDiagSubSysExternalPowerFrameBoardFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.18.1.1', + 'upsDiagSubSysExternalPowerFrameBoardIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.18.1.2', + 'upsDiagSubSysExternalPowerFrameBoardStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.18.1.3', + 'upsDiagSubSysChargerTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.19', + 'upsDiagSubSysChargerFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.20.1.1', + 'upsDiagSubSysChargerIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.20.1.2', + 'upsDiagSubSysChargerStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.20.1.3', + 'upsDiagSubSysInverterTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.21', + 'upsDiagSubSysInverterFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.1', + 'upsDiagSubSysInverterIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.2', + 'upsDiagSubSysInverterStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.3', + 'upsDiagSubSysInverterFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.4', + 'upsDiagSubSysInverterHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.5', + 'upsDiagSubSysInverterSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.6', + 'upsDiagSubSysInverterManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.22.1.7', + 'upsDiagSubSysPowerFactorCorrectionTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.23', + 'upsDiagSubSysPowerFactorCorrectionFrameIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.1', + 'upsDiagSubSysPowerFactorCorrectionIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.2', + 'upsDiagSubSysPowerFactorCorrectionStatus' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.3', + 'upsDiagSubSysPowerFactorCorrectionFirmwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.4', + 'upsDiagSubSysPowerFactorCorrectionHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.5', + 'upsDiagSubSysPowerFactorCorrectionSerialNum' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.6', + 'upsDiagSubSysPowerFactorCorrectionManufactureDate' => '1.3.6.1.4.1.318.1.1.1.13.4.24.1.7', + 'upsDiagSubSysNetworkComCardTableSize' => '1.3.6.1.4.1.318.1.1.1.13.4.25', + 'upsDiagSubSysNetworkComCardIndex' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.1', + 'upsDiagSubSysNetworkComCardModelNumber' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.2', + 'upsDiagSubSysNetworkComCardSerialNumber' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.3', + 'upsDiagSubSysNetworkComCardDateOfManufacture' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.4', + 'upsDiagSubSysNetworkComCardHardwareRev' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.5', + 'upsDiagSubSysNetworkComCardFirmwareAppRev' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.6', + 'upsDiagSubSysNetworkComCardFirmwareAppOSRev' => '1.3.6.1.4.1.318.1.1.1.13.4.26.1.7', + 'upsDiagSwitchGearStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.1', + 'upsDiagSwitchGearInputSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.2', + 'upsDiagSwitchGearOutputSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.3', + 'upsDiagSwitchGearBypassSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.4', + 'upsDiagSwitchGearBypassInputSwitchStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.1.5', + 'upsDiagSwitchGearBreakerTableSize' => '1.3.6.1.4.1.318.1.1.1.13.5.1.6', + 'switchgearBreakerIndex' => '1.3.6.1.4.1.318.1.1.1.13.5.1.7.1.1', + 'switchgearBreakerPresent' => '1.3.6.1.4.1.318.1.1.1.13.5.1.7.1.2', + 'switchgearBreakerName' => '1.3.6.1.4.1.318.1.1.1.13.5.1.7.1.3', + 'upsDiagSubFeedBreakerTableSize' => '1.3.6.1.4.1.318.1.1.1.13.5.1.8', + 'subfeedBreakerIndex' => '1.3.6.1.4.1.318.1.1.1.13.5.1.9.1.1', + 'subfeedBreakerPresent' => '1.3.6.1.4.1.318.1.1.1.13.5.1.9.1.2', + 'subfeedBreakerRating' => '1.3.6.1.4.1.318.1.1.1.13.5.1.9.1.3', + 'subfeedBreakerUpperAcceptPowerWarning' => '1.3.6.1.4.1.318.1.1.1.13.5.1.9.1.4', + 'upsDiagMCCBBoxStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.2.1', + 'upsDiagTransformerStatus' => '1.3.6.1.4.1.318.1.1.1.13.5.3.1', + 'upsDiagComBusInternalMIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.1', + 'upsDiagComBusInternalRIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.2', + 'upsDiagComBusMIMtoRIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.3', + 'upsDiagComBusExternalMIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.4', + 'upsDiagComBusExternalRIMStatus' => '1.3.6.1.4.1.318.1.1.1.13.6.5', + 'upsParallelSysLocalAddress' => '1.3.6.1.4.1.318.1.1.1.14.1', + 'upsParallelSysRemoteAddress' => '1.3.6.1.4.1.318.1.1.1.14.2', + 'upsParallelSysRedundancy' => '1.3.6.1.4.1.318.1.1.1.14.3', + 'upsIOFrameLayoutPositionID' => '1.3.6.1.4.1.318.1.1.1.15.1', + 'upsBottomFeedFrameLayoutPositionID' => '1.3.6.1.4.1.318.1.1.1.15.2', + 'upsSwitchGearLayoutPositionID' => '1.3.6.1.4.1.318.1.1.1.15.3', + 'upsBatteryFrameLayoutTableSize' => '1.3.6.1.4.1.318.1.1.1.15.4', + 'batteryFrameIndex' => '1.3.6.1.4.1.318.1.1.1.15.5.1.1', + 'batteryFramePositionID' => '1.3.6.1.4.1.318.1.1.1.15.5.1.2', + 'upsSideCarFrameLayoutTableSize' => '1.3.6.1.4.1.318.1.1.1.15.6', + 'sideCarFrameIndex' => '1.3.6.1.4.1.318.1.1.1.15.7.1.1', + 'sideCarFramePositionID' => '1.3.6.1.4.1.318.1.1.1.15.7.1.2', + 'upsPowerFrameLayoutTableSize' => '1.3.6.1.4.1.318.1.1.1.15.8', + 'powerFrameIndex' => '1.3.6.1.4.1.318.1.1.1.15.9.1.1', + 'powerFramePositionID' => '1.3.6.1.4.1.318.1.1.1.15.9.1.2', + 'upsIntegratedATSSelectedSource' => '1.3.6.1.4.1.318.1.1.1.16.1', + 'upsIntegratedATSPreferredSource' => '1.3.6.1.4.1.318.1.1.1.16.2', + 'upsIntegratedATSUpsReturnStaggering' => '1.3.6.1.4.1.318.1.1.1.16.3', + 'upsIntegratedATSSourceTableSize' => '1.3.6.1.4.1.318.1.1.1.16.4', + 'upsIntegratedATSSourceIndex' => '1.3.6.1.4.1.318.1.1.1.16.5.1.1', + 'upsIntegratedATSSourceName' => '1.3.6.1.4.1.318.1.1.1.16.5.1.2', + 'upsIntegratedATSSourceStatus' => '1.3.6.1.4.1.318.1.1.1.16.5.1.3', + 'upsIntegratedATSLineFailDelay' => '1.3.6.1.4.1.318.1.1.1.16.5.1.4', + 'upsIntegratedATSLineStabilityDelay' => '1.3.6.1.4.1.318.1.1.1.16.5.1.5', + 'mUpsEnvironAmbientTemperature' => '1.3.6.1.4.1.318.1.1.2.1.1', + 'mUpsEnvironRelativeHumidity' => '1.3.6.1.4.1.318.1.1.2.1.2', + 'mUpsEnvironAmbientTemperature2' => '1.3.6.1.4.1.318.1.1.2.1.3', + 'mUpsEnvironRelativeHumidity2' => '1.3.6.1.4.1.318.1.1.2.1.4', + 'mUpsContactNumContacts' => '1.3.6.1.4.1.318.1.1.2.2.1', + 'mUpsContactTableContactNumber' => '1.3.6.1.4.1.318.1.1.2.2.2.1.1', + 'mUpsContactTableNormalState' => '1.3.6.1.4.1.318.1.1.2.2.2.1.2', + 'mUpsContactTableDescription' => '1.3.6.1.4.1.318.1.1.2.2.2.1.3', + 'mUpsContactTableMonitoringStatus' => '1.3.6.1.4.1.318.1.1.2.2.2.1.4', + 'mUpsContactTableCurrentStatus' => '1.3.6.1.4.1.318.1.1.2.2.2.1.5' +); /** * APC UPSD OID Cross Reference * Source: src/drivers/snmplite/mge-oids.h */ -$mge_oids = []; +$mge_oids = array( + 'upsmgIdentFamilyName' => '1.3.6.1.4.1.705.1.1.1', + 'upsmgIdentModelName' => '1.3.6.1.4.1.705.1.1.2', + 'upsmgIdentRevisionLevel' => '1.3.6.1.4.1.705.1.1.3', + 'upsmgIdentFirmwareVersion' => '1.3.6.1.4.1.705.1.1.4', + 'upsmgIdentUserID' => '1.3.6.1.4.1.705.1.1.5', + 'upsmgIdentInstallationDate' => '1.3.6.1.4.1.705.1.1.6', + 'upsmgIdentSerialNumber' => '1.3.6.1.4.1.705.1.1.7', + 'upsmgManagersNum' => '1.3.6.1.4.1.705.1.2.1', + 'mgmanagerIndex' => '1.3.6.1.4.1.705.1.2.2.1.1', + 'mgmanagerDeviceNumber' => '1.3.6.1.4.1.705.1.2.2.1.2', + 'mgmanagerNMSType' => '1.3.6.1.4.1.705.1.2.2.1.3', + 'mgmanagerCommType' => '1.3.6.1.4.1.705.1.2.2.1.4', + 'mgmanagerDescr' => '1.3.6.1.4.1.705.1.2.2.1.5', + 'mgmanagerAddress' => '1.3.6.1.4.1.705.1.2.2.1.6', + 'mgmanagerCommunity' => '1.3.6.1.4.1.705.1.2.2.1.7', + 'mgmanagerSeverityLevel' => '1.3.6.1.4.1.705.1.2.2.1.8', + 'mgmanagerTrapAck' => '1.3.6.1.4.1.705.1.2.2.1.9', + 'upsmgReceptaclesNum' => '1.3.6.1.4.1.705.1.3.1', + 'mgreceptacleIndex' => '1.3.6.1.4.1.705.1.3.2.1.1', + 'mgreceptacleLevel' => '1.3.6.1.4.1.705.1.3.2.1.2', + 'mgreceptacleType' => '1.3.6.1.4.1.705.1.3.2.1.3', + 'mgreceptacleIdent' => '1.3.6.1.4.1.705.1.3.2.1.4', + 'mgreceptacleState' => '1.3.6.1.4.1.705.1.3.2.1.5', + 'mgreceptacleReceptacle' => '1.3.6.1.4.1.705.1.3.2.1.6', + 'mgreceptaclePowerCons' => '1.3.6.1.4.1.705.1.3.2.1.7', + 'mgreceptacleOverload' => '1.3.6.1.4.1.705.1.3.2.1.8', + 'mgreceptacleAutonomy' => '1.3.6.1.4.1.705.1.3.2.1.9', + 'upsmgConfigBatteryInstalled' => '1.3.6.1.4.1.705.1.4.1', + 'upsmgConfigNominalBatteryVoltage' => '1.3.6.1.4.1.705.1.4.2', + 'upsmgConfigNominalBatteryTime' => '1.3.6.1.4.1.705.1.4.3', + 'upsmgConfigNominalRechargeTime' => '1.3.6.1.4.1.705.1.4.4', + 'upsmgConfigMinRechargeLevel' => '1.3.6.1.4.1.705.1.4.5', + 'upsmgConfigMaxRechargeTime' => '1.3.6.1.4.1.705.1.4.6', + 'upsmgConfigLowBatteryTime' => '1.3.6.1.4.1.705.1.4.7', + 'upsmgConfigLowBatteryLevel' => '1.3.6.1.4.1.705.1.4.8', + 'upsmgConfigAutoRestart' => '1.3.6.1.4.1.705.1.4.9', + 'upsmgConfigShutdownTimer' => '1.3.6.1.4.1.705.1.4.10', + 'upsmgConfigSysShutDuration' => '1.3.6.1.4.1.705.1.4.11', + 'upsmgConfigVARating' => '1.3.6.1.4.1.705.1.4.12', + 'upsmgConfigLowTransfer' => '1.3.6.1.4.1.705.1.4.13', + 'upsmgConfigHighTransfer' => '1.3.6.1.4.1.705.1.4.14', + 'upsmgConfigOutputNominalVoltage' => '1.3.6.1.4.1.705.1.4.15', + 'upsmgConfigOutputNominalCurrent' => '1.3.6.1.4.1.705.1.4.16', + 'upsmgConfigOutputNomFrequency' => '1.3.6.1.4.1.705.1.4.17', + 'upsmgConfigByPassType' => '1.3.6.1.4.1.705.1.4.18', + 'upsmgConfigAlarmAudible' => '1.3.6.1.4.1.705.1.4.19', + 'upsmgConfigAlarmTimeDelay' => '1.3.6.1.4.1.705.1.4.20', + 'upsmgConfigDevicesNum' => '1.3.6.1.4.1.705.1.4.21', + 'mgdeviceIndex' => '1.3.6.1.4.1.705.1.4.22.1.1', + 'mgdeviceReceptacleNum' => '1.3.6.1.4.1.705.1.4.22.1.2', + 'mgdeviceIdent' => '1.3.6.1.4.1.705.1.4.22.1.3', + 'mgdeviceVaRating' => '1.3.6.1.4.1.705.1.4.22.1.4', + 'mgdeviceSequenceOff' => '1.3.6.1.4.1.705.1.4.22.1.5', + 'mgdeviceSequenceOn' => '1.3.6.1.4.1.705.1.4.22.1.6', + 'mgdeviceShutdownDuration' => '1.3.6.1.4.1.705.1.4.22.1.7', + 'mgdeviceBootUpDuration' => '1.3.6.1.4.1.705.1.4.22.1.8', + 'mgreceptacleIndexb' => '1.3.6.1.4.1.705.1.4.23.1.1', + 'mgreceptacleStateTurnOn' => '1.3.6.1.4.1.705.1.4.23.1.2', + 'mgreceptacleStateMainReturn' => '1.3.6.1.4.1.705.1.4.23.1.3', + 'mgreceptacleStateDischarge' => '1.3.6.1.4.1.705.1.4.23.1.4', + 'mgreceptacleShutoffLevel' => '1.3.6.1.4.1.705.1.4.23.1.5', + 'mgreceptacleShutoffTimer' => '1.3.6.1.4.1.705.1.4.23.1.6', + 'mgreceptacleRestartLevel' => '1.3.6.1.4.1.705.1.4.23.1.7', + 'mgreceptacleRestartDelay' => '1.3.6.1.4.1.705.1.4.23.1.8', + 'mgreceptacleShutdownDuration' => '1.3.6.1.4.1.705.1.4.23.1.9', + 'mgreceptacleBootUpDuration' => '1.3.6.1.4.1.705.1.4.23.1.10', + 'upsmgConfigExtAlarmNum' => '1.3.6.1.4.1.705.1.4.24', + 'mgextAlarmIndex' => '1.3.6.1.4.1.705.1.4.25.1.1', + 'mgextAlarmUID' => '1.3.6.1.4.1.705.1.4.25.1.2', + 'upsmgConfigEmergencyTestFail' => '1.3.6.1.4.1.705.1.4.26', + 'upsmgConfigEmergencyOnByPass' => '1.3.6.1.4.1.705.1.4.27', + 'upsmgConfigEmergencyOverload' => '1.3.6.1.4.1.705.1.4.28', + 'mgcontrolDayIndex' => '1.3.6.1.4.1.705.1.4.29.1.1', + 'mgcontrolDayOn' => '1.3.6.1.4.1.705.1.4.29.1.2', + 'mgcontrolDayOff' => '1.3.6.1.4.1.705.1.4.29.1.3', + 'upsmgConfigLowBooster' => '1.3.6.1.4.1.705.1.4.30', + 'upsmgConfigHighBooster' => '1.3.6.1.4.1.705.1.4.31', + 'upsmgConfigLowFader' => '1.3.6.1.4.1.705.1.4.32', + 'upsmgConfigHighFader' => '1.3.6.1.4.1.705.1.4.33', + 'upsmgConfigSensorIndex' => '1.3.6.1.4.1.705.1.4.34.1.1', + 'upsmgConfigSensorName' => '1.3.6.1.4.1.705.1.4.34.1.2', + 'upsmgConfigTemperatureLow' => '1.3.6.1.4.1.705.1.4.34.1.3', + 'upsmgConfigTemperatureHigh' => '1.3.6.1.4.1.705.1.4.34.1.4', + 'upsmgConfigTemperatureHysteresis' => '1.3.6.1.4.1.705.1.4.34.1.5', + 'upsmgConfigHumidityLow' => '1.3.6.1.4.1.705.1.4.34.1.6', + 'upsmgConfigHumidityHigh' => '1.3.6.1.4.1.705.1.4.34.1.7', + 'upsmgConfigHumidityHysteresis' => '1.3.6.1.4.1.705.1.4.34.1.8', + 'upsmgConfigInput1Name' => '1.3.6.1.4.1.705.1.4.34.1.9', + 'upsmgConfigInput1ClosedLabel' => '1.3.6.1.4.1.705.1.4.34.1.10', + 'upsmgConfigInput1OpenLabel' => '1.3.6.1.4.1.705.1.4.34.1.11', + 'upsmgConfigInput2Name' => '1.3.6.1.4.1.705.1.4.34.1.12', + 'upsmgConfigInput2ClosedLabel' => '1.3.6.1.4.1.705.1.4.34.1.13', + 'upsmgConfigInput2OpenLabel' => '1.3.6.1.4.1.705.1.4.34.1.14', + 'upsmgBatteryRemainingTime' => '1.3.6.1.4.1.705.1.5.1', + 'upsmgBatteryLevel' => '1.3.6.1.4.1.705.1.5.2', + 'upsmgBatteryRechargeTime' => '1.3.6.1.4.1.705.1.5.3', + 'upsmgBatteryRechargeLevel' => '1.3.6.1.4.1.705.1.5.4', + 'upsmgBatteryVoltage' => '1.3.6.1.4.1.705.1.5.5', + 'upsmgBatteryCurrent' => '1.3.6.1.4.1.705.1.5.6', + 'upsmgBatteryTemperature' => '1.3.6.1.4.1.705.1.5.7', + 'upsmgBatteryFullRechargeTime' => '1.3.6.1.4.1.705.1.5.8', + 'upsmgBatteryFaultBattery' => '1.3.6.1.4.1.705.1.5.9', + 'upsmgBatteryNoBattery' => '1.3.6.1.4.1.705.1.5.10', + 'upsmgBatteryReplacement' => '1.3.6.1.4.1.705.1.5.11', + 'upsmgBatteryUnavailableBattery' => '1.3.6.1.4.1.705.1.5.12', + 'upsmgBatteryNotHighCharge' => '1.3.6.1.4.1.705.1.5.13', + 'upsmgBatteryLowBattery' => '1.3.6.1.4.1.705.1.5.14', + 'upsmgBatteryChargerFault' => '1.3.6.1.4.1.705.1.5.15', + 'upsmgBatteryLowCondition' => '1.3.6.1.4.1.705.1.5.16', + 'upsmgBatteryLowRecharge' => '1.3.6.1.4.1.705.1.5.17', + 'upsmgInputPhaseNum' => '1.3.6.1.4.1.705.1.6.1', + 'mginputIndex' => '1.3.6.1.4.1.705.1.6.2.1.1', + 'mginputVoltage' => '1.3.6.1.4.1.705.1.6.2.1.2', + 'mginputFrequency' => '1.3.6.1.4.1.705.1.6.2.1.3', + 'mginputMinimumVoltage' => '1.3.6.1.4.1.705.1.6.2.1.4', + 'mginputMaximumVoltage' => '1.3.6.1.4.1.705.1.6.2.1.5', + 'mginputCurrent' => '1.3.6.1.4.1.705.1.6.2.1.6', + 'upsmgInputBadStatus' => '1.3.6.1.4.1.705.1.6.3', + 'upsmgInputLineFailCause' => '1.3.6.1.4.1.705.1.6.4', + 'upsmgOutputPhaseNum' => '1.3.6.1.4.1.705.1.7.1', + 'mgoutputPhaseIndex' => '1.3.6.1.4.1.705.1.7.2.1.1', + 'mgoutputVoltage' => '1.3.6.1.4.1.705.1.7.2.1.2', + 'mgoutputFrequency' => '1.3.6.1.4.1.705.1.7.2.1.3', + 'mgoutputLoadPerPhase' => '1.3.6.1.4.1.705.1.7.2.1.4', + 'mgoutputCurrent' => '1.3.6.1.4.1.705.1.7.2.1.5', + 'upsmgOutputOnBattery' => '1.3.6.1.4.1.705.1.7.3', + 'upsmgOutputOnByPass' => '1.3.6.1.4.1.705.1.7.4', + 'upsmgOutputUnavailableByPass' => '1.3.6.1.4.1.705.1.7.5', + 'upsmgOutputNoByPass' => '1.3.6.1.4.1.705.1.7.6', + 'upsmgOutputUtilityOff' => '1.3.6.1.4.1.705.1.7.7', + 'upsmgOutputOnBoost' => '1.3.6.1.4.1.705.1.7.8', + 'upsmgOutputInverterOff' => '1.3.6.1.4.1.705.1.7.9', + 'upsmgOutputOverLoad' => '1.3.6.1.4.1.705.1.7.10', + 'upsmgOutputOverTemp' => '1.3.6.1.4.1.705.1.7.11', + 'upsmgOutputOnBuck' => '1.3.6.1.4.1.705.1.7.12', + 'upsmgEnvironAmbientTemp' => '1.3.6.1.4.1.705.1.8.1', + 'upsmgEnvironAmbientHumidity' => '1.3.6.1.4.1.705.1.8.2', + 'mgalarmNum' => '1.3.6.1.4.1.705.1.8.3.1.1', + 'mgalarmState' => '1.3.6.1.4.1.705.1.8.3.1.2', + 'upsmgEnvironSensorNum' => '1.3.6.1.4.1.705.1.8.4', + 'mgsensorNum' => '1.3.6.1.4.1.705.1.8.5.1.1', + 'mgsensorTemp' => '1.3.6.1.4.1.705.1.8.5.1.2', + 'mgsensorHumidity' => '1.3.6.1.4.1.705.1.8.5.1.3', + 'upsmgEnvironmentNum' => '1.3.6.1.4.1.705.1.8.6', + 'upsmgEnvironmentIndex' => '1.3.6.1.4.1.705.1.8.7.1.1', + 'upsmgEnvironmentComFailure' => '1.3.6.1.4.1.705.1.8.7.1.2', + 'upsmgEnvironmentTemperature' => '1.3.6.1.4.1.705.1.8.7.1.3', + 'upsmgEnvironmentTemperatureLow' => '1.3.6.1.4.1.705.1.8.7.1.4', + 'upsmgEnvironmentTemperatureHigh' => '1.3.6.1.4.1.705.1.8.7.1.5', + 'upsmgEnvironmentHumidity' => '1.3.6.1.4.1.705.1.8.7.1.6', + 'upsmgEnvironmentHumidityLow' => '1.3.6.1.4.1.705.1.8.7.1.7', + 'upsmgEnvironmentHumidityHigh' => '1.3.6.1.4.1.705.1.8.7.1.8', + 'upsmgEnvironmentInput1State' => '1.3.6.1.4.1.705.1.8.7.1.9', + 'upsmgEnvironmentInput2State' => '1.3.6.1.4.1.705.1.8.7.1.10', + 'mgreceptacleIndexc' => '1.3.6.1.4.1.705.1.9.1.1.1', + 'mgreceptacleOnDelay' => '1.3.6.1.4.1.705.1.9.1.1.2', + 'mgreceptacleOnCtrl' => '1.3.6.1.4.1.705.1.9.1.1.3', + 'mgreceptacleOnStatus' => '1.3.6.1.4.1.705.1.9.1.1.4', + 'mgreceptacleOffDelay' => '1.3.6.1.4.1.705.1.9.1.1.5', + 'mgreceptacleOffCtrl' => '1.3.6.1.4.1.705.1.9.1.1.6', + 'mgreceptacleOffStatus' => '1.3.6.1.4.1.705.1.9.1.1.7', + 'mgreceptacleToggleDelay' => '1.3.6.1.4.1.705.1.9.1.1.8', + 'mgreceptacleToggleCtrl' => '1.3.6.1.4.1.705.1.9.1.1.9', + 'mgreceptacleToggleStatus' => '1.3.6.1.4.1.705.1.9.1.1.10', + 'mgreceptacleToggleDuration' => '1.3.6.1.4.1.705.1.9.1.1.11', + 'upsmgControlDayOff' => '1.3.6.1.4.1.705.1.9.2', + 'upsmgControlDayOn' => '1.3.6.1.4.1.705.1.9.3', + 'upsmgTestBatterySchedule' => '1.3.6.1.4.1.705.1.10.1', + 'upsmgTestDiagnostics' => '1.3.6.1.4.1.705.1.10.2', + 'upsmgTestDiagResult' => '1.3.6.1.4.1.705.1.10.3', + 'upsmgTestBatteryCalibration' => '1.3.6.1.4.1.705.1.10.4', + 'upsmgTestLastCalibration' => '1.3.6.1.4.1.705.1.10.5', + 'upsmgTestIndicators' => '1.3.6.1.4.1.705.1.10.6', + 'upsmgTestCommandLine' => '1.3.6.1.4.1.705.1.10.7', + 'upsmgTestCommandReady' => '1.3.6.1.4.1.705.1.10.8', + 'upsmgTestResponseLine' => '1.3.6.1.4.1.705.1.10.9', + 'upsmgTestResponseReady' => '1.3.6.1.4.1.705.1.10.10', + 'upsmgTestBatteryResult' => '1.3.6.1.4.1.705.1.10.11', + 'upsmgAgentIpaddress' => '1.3.6.1.4.1.705.1.12.1', + 'upsmgAgentSubnetMask' => '1.3.6.1.4.1.705.1.12.2', + 'upsmgAgentDefGateway' => '1.3.6.1.4.1.705.1.12.3', + 'upsmgAgentBaudRate' => '1.3.6.1.4.1.705.1.12.4', + 'upsmgAgentPollRate' => '1.3.6.1.4.1.705.1.12.5', + 'upsmgAgentType' => '1.3.6.1.4.1.705.1.12.6', + 'upsmgAgentTrapAlarmDelay' => '1.3.6.1.4.1.705.1.12.7', + 'upsmgAgentTrapAlarmRetry' => '1.3.6.1.4.1.705.1.12.8', + 'upsmgAgentReset' => '1.3.6.1.4.1.705.1.12.9', + 'upsmgAgentFactReset' => '1.3.6.1.4.1.705.1.12.10', + 'upsmgAgentMibVersion' => '1.3.6.1.4.1.705.1.12.11', + 'upsmgAgentFirmwareVersion' => '1.3.6.1.4.1.705.1.12.12', + 'upsmgAgentCommUPS' => '1.3.6.1.4.1.705.1.12.13', + 'upsmgAgentTrapAck' => '1.3.6.1.4.1.705.1.12.14', + 'upsmgAgentAutoLearning' => '1.3.6.1.4.1.705.1.12.15', + 'upsmgAgentBootP' => '1.3.6.1.4.1.705.1.12.16', + 'upsmgAgentTFTP' => '1.3.6.1.4.1.705.1.12.17', + 'upsmgAgentTrapSignature' => '1.3.6.1.4.1.705.1.12.18', + 'upsmgRemoteOnBattery' => '1.3.6.1.4.1.705.1.13.1', + 'upsmgRemoteIpAddress' => '1.3.6.1.4.1.705.1.13.2', +); /** * APC UPSD OID Cross Reference * Source: src/drivers/snmplite/rfc1628-oids.h */ -$rfc_oids = []; +$rfc_oids = array( + 'upsIdentManufacturer' => '1.3.6.1.2.1.33.1.1.1', + 'upsIdentModel' => '1.3.6.1.2.1.33.1.1.2', + 'upsIdentUPSSoftwareVersion' => '1.3.6.1.2.1.33.1.1.3', + 'upsIdentAgentSoftwareVersion' => '1.3.6.1.2.1.33.1.1.4', + 'upsIdentName' => '1.3.6.1.2.1.33.1.1.5', + 'upsIdentAttachedDevices' => '1.3.6.1.2.1.33.1.1.6', + 'upsBatteryStatus' => '1.3.6.1.2.1.33.1.2.1', + 'upsSecondsOnBattery' => '1.3.6.1.2.1.33.1.2.2', + 'upsEstimatedMinutesRemaining' => '1.3.6.1.2.1.33.1.2.3', + 'upsEstimatedChargeRemaining' => '1.3.6.1.2.1.33.1.2.4', + 'upsBatteryVoltage' => '1.3.6.1.2.1.33.1.2.5', + 'upsBatteryCurrent' => '1.3.6.1.2.1.33.1.2.6', + 'upsBatteryTemperature' => '1.3.6.1.2.1.33.1.2.7', + 'upsInputLineBads' => '1.3.6.1.2.1.33.1.3.1', + 'upsInputNumLines' => '1.3.6.1.2.1.33.1.3.2', + 'upsInputTableInputLineIndex' => '1.3.6.1.2.1.33.1.3.3.1.1', + 'upsInputTableInputFrequency' => '1.3.6.1.2.1.33.1.3.3.1.2', + 'upsInputTableInputVoltage' => '1.3.6.1.2.1.33.1.3.3.1.3', + 'upsInputTableInputCurrent' => '1.3.6.1.2.1.33.1.3.3.1.4', + 'upsInputTableInputTruePower' => '1.3.6.1.2.1.33.1.3.3.1.5', + 'upsOutputSource' => '1.3.6.1.2.1.33.1.4.1', + 'upsOutputFrequency' => '1.3.6.1.2.1.33.1.4.2', + 'upsOutputNumLines' => '1.3.6.1.2.1.33.1.4.3', + 'upsOutputTableOutputLineIndex' => '1.3.6.1.2.1.33.1.4.4.1.1', + 'upsOutputTableOutputVoltage' => '1.3.6.1.2.1.33.1.4.4.1.2', + 'upsOutputTableOutputCurrent' => '1.3.6.1.2.1.33.1.4.4.1.3', + 'upsOutputTableOutputPower' => '1.3.6.1.2.1.33.1.4.4.1.4', + 'upsOutputTableOutputPercentLoad' => '1.3.6.1.2.1.33.1.4.4.1.5', + 'upsBypassFrequency' => '1.3.6.1.2.1.33.1.5.1', + 'upsBypassNumLines' => '1.3.6.1.2.1.33.1.5.2', + 'upsBypassLineIndex' => '1.3.6.1.2.1.33.1.5.3.1.1', + 'upsBypassVoltage' => '1.3.6.1.2.1.33.1.5.3.1.2', + 'upsBypassCurrent' => '1.3.6.1.2.1.33.1.5.3.1.3', + 'upsBypassPower' => '1.3.6.1.2.1.33.1.5.3.1.4', + 'upsAlarmsPresent' => '1.3.6.1.2.1.33.1.6.1', + 'upsAlarmId' => '1.3.6.1.2.1.33.1.6.2.1.1', + 'upsAlarmDescr' => '1.3.6.1.2.1.33.1.6.2.1.2', + 'upsAlarmTime' => '1.3.6.1.2.1.33.1.6.2.1.3', + 'upsTestId' => '1.3.6.1.2.1.33.1.7.1', + 'upsTestSpinLock' => '1.3.6.1.2.1.33.1.7.2', + 'upsTestResultsSummary' => '1.3.6.1.2.1.33.1.7.3', + 'upsTestResultsDetail' => '1.3.6.1.2.1.33.1.7.4', + 'upsTestStartTime' => '1.3.6.1.2.1.33.1.7.5', + 'upsTestElapsedTime' => '1.3.6.1.2.1.33.1.7.6', + 'upsShutdownType' => '1.3.6.1.2.1.33.1.8.1', + 'upsShutdownAfterDelay' => '1.3.6.1.2.1.33.1.8.2', + 'upsStartupAfterDelay' => '1.3.6.1.2.1.33.1.8.3', + 'upsRebootWithDuration' => '1.3.6.1.2.1.33.1.8.4', + 'upsAutoRestart' => '1.3.6.1.2.1.33.1.8.5', + 'upsConfigInputVoltage' => '1.3.6.1.2.1.33.1.9.1', + 'upsConfigInputFreq' => '1.3.6.1.2.1.33.1.9.2', + 'upsConfigOutputVoltage' => '1.3.6.1.2.1.33.1.9.3', + 'upsConfigOutputFreq' => '1.3.6.1.2.1.33.1.9.4', + 'upsConfigOutputVA' => '1.3.6.1.2.1.33.1.9.5', + 'upsConfigOutputPower' => '1.3.6.1.2.1.33.1.9.6', + 'upsConfigLowBattTime' => '1.3.6.1.2.1.33.1.9.7', + 'upsConfigAudibleStatus' => '1.3.6.1.2.1.33.1.9.8', + 'upsConfigLowVoltageTransferPoint' => '1.3.6.1.2.1.33.1.9.9', + 'upsConfigHighVoltageTransferPoint' => '1.3.6.1.2.1.33.1.9.10', +); diff --git a/poller_apcupsd.php b/poller_apcupsd.php index b0c8570..79b607d 100644 --- a/poller_apcupsd.php +++ b/poller_apcupsd.php @@ -89,7 +89,7 @@ print 'NOTE: APCUPSD Poller Process Starting.' . PHP_EOL; -$host_template_id = db_fetch_cell_prepared('SELECT id FROM host_template WHERE hash = ?', []); +$host_template_id = db_fetch_cell_prepared('SELECT id FROM host_template WHERE hash = ?', array($hash)); $add_devices = true; if (empty($host_template_id)) { @@ -103,7 +103,7 @@ WHERE type_id = 1 AND enabled = "on" AND poller_id = ?', - []); + array($config['poller_id'])); $apcupsd = cacti_sizeof($upses); @@ -116,7 +116,7 @@ collect_ups_data($ups); if ($ups['host_id'] > 0) { - $exists = db_fetch_cell_prepared('SELECT id FROM host WHERE id = ?', []); + $exists = db_fetch_cell_prepared('SELECT id FROM host WHERE id = ?', array($ups['host_id'])); if (!$exists) { $ups['host_id'] = 0; @@ -137,7 +137,7 @@ WHERE type_id = 2 AND enabled = "on" AND poller_id = ?', - []); + array($config['poller_id'])); $snmpupses = cacti_sizeof($upses); @@ -150,7 +150,7 @@ $ups_up = collect_snmp_ups_data($ups); if ($ups['host_id'] > 0) { - $exists = db_fetch_cell_prepared('SELECT id FROM host WHERE id = ?', []); + $exists = db_fetch_cell_prepared('SELECT id FROM host WHERE id = ?', array($ups['host_id'])); if (!$exists) { $ups['host_id'] = 0; @@ -179,7 +179,7 @@ set_config_option('stats_apcupsd', $cacti_stats); function add_ups_device($ups, $host_template_id, $force_up = false) { - $save = []; + $save = array(); if ($ups['type_id'] == 1) { $host_id = api_device_save(0, $host_template_id, $ups['name'], 'localhost', // id, template_id, description, hostname @@ -199,7 +199,7 @@ function add_ups_device($ups, $host_template_id, $force_up = false) { $ups['site_id'], '', '', 0); // site_id, external_id, location, bulk_walk_size if ($force_up && $host_id) { - db_execute_prepared('UPDATE host SET status = 3 WHERE id = ?', []); + db_execute_prepared('UPDATE host SET status = 3 WHERE id = ?', array($host_id)); } } @@ -207,7 +207,7 @@ function add_ups_device($ups, $host_template_id, $force_up = false) { db_execute_prepared('UPDATE apcupsd_ups SET host_id = ? WHERE id = ?', - []); + array($host_id, $ups['id'])); automation_update_device($host_id); } @@ -217,7 +217,7 @@ function collect_snmp_ups_data($ups) { global $ups_database, $snmp_error; $start = time(); - $save = []; + $save = array(); $save['ups_id'] = $ups['id']; $save['ups_date'] = date('Y-m-d H:i:s'); @@ -230,7 +230,7 @@ function collect_snmp_ups_data($ups) { if ($ups['snmp_skipped'] != '') { $skipped = explode(',', $ups['snmp_skipped']); } else { - $skipped = []; + $skipped = array(); } $return_val = false; @@ -249,18 +249,18 @@ function collect_snmp_ups_data($ups) { if ($value > 0) { /* UPS just came back up, retest possible snmp columns */ if (!$ups_down) { - $skipped = []; + $skipped = array(); } $return_val = true; - db_execute_prepared('UPDATE apcupsd_ups SET status = 3, last_updated=NOW() WHERE id = ?', []); + db_execute_prepared('UPDATE apcupsd_ups SET status = 3, last_updated=NOW() WHERE id = ?', array($ups['id'])); foreach($ups_database AS $key => $data) { if (isset($data['snmp_ci']) && $data['snmp_ci'] != '' && $data['snmp_ci'] != 'NA' && $data['snmp_ci'] != 'UNKNOWN') { if ($data['snmp_ci'] == 'CURDATE' || $data['db_column'] == 'ups_date') { $stats[$data['db_column']] = date('Y-m-d H:i:s'); - } elseif (!cacti_sizeof($skipped) || !in_array()) { + } elseif (!cacti_sizeof($skipped) || !in_array($key, $skipped, true)) { $value = cacti_snmp_get($ups['hostname'], $ups['snmp_community'], $data['snmp_ci'], $ups['snmp_version'], $ups['snmp_username'], $ups['snmp_password'], $ups['snmp_auth_protocol'], $ups['snmp_priv_passphrase'], $ups['snmp_priv_protocol'], $ups['snmp_context'], $ups['snmp_port'], $ups['snmp_timeout'], 1, 'SNMP', @@ -330,10 +330,10 @@ function collect_snmp_ups_data($ups) { if (cacti_sizeof($skipped)) { db_execute_prepared('UPDATE apcupsd_ups SET snmp_skipped = ? WHERE id = ?', array(implode(',', $skipped), $ups['id'])); } else { - db_execute_prepared('UPDATE apcupsd_ups SET snmp_skipped = "" WHERE id = ?', []); + db_execute_prepared('UPDATE apcupsd_ups SET snmp_skipped = "" WHERE id = ?', array($ups['id'])); } } else { - db_execute_prepared('UPDATE apcupsd_ups SET status = 1, snmp_skipped = "" WHERE id = ?', []); + db_execute_prepared('UPDATE apcupsd_ups SET status = 1, snmp_skipped = "" WHERE id = ?', array($ups['id'])); } $save['ups_end_rec'] = date('Y-m-d H:i:s'); @@ -347,7 +347,11 @@ function collect_ups_data($ups) { global $ups_database; /* for windows, apcupsd.exe must be in the path */ - $paths = []; + $paths = array( + '/usr/sbin/', + '/usr/bin/', + '/usr/local/bin/' + ); $found_path = ''; @@ -361,7 +365,7 @@ function collect_ups_data($ups) { $command = $found_path . 'apcaccess -u -h ' . $ups['hostname'] . ':' . $ups['port']; - $output = []; + $output = array(); $return = 0; $ups_status = 1; @@ -374,7 +378,7 @@ function collect_ups_data($ups) { db_execute_prepared('UPDATE apcupsd_ups SET status = 1, error_message = ? WHERE id = ?', - []); + array($message, $ups['id'])); } else { if (cacti_sizeof($output)) { $sql_insert = 'REPLACE INTO apcupsd_ups_stats (ups_id'; @@ -399,19 +403,19 @@ function collect_ups_data($ups) { $status = db_fetch_cell_prepared('SELECT status FROM host WHERE id = ?', - []); + array($ups['host_id'])); if ($value == 'ONLINE' || $value == 'ONLINE SLAVE') { $ups_status = 3; if ($status != 3) { - db_execute_prepared('UPDATE host SET status = 3, status_rec_date=NOW() WHERE id = ?', []); + db_execute_prepared('UPDATE host SET status = 3, status_rec_date=NOW() WHERE id = ?', array($ups['host_id'])); } } else { $ups_status = 1; if ($status != 4) { - db_execute_prepared('UPDATE host SET status = 4, status_fail_date=NOW() WHERE id = ?', []); + db_execute_prepared('UPDATE host SET status = 4, status_fail_date=NOW() WHERE id = ?', array($ups['host_id'])); } } } @@ -430,7 +434,7 @@ function collect_ups_data($ups) { db_execute_prepared('UPDATE apcupsd_ups SET status = ?, last_updated=NOW() WHERE id = ?', - []); + array($ups_status, $ups['id'])); } } diff --git a/setup.php b/setup.php index 35aaacb..aa1e43b 100644 --- a/setup.php +++ b/setup.php @@ -1,6 +1,4 @@ '100' ), ) + $fields_snmp_item + array( - 'id' => [], - 'save_component_ups' => [] + 'id' => array( + 'method' => 'hidden_zero', + 'value' => '|arg1:id|' + ), + 'save_component_ups' => array( + 'method' => 'hidden', + 'value' => '1' + ) ); /* set default action */ @@ -257,9 +261,9 @@ function form_save() { $save['snmp_timeout'] = form_input_validate(get_nfilter_request_var('snmp_timeout'), 'snmp_timeout', '', true, 3); if ($save['host_id'] > 0) { - $host = db_fetch_row_prepared('SELECT * FROM host WHERE id = ?', []); + $host = db_fetch_row_prepared('SELECT * FROM host WHERE id = ?', array($save['host_id'])); } else { - $host = []; + $host = array(); } if (!is_error_message()) { @@ -298,7 +302,20 @@ function form_save() { // SNMP columns if ($save['type_id'] == 2) { - $columns = []; + $columns = array( + 'hostname', + 'snmp_version', + 'snmp_community', + 'snmp_username', + 'snmp_password', + 'snmp_auth_protocol', + 'snmp_priv_protocol', + 'snmp_priv_passphrase', + 'snmp_context', + 'snmp_engine_id', + 'snmp_port', + 'snmp_timeout', + ); foreach($columns as $c) { if ($save[$c] != $host[$c]) { @@ -315,12 +332,12 @@ function form_save() { if ($name_changed) { $graphs = array_rekey( - db_fetch_assoc_prepared('SELECT id FROM graph_local WHERE host_id = ?', []), + db_fetch_assoc_prepared('SELECT id FROM graph_local WHERE host_id = ?', array($host_id)), 'id', 'id' ); $data_sources = array_rekey( - db_fetch_assoc_prepared('SELECT id FROM data_local WHERE host_id = ?', []), + db_fetch_assoc_prepared('SELECT id FROM data_local WHERE host_id = ?', array($host_id)), 'id', 'id' ); @@ -348,17 +365,17 @@ function form_save() { function duplicate_ups($template_id, $name) { if (!is_array($template_id)) { - $template_id = []; + $template_id = array($template_id); } foreach($template_id as $id) { $ups = db_fetch_row_prepared('SELECT * FROM apcupsd_ups WHERE id = ?', - []); + array($id)); if (cacti_sizeof($ups)) { - $save = []; + $save = array(); $save['id'] = 0; @@ -424,7 +441,7 @@ function form_actions() { input_validate_input_number($matches[1]); /* ==================================================== */ - $name = db_fetch_cell_prepared('SELECT name FROM apcupsd_ups WHERE id = ?', []); + $name = db_fetch_cell_prepared('SELECT name FROM apcupsd_ups WHERE id = ?', array($matches[1])); $ups_list .= '
  • ' . html_escape($name) . '
  • '; $ups_array[$i] = $matches[1]; @@ -505,14 +522,14 @@ function ups_edit() { $ups = db_fetch_row_prepared('SELECT * FROM apcupsd_ups WHERE id = ?', array(get_request_var('id'))); $header_label = __esc('UPS [edit: %s]', $ups['name'], 'apcupsd'); } else { - $ups = []; + $ups = array(); $header_label = __('UPS [new]', 'apcupsd'); } if (isset($ups['host_id']) && $ups['host_id'] > 0) { - $fields_ups_edit['host_id']['value'] = db_fetch_cell_prepared('SELECT description FROM host WHERE id = ?', []); - $fields_ups_edit['location']['value'] = db_fetch_cell_prepared('SELECT location FROM host WHERE id = ?', []); - $fields_ups_edit['location']['id'] = db_fetch_cell_prepared('SELECT location FROM host WHERE id = ?', []); + $fields_ups_edit['host_id']['value'] = db_fetch_cell_prepared('SELECT description FROM host WHERE id = ?', array($ups['host_id'])); + $fields_ups_edit['location']['value'] = db_fetch_cell_prepared('SELECT location FROM host WHERE id = ?', array($ups['host_id'])); + $fields_ups_edit['location']['id'] = db_fetch_cell_prepared('SELECT location FROM host WHERE id = ?', array($ups['host_id'])); } else { unset($fields_ups_edit['location']); } @@ -526,8 +543,8 @@ function ups_edit() { draw_edit_form( array( - 'config' => [], - 'fields' => inject_form_variables($fields_ups_edit, ( ?? [])) + 'config' => array('no_form_tag' => true), + 'fields' => inject_form_variables($fields_ups_edit, (isset($ups) ? $ups : array())) ) ); @@ -594,25 +611,40 @@ function upses() { /* ================= input validation and session storage ================= */ $filters = array( - 'rows' => [], - 'site_id' => [], + 'rows' => array( + 'filter' => FILTER_VALIDATE_INT, + 'pageset' => true, + 'default' => '-1' + ), + 'site_id' => array( + 'filter' => FILTER_VALIDATE_INT, + 'pageset' => true, + 'default' => '-1' + ), 'location' => array( 'filter' => FILTER_CALLBACK, - 'options' => [], + 'options' => array('options' => 'sanitize_search_string'), 'pageset' => true, 'default' => '-1' ), - 'page' => [], - 'filter' => [], + 'page' => array( + 'filter' => FILTER_VALIDATE_INT, + 'default' => '1' + ), + 'filter' => array( + 'filter' => FILTER_DEFAULT, + 'pageset' => true, + 'default' => '' + ), 'sort_column' => array( 'filter' => FILTER_CALLBACK, 'default' => 'name', - 'options' => [] + 'options' => array('options' => 'sanitize_search_string') ), 'sort_direction' => array( 'filter' => FILTER_CALLBACK, 'default' => 'ASC', - 'options' => [] + 'options' => array('options' => 'sanitize_search_string') ) ); @@ -752,7 +784,7 @@ function clearFilter() { html_end_box(); $sql_where = ''; - $sql_params = []; + $sql_params = array(); /* form the 'where' clause for our main sql query */ if (get_request_var('filter') != '') { @@ -935,7 +967,7 @@ function checkNullandReturn($value) { } function get_site_locations() { - $return = []; + $return = array(); $term = get_nfilter_request_var('term'); $host_id = $_SESSION['cur_device_id']; @@ -946,7 +978,7 @@ function get_site_locations() { $site_id = db_fetch_cell_prepared('SELECT site_id FROM host WHERE id = ?', - []); + array($host_id)); $args []= $site_id; $where = 'AND site_id = ?'; } @@ -962,7 +994,7 @@ function get_site_locations() { if (cacti_sizeof($locations)) { foreach ($locations as $l) { - $return[] = []; + $return[] = array('label' => $l['location'], 'value' => $l['location'], 'id' => $l['location']); } }