mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Tripplite snmp trap handling (#12832)
* Tripplite snmp trap handling * remove extra import
This commit is contained in:
47
LibreNMS/Snmptrap/Handlers/Tripplite.php
Normal file
47
LibreNMS/Snmptrap/Handlers/Tripplite.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Tripplite.php
|
||||||
|
*
|
||||||
|
* -Description-
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* @package LibreNMS
|
||||||
|
* @link http://librenms.org
|
||||||
|
* @copyright 2021 Tony Murray
|
||||||
|
* @author Tony Murray <murraytony@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace LibreNMS\Snmptrap\Handlers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
use LibreNMS\Snmptrap\Trap;
|
||||||
|
|
||||||
|
class Tripplite
|
||||||
|
{
|
||||||
|
protected function getSeverity(Trap $trap): int
|
||||||
|
{
|
||||||
|
return Arr::get([
|
||||||
|
'critical' => 5,
|
||||||
|
'warning' => 4,
|
||||||
|
'info' => 2,
|
||||||
|
'status' => 3,
|
||||||
|
], $trap->getOidData('TRIPPLITE-PRODUCTS::tlpAlarmType'), 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function describe(Trap $trap): string
|
||||||
|
{
|
||||||
|
return 'Trap Alarm ' . $trap->getOidData('TRIPPLITE-PRODUCTS::tlpAlarmState') . ': ' . $trap->getOidData('TRIPPLITE-PRODUCTS::tlpAlarmDetail');
|
||||||
|
}
|
||||||
|
}
|
38
LibreNMS/Snmptrap/Handlers/TrippliteAlarmAdded.php
Normal file
38
LibreNMS/Snmptrap/Handlers/TrippliteAlarmAdded.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* TrippliteAlarmAdded.php
|
||||||
|
*
|
||||||
|
* -Description-
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* @package LibreNMS
|
||||||
|
* @link http://librenms.org
|
||||||
|
* @copyright 2021 Tony Murray
|
||||||
|
* @author Tony Murray <murraytony@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace LibreNMS\Snmptrap\Handlers;
|
||||||
|
|
||||||
|
use App\Models\Device;
|
||||||
|
use LibreNMS\Interfaces\SnmptrapHandler;
|
||||||
|
use LibreNMS\Snmptrap\Trap;
|
||||||
|
|
||||||
|
class TrippliteAlarmAdded extends Tripplite implements SnmptrapHandler
|
||||||
|
{
|
||||||
|
public function handle(Device $device, Trap $trap)
|
||||||
|
{
|
||||||
|
\Log::event($this->describe($trap), $device->device_id, 'trap', $this->getSeverity($trap));
|
||||||
|
}
|
||||||
|
}
|
38
LibreNMS/Snmptrap/Handlers/TrippliteAlarmRemoved.php
Normal file
38
LibreNMS/Snmptrap/Handlers/TrippliteAlarmRemoved.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* TrippliteAlarmRemoved.php
|
||||||
|
*
|
||||||
|
* -Description-
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* @package LibreNMS
|
||||||
|
* @link http://librenms.org
|
||||||
|
* @copyright 2021 Tony Murray
|
||||||
|
* @author Tony Murray <murraytony@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace LibreNMS\Snmptrap\Handlers;
|
||||||
|
|
||||||
|
use App\Models\Device;
|
||||||
|
use LibreNMS\Interfaces\SnmptrapHandler;
|
||||||
|
use LibreNMS\Snmptrap\Trap;
|
||||||
|
|
||||||
|
class TrippliteAlarmRemoved extends Tripplite implements SnmptrapHandler
|
||||||
|
{
|
||||||
|
public function handle(Device $device, Trap $trap)
|
||||||
|
{
|
||||||
|
\Log::event($this->describe($trap), $device->device_id, 'trap', $this->getSeverity($trap));
|
||||||
|
}
|
||||||
|
}
|
@@ -93,6 +93,8 @@ return [
|
|||||||
'SNMPv2-MIB::authenticationFailure' => \LibreNMS\Snmptrap\Handlers\AuthenticationFailure::class,
|
'SNMPv2-MIB::authenticationFailure' => \LibreNMS\Snmptrap\Handlers\AuthenticationFailure::class,
|
||||||
'SNMPv2-MIB::coldStart' => \LibreNMS\Snmptrap\Handlers\ColdBoot::class,
|
'SNMPv2-MIB::coldStart' => \LibreNMS\Snmptrap\Handlers\ColdBoot::class,
|
||||||
'SNMPv2-MIB::warmStart' => \LibreNMS\Snmptrap\Handlers\WarmBoot::class,
|
'SNMPv2-MIB::warmStart' => \LibreNMS\Snmptrap\Handlers\WarmBoot::class,
|
||||||
|
'TRIPPLITE-PRODUCTS::tlpNotificationsAlarmEntryAdded' => \LibreNMS\Snmptrap\Handlers\TrippliteAlarmAdded::class,
|
||||||
|
'TRIPPLITE-PRODUCTS::tlpNotificationsAlarmEntryRemoved' => \LibreNMS\Snmptrap\Handlers\TrippliteAlarmRemoved::class,
|
||||||
'VMWARE-VMINFO-MIB::vmwVmHBDetected' => \LibreNMS\Snmptrap\Handlers\VmwVmHBDetected::class,
|
'VMWARE-VMINFO-MIB::vmwVmHBDetected' => \LibreNMS\Snmptrap\Handlers\VmwVmHBDetected::class,
|
||||||
'VMWARE-VMINFO-MIB::vmwVmHBLost' => \LibreNMS\Snmptrap\Handlers\VmwVmHBLost::class,
|
'VMWARE-VMINFO-MIB::vmwVmHBLost' => \LibreNMS\Snmptrap\Handlers\VmwVmHBLost::class,
|
||||||
'VMWARE-VMINFO-MIB::vmwVmPoweredOn' => \LibreNMS\Snmptrap\Handlers\VmwVmPoweredOn::class,
|
'VMWARE-VMINFO-MIB::vmwVmPoweredOn' => \LibreNMS\Snmptrap\Handlers\VmwVmPoweredOn::class,
|
||||||
|
35
mibs/poweralert/TRIPPLITE
Normal file
35
mibs/poweralert/TRIPPLITE
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
-- ------------------------------------------------------
|
||||||
|
-- TRIPP LITE MIB
|
||||||
|
-- Copyright (c) 1999-2018 Tripp Lite
|
||||||
|
-- All rights reserved
|
||||||
|
--
|
||||||
|
-- Revision History:
|
||||||
|
-- 06/22/2016 Restructured Tripp Lite MIB files
|
||||||
|
-- ------------------------------------------------------
|
||||||
|
|
||||||
|
-- TrippLite { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) tripplite(850) }
|
||||||
|
|
||||||
|
TRIPPLITE DEFINITIONS ::= BEGIN
|
||||||
|
|
||||||
|
IMPORTS
|
||||||
|
MODULE-IDENTITY,
|
||||||
|
enterprises
|
||||||
|
FROM SNMPv2-SMI;
|
||||||
|
|
||||||
|
tripplite MODULE-IDENTITY
|
||||||
|
LAST-UPDATED "201606221115Z"
|
||||||
|
ORGANIZATION "Tripp Lite"
|
||||||
|
CONTACT-INFO
|
||||||
|
"Software Engineering
|
||||||
|
Tripp Lite
|
||||||
|
1111 W. 35th St.
|
||||||
|
Chicago, IL 60609"
|
||||||
|
DESCRIPTION
|
||||||
|
"The base MIB module that defines the root objects from Tripp Lite's
|
||||||
|
OID tree (850)."
|
||||||
|
REVISION "201606221115Z"
|
||||||
|
DESCRIPTION
|
||||||
|
"Restructured Tripp Lite MIB files"
|
||||||
|
::= { enterprises 850 }
|
||||||
|
|
||||||
|
END
|
@@ -52,6 +52,14 @@
|
|||||||
-- tlpNotificationsUpsTransferToFaultBypass, tlpNotificationsUpsBypassPowerDistributionModuleDisconnected,
|
-- tlpNotificationsUpsTransferToFaultBypass, tlpNotificationsUpsBypassPowerDistributionModuleDisconnected,
|
||||||
-- tlpNotificationsUpsManualBypassActivatedFromUnsupportedMode, tlpNotificationsUpsOnBatteryTimeoutShutdown,
|
-- tlpNotificationsUpsManualBypassActivatedFromUnsupportedMode, tlpNotificationsUpsOnBatteryTimeoutShutdown,
|
||||||
-- tlpNotificationsUpsLowBatteryPercentageShutdown
|
-- tlpNotificationsUpsLowBatteryPercentageShutdown
|
||||||
|
-- 09/17/2019 Added tlpUpsIdentNumHeatsinks, tlpUpsIdentNumOutputContacts,tlpUpsIdentNumInputContacts,
|
||||||
|
-- tlpUpsOutputLineApparentPower, tlpUpsControlCancelSelfTest, tlpUpsControlResetAllParameters,
|
||||||
|
-- tlpUpsConfigLineQualifyTime, tlpUpsConfigACPowerSenseType, tlpUpsOutputPowerFactor, tlpUpsBatteryTotalMinutesOnBattery
|
||||||
|
-- Added Tables: tlpUpsHeatsinkTable, tlpUpsOutputContactTable, tlpUpsInputContactTable, tlpUpsConfigVoltageTable.
|
||||||
|
-- tlpUpsConfigContactTable, tlpUpsConfigOutputContactTable, tlpUpsConfigInputContactTable.
|
||||||
|
-- Added more alarms to tlpAlarmsWellKnown section
|
||||||
|
-- Added 'testing' to tlpUpsOutputSource
|
||||||
|
-- Added UNITS and updated the description of tlpDeviceIdentCurrentUptime and tlpDeviceIdentTotalUptime
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
TRIPPLITE-PRODUCTS DEFINITIONS ::= BEGIN
|
TRIPPLITE-PRODUCTS DEFINITIONS ::= BEGIN
|
||||||
@@ -82,7 +90,7 @@ IMPORTS
|
|||||||
FROM TRIPPLITE;
|
FROM TRIPPLITE;
|
||||||
|
|
||||||
tlpProducts MODULE-IDENTITY
|
tlpProducts MODULE-IDENTITY
|
||||||
LAST-UPDATED "201906180930Z"
|
LAST-UPDATED "201909270930Z"
|
||||||
ORGANIZATION "Tripp Lite"
|
ORGANIZATION "Tripp Lite"
|
||||||
CONTACT-INFO
|
CONTACT-INFO
|
||||||
"Software Engineering
|
"Software Engineering
|
||||||
@@ -93,6 +101,16 @@ tlpProducts MODULE-IDENTITY
|
|||||||
"This MIB module defines MIB objects which provide mechanisms for
|
"This MIB module defines MIB objects which provide mechanisms for
|
||||||
remote management capabilities of Tripp Lite PowerAlert and related
|
remote management capabilities of Tripp Lite PowerAlert and related
|
||||||
software."
|
software."
|
||||||
|
REVISION "201909270930Z"
|
||||||
|
DESCRIPTION
|
||||||
|
"Added tlpUpsIdentNumHeatsinks, tlpUpsIdentNumOutputContacts,tlpUpsIdentNumInputContacts,
|
||||||
|
tlpUpsOutputLineApparentPower, tlpUpsControlCancelSelfTest, tlpUpsControlResetAllParameters,
|
||||||
|
tlpUpsConfigLineQualifyTime, tlpUpsConfigACPowerSenseType, tlpUpsOutputPowerFactor,
|
||||||
|
Added Tables: tlpUpsHeatsinkTable, tlpUpsOutputContactTable, tlpUpsInputContactTable, tlpUpsConfigVoltageTable.
|
||||||
|
tlpUpsConfigContactTable, tlpUpsConfigOutputContactTable, tlpUpsConfigInputContactTable.
|
||||||
|
Added more alarm entries to tlpAlarmsWellKnown section
|
||||||
|
Added 'testing' to tlpUpsOutputSource
|
||||||
|
Added UNITS and updated the description of tlpDeviceIdentCurrentUptime and tlpDeviceIdentTotalUptime"
|
||||||
REVISION "201906180930Z"
|
REVISION "201906180930Z"
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
"Added tlpNotificationsDeviceUnhandledFault, tlpNotificationsUpsLineConnectRelayFaultShutdown,
|
"Added tlpNotificationsDeviceUnhandledFault, tlpNotificationsUpsLineConnectRelayFaultShutdown,
|
||||||
@@ -243,6 +261,11 @@ tlpUpsBypass OBJECT IDENTIFIER ::= { tlpUpsDetail 4 }
|
|||||||
tlpUpsOutlet OBJECT IDENTIFIER ::= { tlpUpsDetail 5 }
|
tlpUpsOutlet OBJECT IDENTIFIER ::= { tlpUpsDetail 5 }
|
||||||
tlpUpsWatchdog OBJECT IDENTIFIER ::= { tlpUpsDetail 6 }
|
tlpUpsWatchdog OBJECT IDENTIFIER ::= { tlpUpsDetail 6 }
|
||||||
tlpUpsFan OBJECT IDENTIFIER ::= { tlpUpsDetail 7 }
|
tlpUpsFan OBJECT IDENTIFIER ::= { tlpUpsDetail 7 }
|
||||||
|
tlpUpsHeatsink OBJECT IDENTIFIER ::= { tlpUpsDetail 8 }
|
||||||
|
tlpUpsContact OBJECT IDENTIFIER ::= { tlpUpsDetail 9 }
|
||||||
|
|
||||||
|
tlpUpsInputContact OBJECT IDENTIFIER ::= { tlpUpsContact 1 }
|
||||||
|
tlpUpsOutputContact OBJECT IDENTIFIER ::= { tlpUpsContact 2 }
|
||||||
|
|
||||||
tlpPduIdent OBJECT IDENTIFIER ::= { tlpPdu 1 }
|
tlpPduIdent OBJECT IDENTIFIER ::= { tlpPdu 1 }
|
||||||
tlpPduDevice OBJECT IDENTIFIER ::= { tlpPdu 2 }
|
tlpPduDevice OBJECT IDENTIFIER ::= { tlpPdu 2 }
|
||||||
@@ -560,23 +583,21 @@ tlpDeviceIdentHardwareVersion OBJECT-TYPE
|
|||||||
|
|
||||||
tlpDeviceIdentCurrentUptime OBJECT-TYPE
|
tlpDeviceIdentCurrentUptime OBJECT-TYPE
|
||||||
SYNTAX DisplayString
|
SYNTAX DisplayString
|
||||||
|
UNITS "hours"
|
||||||
MAX-ACCESS read-only
|
MAX-ACCESS read-only
|
||||||
STATUS current
|
STATUS current
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
"The device uptime since its last startup. The format of this value is a comma-
|
"The device uptime since its last startup. This value will return
|
||||||
delimited string representing days, hours and minutes. For example, the value of
|
|
||||||
123,4,5 represents 123 days, 4 hours and 5 minutes. This value will return
|
|
||||||
ERROR_NO_SUCH_NAME if not supported by the device."
|
ERROR_NO_SUCH_NAME if not supported by the device."
|
||||||
::= { tlpDeviceIdentEntry 8 }
|
::= { tlpDeviceIdentEntry 8 }
|
||||||
|
|
||||||
tlpDeviceIdentTotalUptime OBJECT-TYPE
|
tlpDeviceIdentTotalUptime OBJECT-TYPE
|
||||||
SYNTAX DisplayString
|
SYNTAX DisplayString
|
||||||
|
UNITS "days"
|
||||||
MAX-ACCESS read-only
|
MAX-ACCESS read-only
|
||||||
STATUS current
|
STATUS current
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
"The cumulative (total) uptime for the device. The format of this value is a comma-
|
"The cumulative (total) uptime for the device. This value will return
|
||||||
delimited string representing days, hours and minutes. For example, the value of
|
|
||||||
123,4,5 represents 123 days, 4 hours and 5 minutes. This value will return
|
|
||||||
ERROR_NO_SUCH_NAME if not supported by the device."
|
ERROR_NO_SUCH_NAME if not supported by the device."
|
||||||
::= { tlpDeviceIdentEntry 9 }
|
::= { tlpDeviceIdentEntry 9 }
|
||||||
|
|
||||||
@@ -643,7 +664,10 @@ TlpUpsIdentEntry ::= SEQUENCE {
|
|||||||
tlpUpsIdentNumOutlets Unsigned32,
|
tlpUpsIdentNumOutlets Unsigned32,
|
||||||
tlpUpsIdentNumOutletGroups Unsigned32,
|
tlpUpsIdentNumOutletGroups Unsigned32,
|
||||||
tlpUpsIdentNumBatteryPacks Unsigned32,
|
tlpUpsIdentNumBatteryPacks Unsigned32,
|
||||||
tlpUpsIdentNumFans Unsigned32 }
|
tlpUpsIdentNumFans Unsigned32,
|
||||||
|
tlpUpsIdentNumHeatsinks Unsigned32,
|
||||||
|
tlpUpsIdentNumInputContacts Unsigned32,
|
||||||
|
tlpUpsIdentNumOutputContacts Unsigned32 }
|
||||||
|
|
||||||
tlpUpsIdentNumInputs OBJECT-TYPE
|
tlpUpsIdentNumInputs OBJECT-TYPE
|
||||||
SYNTAX Unsigned32
|
SYNTAX Unsigned32
|
||||||
@@ -710,6 +734,30 @@ tlpUpsIdentNumFans OBJECT-TYPE
|
|||||||
"The number of fans supported by the ups."
|
"The number of fans supported by the ups."
|
||||||
::= { tlpUpsIdentEntry 8 }
|
::= { tlpUpsIdentEntry 8 }
|
||||||
|
|
||||||
|
tlpUpsIdentNumHeatsinks OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The number of heatsink thermistors supported by the ups."
|
||||||
|
::= { tlpUpsIdentEntry 9 }
|
||||||
|
|
||||||
|
tlpUpsIdentNumInputContacts OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The number of input contacts supported by the ups."
|
||||||
|
::= { tlpUpsIdentEntry 10 }
|
||||||
|
|
||||||
|
tlpUpsIdentNumOutputContacts OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The number of output contacts supported by the ups."
|
||||||
|
::= { tlpUpsIdentEntry 11 }
|
||||||
|
|
||||||
tlpUpsSupportsTable OBJECT-TYPE
|
tlpUpsSupportsTable OBJECT-TYPE
|
||||||
SYNTAX SEQUENCE OF TlpUpsSupportsEntry
|
SYNTAX SEQUENCE OF TlpUpsSupportsEntry
|
||||||
MAX-ACCESS not-accessible
|
MAX-ACCESS not-accessible
|
||||||
@@ -812,7 +860,7 @@ TlpUpsDeviceEntry ::= SEQUENCE {
|
|||||||
tlpUpsDeviceTemperatureF Integer32,
|
tlpUpsDeviceTemperatureF Integer32,
|
||||||
tlpUpsDeviceLastACFailureReason INTEGER,
|
tlpUpsDeviceLastACFailureReason INTEGER,
|
||||||
tlpUpsDeviceLastShutdownReason INTEGER,
|
tlpUpsDeviceLastShutdownReason INTEGER,
|
||||||
tlpUpsDeviceOutputCurrentPrecision INTEGER }
|
tlpUpsDeviceOutputCurrentPrecision INTEGER }
|
||||||
|
|
||||||
tlpUpsDeviceMainLoadState OBJECT-TYPE
|
tlpUpsDeviceMainLoadState OBJECT-TYPE
|
||||||
SYNTAX INTEGER {
|
SYNTAX INTEGER {
|
||||||
@@ -1007,7 +1055,8 @@ TlpUpsBatterySummaryEntry ::= SEQUENCE {
|
|||||||
tlpUpsSecondsOnBattery Unsigned32,
|
tlpUpsSecondsOnBattery Unsigned32,
|
||||||
tlpUpsEstimatedMinutesRemaining Unsigned32,
|
tlpUpsEstimatedMinutesRemaining Unsigned32,
|
||||||
tlpUpsEstimatedChargeRemaining INTEGER,
|
tlpUpsEstimatedChargeRemaining INTEGER,
|
||||||
tlpUpsBatteryRunTimeRemaining TimeTicks }
|
tlpUpsBatteryRunTimeRemaining TimeTicks,
|
||||||
|
tlpUpsBatteryTotalMinutesOnBattery Unsigned32 }
|
||||||
|
|
||||||
tlpUpsBatteryStatus OBJECT-TYPE
|
tlpUpsBatteryStatus OBJECT-TYPE
|
||||||
SYNTAX INTEGER {
|
SYNTAX INTEGER {
|
||||||
@@ -1073,6 +1122,15 @@ tlpUpsBatteryRunTimeRemaining OBJECT-TYPE
|
|||||||
ERROR_NO_SUCH_NAME."
|
ERROR_NO_SUCH_NAME."
|
||||||
::= { tlpUpsBatterySummaryEntry 5 }
|
::= { tlpUpsBatterySummaryEntry 5 }
|
||||||
|
|
||||||
|
tlpUpsBatteryTotalMinutesOnBattery OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "minutes"
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The total accumulative minutes the ups has run on the battery."
|
||||||
|
::= { tlpUpsBatterySummaryEntry 6 }
|
||||||
|
|
||||||
tlpUpsBatteryDetailTable OBJECT-TYPE
|
tlpUpsBatteryDetailTable OBJECT-TYPE
|
||||||
SYNTAX SEQUENCE OF TlpUpsBatteryDetailEntry
|
SYNTAX SEQUENCE OF TlpUpsBatteryDetailEntry
|
||||||
MAX-ACCESS not-accessible
|
MAX-ACCESS not-accessible
|
||||||
@@ -1521,16 +1579,18 @@ tlpUpsInputEntry OBJECT-TYPE
|
|||||||
::= { tlpUpsInputTable 1 }
|
::= { tlpUpsInputTable 1 }
|
||||||
|
|
||||||
TlpUpsInputEntry ::= SEQUENCE {
|
TlpUpsInputEntry ::= SEQUENCE {
|
||||||
tlpUpsInputLineBads INTEGER,
|
tlpUpsInputLineBads INTEGER,
|
||||||
tlpUpsInputNominalVoltage Unsigned32,
|
tlpUpsInputNominalVoltage Unsigned32,
|
||||||
tlpUpsInputNominalFrequency Unsigned32,
|
tlpUpsInputNominalFrequency Unsigned32,
|
||||||
tlpUpsInputLowTransferVoltage Unsigned32,
|
tlpUpsInputLowTransferVoltage Unsigned32,
|
||||||
tlpUpsInputLowTransferVoltageLowerBound Unsigned32,
|
tlpUpsInputLowTransferVoltageLowerBound Unsigned32,
|
||||||
tlpUpsInputLowTransferVoltageUpperBound Unsigned32,
|
tlpUpsInputLowTransferVoltageUpperBound Unsigned32,
|
||||||
tlpUpsInputHighTransferVoltage Unsigned32,
|
tlpUpsInputHighTransferVoltage Unsigned32,
|
||||||
tlpUpsInputHighTransferVoltageLowerBound Unsigned32,
|
tlpUpsInputHighTransferVoltageLowerBound Unsigned32,
|
||||||
tlpUpsInputHighTransferVoltageUpperBound Unsigned32,
|
tlpUpsInputHighTransferVoltageUpperBound Unsigned32,
|
||||||
tlpUpsInputWattHours Unsigned32 }
|
tlpUpsInputWattHours Unsigned32,
|
||||||
|
tlpUpsInputLowTransferVoltageResetTolerance Unsigned32,
|
||||||
|
tlpUpsInputHighTransferVoltageResetTolerance Unsigned32 }
|
||||||
|
|
||||||
tlpUpsInputLineBads OBJECT-TYPE
|
tlpUpsInputLineBads OBJECT-TYPE
|
||||||
SYNTAX INTEGER
|
SYNTAX INTEGER
|
||||||
@@ -1635,6 +1695,28 @@ tlpUpsInputWattHours OBJECT-TYPE
|
|||||||
tlpUpsControlResetWattHours to reset the watt hours calculation algorithm."
|
tlpUpsControlResetWattHours to reset the watt hours calculation algorithm."
|
||||||
::= { tlpUpsInputEntry 10 }
|
::= { tlpUpsInputEntry 10 }
|
||||||
|
|
||||||
|
tlpUpsInputLowTransferVoltageResetTolerance OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "Volts"
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"If a unit is transferred to battery backup due to under-voltage, the
|
||||||
|
line voltage has to rise above this value from tlpUpsConfigLowVoltageTransfer,
|
||||||
|
before the unit switched back to the AC input."
|
||||||
|
::= { tlpUpsInputEntry 11 }
|
||||||
|
|
||||||
|
tlpUpsInputHighTransferVoltageResetTolerance OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "Volts"
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"If an input transferred to battery backup due to over-voltage, the line voltage
|
||||||
|
on the input source has to fall below this value from tlpUpsConfigHighVoltageTransfer,
|
||||||
|
before the unit switched back to the AC input."
|
||||||
|
::= { tlpUpsInputEntry 12 }
|
||||||
|
|
||||||
tlpUpsInputPhaseTable OBJECT-TYPE
|
tlpUpsInputPhaseTable OBJECT-TYPE
|
||||||
SYNTAX SEQUENCE OF TlpUpsInputPhaseEntry
|
SYNTAX SEQUENCE OF TlpUpsInputPhaseEntry
|
||||||
MAX-ACCESS not-accessible
|
MAX-ACCESS not-accessible
|
||||||
@@ -1757,7 +1839,8 @@ TlpUpsOutputEntry ::= SEQUENCE {
|
|||||||
tlpUpsOutputSource INTEGER,
|
tlpUpsOutputSource INTEGER,
|
||||||
tlpUpsOutputNominalVoltage Unsigned32,
|
tlpUpsOutputNominalVoltage Unsigned32,
|
||||||
tlpUpsOutputFrequency Unsigned32,
|
tlpUpsOutputFrequency Unsigned32,
|
||||||
tlpUpsOutputVARating Unsigned32 }
|
tlpUpsOutputVARating Unsigned32,
|
||||||
|
tlpUpsOutputPowerFactor Unsigned32 }
|
||||||
|
|
||||||
tlpUpsOutputSource OBJECT-TYPE
|
tlpUpsOutputSource OBJECT-TYPE
|
||||||
SYNTAX INTEGER {
|
SYNTAX INTEGER {
|
||||||
@@ -1770,7 +1853,8 @@ tlpUpsOutputSource OBJECT-TYPE
|
|||||||
boosting(6),
|
boosting(6),
|
||||||
reducing(7),
|
reducing(7),
|
||||||
second(8),
|
second(8),
|
||||||
economy(9) }
|
economy(9),
|
||||||
|
testing(10) }
|
||||||
MAX-ACCESS read-only
|
MAX-ACCESS read-only
|
||||||
STATUS current
|
STATUS current
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
@@ -1814,6 +1898,14 @@ tlpUpsOutputVARating OBJECT-TYPE
|
|||||||
ERROR_NO_SUCH_NAME."
|
ERROR_NO_SUCH_NAME."
|
||||||
::= { tlpUpsOutputEntry 4 }
|
::= { tlpUpsOutputEntry 4 }
|
||||||
|
|
||||||
|
tlpUpsOutputPowerFactor OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "percent"
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The percentage of output power factor."
|
||||||
|
::= { tlpUpsOutputEntry 5 }
|
||||||
|
|
||||||
tlpUpsOutputLineTable OBJECT-TYPE
|
tlpUpsOutputLineTable OBJECT-TYPE
|
||||||
SYNTAX SEQUENCE OF TlpUpsOutputLineEntry
|
SYNTAX SEQUENCE OF TlpUpsOutputLineEntry
|
||||||
@@ -1842,7 +1934,8 @@ TlpUpsOutputLineEntry ::= SEQUENCE {
|
|||||||
tlpUpsOutputLineCurrent Unsigned32,
|
tlpUpsOutputLineCurrent Unsigned32,
|
||||||
tlpUpsOutputLinePower Unsigned32,
|
tlpUpsOutputLinePower Unsigned32,
|
||||||
tlpUpsOutputLinePercentLoad INTEGER,
|
tlpUpsOutputLinePercentLoad INTEGER,
|
||||||
tlpUpsOutputLineFrequency Unsigned32 }
|
tlpUpsOutputLineFrequency Unsigned32,
|
||||||
|
tlpUpsOutputLineApparentPower Unsigned32 }
|
||||||
|
|
||||||
tlpUpsOutputLineIndex OBJECT-TYPE
|
tlpUpsOutputLineIndex OBJECT-TYPE
|
||||||
SYNTAX Unsigned32
|
SYNTAX Unsigned32
|
||||||
@@ -1905,6 +1998,15 @@ tlpUpsOutputLineFrequency OBJECT-TYPE
|
|||||||
line. If not supported, the agent reports ERROR_NO_SUCH_NAME."
|
line. If not supported, the agent reports ERROR_NO_SUCH_NAME."
|
||||||
::= { tlpUpsOutputLineEntry 6 }
|
::= { tlpUpsOutputLineEntry 6 }
|
||||||
|
|
||||||
|
tlpUpsOutputLineApparentPower OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "Watts"
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The present output apparent power."
|
||||||
|
::= { tlpUpsOutputLineEntry 9 }
|
||||||
|
|
||||||
tlpUpsBypassTable OBJECT-TYPE
|
tlpUpsBypassTable OBJECT-TYPE
|
||||||
SYNTAX SEQUENCE OF TlpUpsBypassEntry
|
SYNTAX SEQUENCE OF TlpUpsBypassEntry
|
||||||
MAX-ACCESS not-accessible
|
MAX-ACCESS not-accessible
|
||||||
@@ -2372,6 +2474,142 @@ tlpUpsFanSpeed OBJECT-TYPE
|
|||||||
"The fan speed in rotations per minute."
|
"The fan speed in rotations per minute."
|
||||||
::= { tlpUpsFanEntry 2 }
|
::= { tlpUpsFanEntry 2 }
|
||||||
|
|
||||||
|
tlpUpsHeatsinkTable OBJECT-TYPE
|
||||||
|
SYNTAX SEQUENCE OF TlpUpsHeatsinkEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"A list of ups heatsink thermistor table entries. The number of entries
|
||||||
|
is given by the value of tlpUpsIdentNumHeatsinks."
|
||||||
|
::= { tlpUpsHeatsink 1 }
|
||||||
|
|
||||||
|
tlpUpsHeatsinkEntry OBJECT-TYPE
|
||||||
|
SYNTAX TlpUpsHeatsinkEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"An entry containing information applicable to a particular heatsink
|
||||||
|
managed by this agent."
|
||||||
|
INDEX { tlpDeviceIndex, tlpUpsHeatsinkIndex }
|
||||||
|
::= { tlpUpsHeatsinkTable 1 }
|
||||||
|
|
||||||
|
TlpUpsHeatsinkEntry ::= SEQUENCE {
|
||||||
|
tlpUpsHeatsinkIndex Unsigned32,
|
||||||
|
tlpUpsHeatsinkTemperatureC Integer32,
|
||||||
|
tlpUpsHeatsinkTemperatureF Integer32 }
|
||||||
|
|
||||||
|
tlpUpsHeatsinkIndex OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The table row index for the ups heatsink."
|
||||||
|
::= { tlpUpsHeatsinkEntry 1 }
|
||||||
|
|
||||||
|
tlpUpsHeatsinkTemperatureC OBJECT-TYPE
|
||||||
|
SYNTAX Integer32
|
||||||
|
UNITS "0.1 degrees Celsius"
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The temperature at the heatsink thermistor in tenths degrees Celsius.
|
||||||
|
Heatsink temperature measurements are not supported on all models. If
|
||||||
|
not supported, this value will always return ERROR_NO_SUCH_NAME."
|
||||||
|
::= { tlpUpsHeatsinkEntry 2 }
|
||||||
|
|
||||||
|
tlpUpsHeatsinkTemperatureF OBJECT-TYPE
|
||||||
|
SYNTAX Integer32
|
||||||
|
UNITS "0.1 degrees Fahrenheit"
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The temperature at the heatsink thermistor in tenths degrees Fahrenheit.
|
||||||
|
Heatsink temperature measurements are not supported on all models. If
|
||||||
|
not supported, this value will always return ERROR_NO_SUCH_NAME."
|
||||||
|
::= { tlpUpsHeatsinkEntry 3 }
|
||||||
|
|
||||||
|
tlpUpsInputContactTable OBJECT-TYPE
|
||||||
|
SYNTAX SEQUENCE OF TlpUpsInputContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The input contact details of each ups in the device table. The number of entries
|
||||||
|
is given by the value of tlpUpsIdentNumInputContacts."
|
||||||
|
::= { tlpUpsInputContact 1 }
|
||||||
|
|
||||||
|
tlpUpsInputContactEntry OBJECT-TYPE
|
||||||
|
SYNTAX TlpUpsInputContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"An entry containing input contact details for a particular ups."
|
||||||
|
INDEX { tlpDeviceIndex, tlpUpsInputContactIndex }
|
||||||
|
::= { tlpUpsInputContactTable 1 }
|
||||||
|
|
||||||
|
TlpUpsInputContactEntry ::= SEQUENCE {
|
||||||
|
tlpUpsInputContactIndex Unsigned32,
|
||||||
|
tlpUpsInputContactInAlarm INTEGER }
|
||||||
|
|
||||||
|
tlpUpsInputContactIndex OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The table row index for the ups input contact details."
|
||||||
|
::= { tlpUpsInputContactEntry 1 }
|
||||||
|
|
||||||
|
tlpUpsInputContactInAlarm OBJECT-TYPE
|
||||||
|
SYNTAX INTEGER {
|
||||||
|
notInAlarm(0),
|
||||||
|
inAlarm(1) }
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The alarm status of the input contact. Input contacts are not supported on
|
||||||
|
all models. If not supported, the agent reports ERROR_NO_SUCH_NAME."
|
||||||
|
::= { tlpUpsInputContactEntry 2 }
|
||||||
|
|
||||||
|
tlpUpsOutputContactTable OBJECT-TYPE
|
||||||
|
SYNTAX SEQUENCE OF TlpUpsOutputContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The output contact details of each ups in the device table. The number of entries
|
||||||
|
is given by the value of tlpUpsIdentNumOuputContacts."
|
||||||
|
::= { tlpUpsOutputContact 1 }
|
||||||
|
|
||||||
|
tlpUpsOutputContactEntry OBJECT-TYPE
|
||||||
|
SYNTAX TlpUpsOutputContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"An entry containing output contact details for a particular ups."
|
||||||
|
INDEX { tlpDeviceIndex, tlpUpsOutputContactIndex }
|
||||||
|
::= { tlpUpsOutputContactTable 1 }
|
||||||
|
|
||||||
|
TlpUpsOutputContactEntry ::= SEQUENCE {
|
||||||
|
tlpUpsOutputContactIndex Unsigned32,
|
||||||
|
tlpUpsOutputContactInAlarm INTEGER }
|
||||||
|
|
||||||
|
tlpUpsOutputContactIndex OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The table row index for the ups output contact details."
|
||||||
|
::= { tlpUpsOutputContactEntry 1 }
|
||||||
|
|
||||||
|
tlpUpsOutputContactInAlarm OBJECT-TYPE
|
||||||
|
SYNTAX INTEGER {
|
||||||
|
notInAlarm(0),
|
||||||
|
inAlarm(1) }
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The alarm status of the output contact. Output contacts are not supported on
|
||||||
|
all models. If not supported, the agent reports ERROR_NO_SUCH_NAME."
|
||||||
|
::= { tlpUpsOutputContactEntry 2 }
|
||||||
|
|
||||||
tlpUpsControlTable OBJECT-TYPE
|
tlpUpsControlTable OBJECT-TYPE
|
||||||
SYNTAX SEQUENCE OF TlpUpsControlEntry
|
SYNTAX SEQUENCE OF TlpUpsControlEntry
|
||||||
MAX-ACCESS not-accessible
|
MAX-ACCESS not-accessible
|
||||||
@@ -2392,14 +2630,16 @@ tlpUpsControlEntry OBJECT-TYPE
|
|||||||
::= { tlpUpsControlTable 1 }
|
::= { tlpUpsControlTable 1 }
|
||||||
|
|
||||||
TlpUpsControlEntry ::= SEQUENCE {
|
TlpUpsControlEntry ::= SEQUENCE {
|
||||||
tlpUpsControlSelfTest TruthValue,
|
tlpUpsControlSelfTest TruthValue,
|
||||||
tlpUpsControlRamp TruthValue,
|
tlpUpsControlRamp TruthValue,
|
||||||
tlpUpsControlShed TruthValue,
|
tlpUpsControlShed TruthValue,
|
||||||
tlpUpsControlUpsOn TruthValue,
|
tlpUpsControlUpsOn TruthValue,
|
||||||
tlpUpsControlUpsOff TruthValue,
|
tlpUpsControlUpsOff TruthValue,
|
||||||
tlpUpsControlUpsReboot TruthValue,
|
tlpUpsControlUpsReboot TruthValue,
|
||||||
tlpUpsControlBypass INTEGER,
|
tlpUpsControlBypass INTEGER,
|
||||||
tlpUpsControlResetWattHours TruthValue }
|
tlpUpsControlResetWattHours TruthValue,
|
||||||
|
tlpUpsControlCancelSelfTest TruthValue,
|
||||||
|
tlpUpsControlResetAllParameters TruthValue }
|
||||||
|
|
||||||
tlpUpsControlSelfTest OBJECT-TYPE
|
tlpUpsControlSelfTest OBJECT-TYPE
|
||||||
SYNTAX TruthValue
|
SYNTAX TruthValue
|
||||||
@@ -2465,7 +2705,7 @@ tlpUpsControlBypass OBJECT-TYPE
|
|||||||
mode is not supported, this value will return ERROR_NO_SUCH_NAME."
|
mode is not supported, this value will return ERROR_NO_SUCH_NAME."
|
||||||
::= { tlpUpsControlEntry 7 }
|
::= { tlpUpsControlEntry 7 }
|
||||||
|
|
||||||
tlpUpsControlResetWattHours OBJECT-TYPE
|
tlpUpsControlResetWattHours OBJECT-TYPE
|
||||||
SYNTAX TruthValue
|
SYNTAX TruthValue
|
||||||
MAX-ACCESS read-write
|
MAX-ACCESS read-write
|
||||||
STATUS current
|
STATUS current
|
||||||
@@ -2473,6 +2713,22 @@ tlpUpsControlResetWattHours OBJECT-TYPE
|
|||||||
"Set to TRUE to reset the tlpUpsInputWattHours calculation algorithm."
|
"Set to TRUE to reset the tlpUpsInputWattHours calculation algorithm."
|
||||||
::= { tlpUpsControlEntry 8 }
|
::= { tlpUpsControlEntry 8 }
|
||||||
|
|
||||||
|
tlpUpsControlCancelSelfTest OBJECT-TYPE
|
||||||
|
SYNTAX TruthValue
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Set to TRUE to cancel the self test in progress."
|
||||||
|
::= { tlpUpsControlEntry 9 }
|
||||||
|
|
||||||
|
tlpUpsControlResetAllParameters OBJECT-TYPE
|
||||||
|
SYNTAX TruthValue
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Set to TRUE to reset all configuration settings to the default values."
|
||||||
|
::= { tlpUpsControlEntry 10 }
|
||||||
|
|
||||||
tlpUpsConfigTable OBJECT-TYPE
|
tlpUpsConfigTable OBJECT-TYPE
|
||||||
SYNTAX SEQUENCE OF TlpUpsConfigEntry
|
SYNTAX SEQUENCE OF TlpUpsConfigEntry
|
||||||
MAX-ACCESS not-accessible
|
MAX-ACCESS not-accessible
|
||||||
@@ -2512,7 +2768,9 @@ TlpUpsConfigEntry ::= SEQUENCE {
|
|||||||
tlpUpsConfigEconomicMode INTEGER,
|
tlpUpsConfigEconomicMode INTEGER,
|
||||||
tlpUpsConfigFaultAction INTEGER,
|
tlpUpsConfigFaultAction INTEGER,
|
||||||
tlpUpsConfigOffMode INTEGER,
|
tlpUpsConfigOffMode INTEGER,
|
||||||
tlpUpsConfigLineSensitivity INTEGER }
|
tlpUpsConfigLineSensitivity INTEGER,
|
||||||
|
tlpUpsConfigLineQualifyTime Unsigned32,
|
||||||
|
tlpUpsConfigACPowerSenseType INTEGER }
|
||||||
|
|
||||||
tlpUpsConfigInputVoltage OBJECT-TYPE
|
tlpUpsConfigInputVoltage OBJECT-TYPE
|
||||||
SYNTAX Unsigned32
|
SYNTAX Unsigned32
|
||||||
@@ -2766,6 +3024,31 @@ tlpUpsConfigLineSensitivity OBJECT-TYPE
|
|||||||
by the ups, then this value will always return ERROR_NO_SUCH_NAME."
|
by the ups, then this value will always return ERROR_NO_SUCH_NAME."
|
||||||
::= { tlpUpsConfigEntry 18 }
|
::= { tlpUpsConfigEntry 18 }
|
||||||
|
|
||||||
|
tlpUpsConfigLineQualifyTime OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "seconds"
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The amount of time the ups monitors line power quality for stability before ac power
|
||||||
|
is restored. If there is an attempt to set this variable to a
|
||||||
|
value that is not supported, the request will be rejected and the agent
|
||||||
|
will respond with an appropriate error message."
|
||||||
|
::= { tlpUpsConfigEntry 19 }
|
||||||
|
|
||||||
|
tlpUpsConfigACPowerSenseType OBJECT-TYPE
|
||||||
|
SYNTAX INTEGER {
|
||||||
|
generator(1),
|
||||||
|
ups(2) }
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"This option enables configuration of ups AC power sensing to maximize ups
|
||||||
|
operation for standard line power AC and generator power applications.
|
||||||
|
If this value is not supported by the ups, then this value will always return
|
||||||
|
ERROR_NO_SUCH_NAME."
|
||||||
|
::= { tlpUpsConfigEntry 20 }
|
||||||
|
|
||||||
tlpUpsConfigAutoRestartTable OBJECT-TYPE
|
tlpUpsConfigAutoRestartTable OBJECT-TYPE
|
||||||
SYNTAX SEQUENCE OF TlpUpsConfigAutoRestartEntry
|
SYNTAX SEQUENCE OF TlpUpsConfigAutoRestartEntry
|
||||||
MAX-ACCESS not-accessible
|
MAX-ACCESS not-accessible
|
||||||
@@ -2927,6 +3210,224 @@ tlpUpsConfigOverLoadThreshold OBJECT-TYPE
|
|||||||
percentage of output load exceeds this value."
|
percentage of output load exceeds this value."
|
||||||
::= { tlpUpsConfigThresholdEntry 4 }
|
::= { tlpUpsConfigThresholdEntry 4 }
|
||||||
|
|
||||||
|
tlpUpsConfigVoltageTable OBJECT-TYPE
|
||||||
|
SYNTAX SEQUENCE OF TlpUpsConfigVoltageEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The voltage configuration details for each ups in device table. This
|
||||||
|
is a sparse dependent table, and will contain some subset of devices
|
||||||
|
that are upss. Not all options are available on all upss."
|
||||||
|
::= { tlpUpsConfig 4 }
|
||||||
|
|
||||||
|
tlpUpsConfigVoltageEntry OBJECT-TYPE
|
||||||
|
SYNTAX TlpUpsConfigVoltageEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"An entry containing voltage configuration options for a particular ups."
|
||||||
|
INDEX { tlpDeviceIndex }
|
||||||
|
::= { tlpUpsConfigVoltageTable 1 }
|
||||||
|
|
||||||
|
TlpUpsConfigVoltageEntry ::= SEQUENCE {
|
||||||
|
tlpUpsConfigHighVoltageTransfer Unsigned32,
|
||||||
|
tlpUpsConfigHighVoltageResetTolerance Unsigned32,
|
||||||
|
tlpUpsConfigHighVoltageReset Unsigned32,
|
||||||
|
tlpUpsConfigLowVoltageTransfer Unsigned32,
|
||||||
|
tlpUpsConfigLowVoltageResetTolerance Unsigned32,
|
||||||
|
tlpUpsConfigLowVoltageReset Unsigned32 }
|
||||||
|
|
||||||
|
tlpUpsConfigHighVoltageTransfer OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "0.1 Volts"
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The maximum line voltage allowed on the input source before the unit
|
||||||
|
disconnects the AC input connection."
|
||||||
|
::= { tlpUpsConfigVoltageEntry 1 }
|
||||||
|
|
||||||
|
tlpUpsConfigHighVoltageResetTolerance OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "Volts"
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"If an input connection is disconnected due to over-voltage, the line voltage on the input source
|
||||||
|
has to fall below tlpUpsConfigHighVoltageTransfer less tlpUpsConfigHighVoltageTransferResetTolerance `
|
||||||
|
before the unit reconnects the AC input to input source."
|
||||||
|
::= { tlpUpsConfigVoltageEntry 2 }
|
||||||
|
|
||||||
|
tlpUpsConfigHighVoltageReset OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "0.1 Volts"
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"If an input connection is disconnected due to over-voltage, the line voltage on the input source
|
||||||
|
has to fall below tlpUpsConfigHighVoltageReset before the unit reconnects the AC input to input source."
|
||||||
|
::= { tlpUpsConfigVoltageEntry 3 }
|
||||||
|
|
||||||
|
tlpUpsConfigLowVoltageTransfer OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "0.1 Volts"
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The minimum line voltage allowed before the unit disconnects the AC input
|
||||||
|
connection."
|
||||||
|
::= { tlpUpsConfigVoltageEntry 4 }
|
||||||
|
|
||||||
|
tlpUpsConfigLowVoltageResetTolerance OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "Volts"
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"If a unit is disconnected due to under-voltage or is not powered up yet, the line voltage
|
||||||
|
has to rise above tlpUpsConfigLowVoltageTransfer plus tlpUpsConfigLowVoltageTransferResetTolerance
|
||||||
|
before the unit reonnect the AC input to input source."
|
||||||
|
::= { tlpUpsConfigVoltageEntry 5 }
|
||||||
|
|
||||||
|
tlpUpsConfigLowVoltageReset OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
UNITS "0.1 Volts"
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"If a unit is disconnected due to under-voltage or is not powered up yet, the line voltage
|
||||||
|
has to rise above tlpUpsConfigLowVoltageReset before the unit reonnect the AC input to input source."
|
||||||
|
::= { tlpUpsConfigVoltageEntry 6 }
|
||||||
|
|
||||||
|
tlpUpsConfigContact OBJECT IDENTIFIER::= { tlpUpsConfig 5 }
|
||||||
|
|
||||||
|
tlpUpsConfigContactTable OBJECT-TYPE
|
||||||
|
SYNTAX SEQUENCE OF TlpUpsConfigContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The configuration options of each ups in device table. This
|
||||||
|
is a sparse dependent table, and will contain some subset of
|
||||||
|
devices that are upss. Not all options are available on all
|
||||||
|
upss."
|
||||||
|
::= { tlpUpsConfigContact 1 }
|
||||||
|
|
||||||
|
tlpUpsConfigContactEntry OBJECT-TYPE
|
||||||
|
SYNTAX TlpUpsConfigContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"An entry containing contact configuration options for a particular ups."
|
||||||
|
INDEX { tlpDeviceIndex }
|
||||||
|
::= { tlpUpsConfigContactTable 1 }
|
||||||
|
|
||||||
|
TlpUpsConfigContactEntry ::= SEQUENCE {
|
||||||
|
tlpUpsConfigOutputContactBackupTimer INTEGER }
|
||||||
|
|
||||||
|
tlpUpsConfigOutputContactBackupTimer OBJECT-TYPE
|
||||||
|
SYNTAX INTEGER
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"This is the amount of runtime the UPS supports in battery mode before sending
|
||||||
|
a configured output contact notification. Output contacts are not supported on all
|
||||||
|
models. If not supported, this value will always return ERROR_NO_SUCH_NAME."
|
||||||
|
::= { tlpUpsConfigContactEntry 1 }
|
||||||
|
|
||||||
|
tlpUpsConfigInputContactTable OBJECT-TYPE
|
||||||
|
SYNTAX SEQUENCE OF TlpUpsConfigInputContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The input contact details of each ups in device table. the number of entries is
|
||||||
|
given by tlpUpsIdentNumInputContacts. This is a sparse dependent table, and will
|
||||||
|
contain some subset of devices that are upss. Not all options are available on all
|
||||||
|
upss."
|
||||||
|
::= { tlpUpsConfigContact 2 }
|
||||||
|
|
||||||
|
tlpUpsConfigInputContactEntry OBJECT-TYPE
|
||||||
|
SYNTAX TlpUpsConfigInputContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"An entry containing input contact details for a particular ups."
|
||||||
|
INDEX { tlpDeviceIndex, tlpUpsConfigInputContactIndex }
|
||||||
|
::= { tlpUpsConfigInputContactTable 1 }
|
||||||
|
|
||||||
|
TlpUpsConfigInputContactEntry ::= SEQUENCE {
|
||||||
|
tlpUpsConfigInputContactIndex Unsigned32,
|
||||||
|
tlpUpsConfigInputContactSetup INTEGER }
|
||||||
|
|
||||||
|
tlpUpsConfigInputContactIndex OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The table row index for the ups input contact details."
|
||||||
|
::= { tlpUpsConfigInputContactEntry 1 }
|
||||||
|
|
||||||
|
tlpUpsConfigInputContactSetup OBJECT-TYPE
|
||||||
|
SYNTAX INTEGER {
|
||||||
|
userDefined(0),
|
||||||
|
externalAlarm(1),
|
||||||
|
externalBatteryAlarm(2),
|
||||||
|
externalFanFailed(3),
|
||||||
|
doorUnlock(4)}
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Input contact configuration options. Input contacts are not supported on
|
||||||
|
all models. If not supported, the agent reports ERROR_NO_SUCH_NAME."
|
||||||
|
::= { tlpUpsConfigInputContactEntry 2 }
|
||||||
|
|
||||||
|
tlpUpsConfigOutputContactTable OBJECT-TYPE
|
||||||
|
SYNTAX SEQUENCE OF TlpUpsConfigOutputContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Output contact details of each ups in device table. The number of entries is
|
||||||
|
given by tlpUpsIdentNumOutputContacts. This is a sparse dependent table, and
|
||||||
|
will contain some subset of devices that are upss. Not all options are available
|
||||||
|
on all upss."
|
||||||
|
::= { tlpUpsConfigContact 3 }
|
||||||
|
|
||||||
|
tlpUpsConfigOutputContactEntry OBJECT-TYPE
|
||||||
|
SYNTAX TlpUpsConfigOutputContactEntry
|
||||||
|
MAX-ACCESS not-accessible
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"An entry containing output contact details for a particular ups."
|
||||||
|
INDEX { tlpDeviceIndex, tlpUpsConfigOutputContactIndex }
|
||||||
|
::= { tlpUpsConfigOutputContactTable 1 }
|
||||||
|
|
||||||
|
TlpUpsConfigOutputContactEntry ::= SEQUENCE {
|
||||||
|
tlpUpsConfigOutputContactIndex Unsigned32,
|
||||||
|
tlpUpsConfigOutputContactSetup INTEGER }
|
||||||
|
|
||||||
|
tlpUpsConfigOutputContactIndex OBJECT-TYPE
|
||||||
|
SYNTAX Unsigned32
|
||||||
|
MAX-ACCESS read-only
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The table row index for the ups output contact details."
|
||||||
|
::= { tlpUpsConfigOutputContactEntry 1 }
|
||||||
|
|
||||||
|
tlpUpsConfigOutputContactSetup OBJECT-TYPE
|
||||||
|
SYNTAX INTEGER {
|
||||||
|
disabled(0),
|
||||||
|
onBattery(1),
|
||||||
|
batteryLow(2),
|
||||||
|
timer(3),
|
||||||
|
alarm(4),
|
||||||
|
fault(5),
|
||||||
|
outputOff(6) }
|
||||||
|
MAX-ACCESS read-write
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Output contact configuration options. Output contacts are not supported on
|
||||||
|
all models. If not supported, the agent reports ERROR_NO_SUCH_NAME."
|
||||||
|
::= { tlpUpsConfigOutputContactEntry 2 }
|
||||||
|
|
||||||
-- pdu
|
-- pdu
|
||||||
|
|
||||||
tlpPduIdentNumPdu OBJECT-TYPE
|
tlpPduIdentNumPdu OBJECT-TYPE
|
||||||
@@ -9113,6 +9614,12 @@ tlpAlarmInternalFirmwareError OBJECT-IDENTITY
|
|||||||
"A problem has been encountered with the device firmware."
|
"A problem has been encountered with the device firmware."
|
||||||
::= { tlpDeviceAlarms 3 }
|
::= { tlpDeviceAlarms 3 }
|
||||||
|
|
||||||
|
tlpAlarmDeviceEEPROMFault OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"A problem has been encountered with the device EEPROM."
|
||||||
|
::= { tlpDeviceAlarms 4 }
|
||||||
|
|
||||||
tlpUpsAlarmBatteryBad OBJECT-IDENTITY
|
tlpUpsAlarmBatteryBad OBJECT-IDENTITY
|
||||||
STATUS current
|
STATUS current
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
@@ -9677,6 +10184,84 @@ tlpUpsAlarmLoadsNotAllOn OBJECT-IDENTITY
|
|||||||
"One of more loads are not on."
|
"One of more loads are not on."
|
||||||
::= { tlpUpsAlarms 47 }
|
::= { tlpUpsAlarms 47 }
|
||||||
|
|
||||||
|
tlpUpsAlarmBatteryTemperatureHigh OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The battery temperature is high."
|
||||||
|
::= { tlpUpsAlarms 48 }
|
||||||
|
|
||||||
|
tlpUpsAlarmBatteryTemperatureLow OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The battery temperature is low."
|
||||||
|
::= { tlpUpsAlarms 49 }
|
||||||
|
|
||||||
|
tlpUpsAlarmBatteryDisconnected OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The battery disconnected."
|
||||||
|
::= { tlpUpsAlarms 50 }
|
||||||
|
|
||||||
|
tlpUpsAlarmBatteryTemperatureSensorDisconnected OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"The battery temperature sensor disconnected."
|
||||||
|
::= { tlpUpsAlarms 51 }
|
||||||
|
|
||||||
|
tlpUpsAlarmTemperatureDerating OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Power derating due to high environment temperature."
|
||||||
|
::= { tlpUpsAlarms 52 }
|
||||||
|
|
||||||
|
tlpUpsAlarmInputContact OBJECT IDENTIFIER
|
||||||
|
::= { tlpUpsAlarms 53 }
|
||||||
|
|
||||||
|
tlpUpsAlarmInputContact1 OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Input contact 1 in alarm."
|
||||||
|
::= { tlpUpsAlarmInputContact 1 }
|
||||||
|
|
||||||
|
tlpUpsAlarmOutputContact OBJECT IDENTIFIER
|
||||||
|
::= { tlpUpsAlarms 54 }
|
||||||
|
|
||||||
|
tlpUpsAlarmOutputContact1 OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Output contact 1 in alarm."
|
||||||
|
::= { tlpUpsAlarmOutputContact 1 }
|
||||||
|
|
||||||
|
tlpUpsAlarmOutputContact2 OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Output contact 2 in alarm."
|
||||||
|
::= { tlpUpsAlarmOutputContact 2 }
|
||||||
|
|
||||||
|
tlpUpsAlarmOutputContact3 OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Output contact 3 in alarm."
|
||||||
|
::= { tlpUpsAlarmOutputContact 3 }
|
||||||
|
|
||||||
|
tlpUpsAlarmOutputContact4 OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Output contact 4 in alarm."
|
||||||
|
::= { tlpUpsAlarmOutputContact 4 }
|
||||||
|
|
||||||
|
tlpUpsAlarmOutputContact5 OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Output contact 5 in alarm."
|
||||||
|
::= { tlpUpsAlarmOutputContact 5 }
|
||||||
|
|
||||||
|
tlpUpsAlarmOutputContact6 OBJECT-IDENTITY
|
||||||
|
STATUS current
|
||||||
|
DESCRIPTION
|
||||||
|
"Output contact 6 in alarm."
|
||||||
|
::= { tlpUpsAlarmOutputContact 6 }
|
||||||
|
|
||||||
tlpPduAlarmLoadLevelAboveThreshold OBJECT-IDENTITY
|
tlpPduAlarmLoadLevelAboveThreshold OBJECT-IDENTITY
|
||||||
STATUS current
|
STATUS current
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
91
tests/Feature/SnmpTraps/TrippliteTrapTest.php
Normal file
91
tests/Feature/SnmpTraps/TrippliteTrapTest.php
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* TrippliteTrapTest.php
|
||||||
|
*
|
||||||
|
* -Description-
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* @package LibreNMS
|
||||||
|
* @link http://librenms.org
|
||||||
|
* @copyright 2021 Tony Murray
|
||||||
|
* @author Tony Murray <murraytony@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace LibreNMS\Tests\Feature\SnmpTraps;
|
||||||
|
|
||||||
|
use App\Models\Device;
|
||||||
|
use LibreNMS\Snmptrap\Dispatcher;
|
||||||
|
use LibreNMS\Snmptrap\Trap;
|
||||||
|
|
||||||
|
class TrippliteTrapTest extends SnmpTrapTestCase
|
||||||
|
{
|
||||||
|
public function testTlpNotificationsAlarmEntryAdded()
|
||||||
|
{
|
||||||
|
$device = Device::factory()->create();
|
||||||
|
|
||||||
|
$trapText = "$device->hostname
|
||||||
|
UDP: [$device->ip]:46024->[1.1.1.1]:162
|
||||||
|
DISMAN-EVENT-MIB::sysUpTimeInstance 0:1:55:34.92
|
||||||
|
SNMPv2-MIB::snmpTrapOID.0 TRIPPLITE-PRODUCTS::tlpNotificationsAlarmEntryAdded
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmId 6
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmDescr TRIPPLITE-PRODUCTS::tlpUpsAlarmOnBattery
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmTime 0:1:56:20.44
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmTableRef TRIPPLITE-PRODUCTS::tlpDeviceTable
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmTableRowRef TRIPPLITE-PRODUCTS::tlpDeviceIndex.1
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmDetail On Battery
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmType warning
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmState active
|
||||||
|
TRIPPLITE-PRODUCTS::tlpDeviceName.1 $device->sysDescr
|
||||||
|
TRIPPLITE-PRODUCTS::tlpDeviceLocation.1 $device->location
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAgentMAC.0 00:06:67:AE:BE:13
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAgentUuid.0 c94e376a-8080-44fb-96ad-0fe6583d1c4a";
|
||||||
|
|
||||||
|
$trap = new Trap($trapText);
|
||||||
|
|
||||||
|
$message = 'Trap Alarm active: On Battery';
|
||||||
|
\Log::shouldReceive('event')->once()->with($message, $device->device_id, 'trap', 4);
|
||||||
|
|
||||||
|
$this->assertTrue(Dispatcher::handle($trap), 'Could not handle tlpNotificationsAlarmEntryAdded');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testTlpNotificationsAlarmEntryRemoved()
|
||||||
|
{
|
||||||
|
$device = Device::factory()->create();
|
||||||
|
|
||||||
|
$trapText = "$device->hostname
|
||||||
|
UDP: [$device->ip]:46024->[1.1.1.1]:162
|
||||||
|
DISMAN-EVENT-MIB::sysUpTimeInstance 0:1:56:40.26
|
||||||
|
SNMPv2-MIB::snmpTrapOID.0 TRIPPLITE-PRODUCTS::tlpNotificationsAlarmEntryRemoved
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmId 6
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmDescr TRIPPLITE-PRODUCTS::tlpUpsAlarmOnBattery
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmTime 0:1:56:20.44
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmTableRef TRIPPLITE-PRODUCTS::tlpDeviceTable
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmTableRowRef TRIPPLITE-PRODUCTS::tlpDeviceIndex.1
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmDetail On Utility Power
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmType info
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAlarmState inactive
|
||||||
|
TRIPPLITE-PRODUCTS::tlpDeviceName.1 $device->sysDescr
|
||||||
|
TRIPPLITE-PRODUCTS::tlpDeviceLocation.1 $device->location
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAgentMAC.0 00:06:67:AE:BE:13
|
||||||
|
TRIPPLITE-PRODUCTS::tlpAgentUuid.0 c94e376a-8080-44fb-96ad-0fe6583d1c4a";
|
||||||
|
|
||||||
|
$trap = new Trap($trapText);
|
||||||
|
|
||||||
|
$message = 'Trap Alarm inactive: On Utility Power';
|
||||||
|
\Log::shouldReceive('event')->once()->with($message, $device->device_id, 'trap', 2);
|
||||||
|
|
||||||
|
$this->assertTrue(Dispatcher::handle($trap), 'Could not handle tlpNotificationsAlarmEntryRemoved');
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user