Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

371 lines
13 KiB
PHP
Raw Permalink Normal View History

2020-04-10 06:27:15 -05:00
<?php
/*
* CyberPowerTrapsTest.php
*
* 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
2021-02-09 00:29:04 +01:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2020-04-10 06:27:15 -05:00
*
* Unit tests for CyberPower UPS SNMP trap handlers
*
* @package LibreNMS
2021-02-09 00:29:04 +01:00
* @link https://www.librenms.org
2020-04-10 06:27:15 -05:00
* @copyright 2020 KanREN, Inc
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests\Feature\SnmpTraps;
2023-08-05 12:12:36 -05:00
use LibreNMS\Enum\Severity;
2020-04-10 06:27:15 -05:00
class CyberPowerTrapsTest extends SnmpTrapTestCase
{
2022-11-05 14:43:54 -05:00
public function testCpUpsOverload(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsOverload
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS has sensed an overload condition."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS has sensed an overload condition.',
'Could not handle CpUpsOverload trap',
2023-08-05 12:12:36 -05:00
[Severity::Error],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsDiagFailed(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsDiagnosticsFailed
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS battery test failed."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS battery test failed.',
'Could not handle CpUpsDiagFailed trap',
2023-08-05 12:12:36 -05:00
[Severity::Error],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsDischarged(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsDischarged
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS has started a runtime calibration process."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS has started a runtime calibration process.',
'Could not handle CpUpsDischarged trap',
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsOnBattery(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsOnBattery
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "Utility power failed, transfer to backup mode."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'Utility power failed, transfer to backup mode.',
'Could not handle CpUpsOnBattery trap',
2023-08-05 12:12:36 -05:00
[Severity::Warning],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpLowBattery(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::lowBattery
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS battery capacity is low than threshold, soon to be exhausted."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS battery capacity is low than threshold, soon to be exhausted.',
'Could not handle CpLowBattery trap',
2023-08-05 12:12:36 -05:00
[Severity::Warning],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpPowerRestored(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::powerRestored
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "Utility power restored, return from backup mode."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'Utility power restored, return from backup mode.',
'Could not handle CpPowerRestored trap',
2023-08-05 12:12:36 -05:00
[Severity::Ok],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsDiagPassed(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsDiagnosticsPassed
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS battery test passed."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS battery test passed.',
'Could not handle CpUpsDiagPassed trap',
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpRtnLowBattery(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::returnFromLowBattery
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS has returned from a low battery condition."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS has returned from a low battery condition.',
'Could not handle CpRtnLowBattery trap',
2023-08-05 12:12:36 -05:00
[Severity::Ok],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsTurnedOff(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsTurnedOff
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS has been turned off."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS has been turned off.',
'Could not handle CpUpsTurnedOff trap',
2023-08-05 12:12:36 -05:00
[Severity::Warning],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsSleeping(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsSleeping
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS entered sleep mode. Output power will not be provided."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS entered sleep mode. Output power will not be provided.',
'Could not handle CpUpsSleeping trap',
2023-08-05 12:12:36 -05:00
[Severity::Warning],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsWokeUp(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsWokeUp
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS woke up from sleep mode. Output power is being provided."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS woke up from sleep mode. Output power is being provided.',
'Could not handle CpUpsWokeUp trap',
2023-08-05 12:12:36 -05:00
[Severity::Ok],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsRebootStarted(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsRebootStarted
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS started reboot sequence."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS started reboot sequence.',
'Could not handle CpUpsRebootStarted trap',
2023-08-05 12:12:36 -05:00
[Severity::Warning],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsOverTemp(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsOverTemp
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS inner temperature is too high."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS inner temperature is too high.',
'Could not handle CpUpsOverTemp trap',
2023-08-05 12:12:36 -05:00
[Severity::Error],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpRtnOverTemp(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::returnFromOverTemp
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS over temperature condition cleared."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS over temperature condition cleared.',
'Could not handle CpRtnOverTemp trap',
2023-08-05 12:12:36 -05:00
[Severity::Ok],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpRtOverLoad(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::returnFromOverLoad
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS has returned from an overload condition."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS has returned from an overload condition.',
'Could not handle CpRtOverLoad trap',
2023-08-05 12:12:36 -05:00
[Severity::Ok],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpRtnDischarged(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::returnFromDischarged
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The UPS runtime calibration completed."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The UPS runtime calibration completed.',
'Could not handle CpRtnDischarged trap',
2023-08-05 12:12:36 -05:00
[Severity::Ok],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsChargerFailure(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsChargerFailure
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The battery charger is abnormal."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The battery charger is abnormal.',
'Could not handle CpUpsChargerFailure trap',
2023-08-05 12:12:36 -05:00
[Severity::Warning],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpRtnChargerFailure(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::returnFromChargerFailure
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "The charger returned from a failure condition."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'The charger returned from a failure condition.',
'Could not handle CpRtnChargerFailure trap',
2023-08-05 12:12:36 -05:00
[Severity::Ok],
2022-11-05 14:43:54 -05:00
);
2020-04-10 06:27:15 -05:00
}
2022-11-05 14:43:54 -05:00
public function testCpUpsBatteryNotPresent(): void
2020-04-10 06:27:15 -05:00
{
2022-11-05 14:43:54 -05:00
$this->assertTrapLogsMessage(<<<'TRAP'
{{ hostname }}
UDP: [{{ ip }}]:161->[192.168.5.5]:162
2020-04-10 06:27:15 -05:00
DISMAN-EVENT-MIB::sysUpTimeInstance 488:17:19:10.00
SNMPv2-MIB::snmpTrapOID.0 CPS-MIB::upsBatteryNotPresent
2022-11-05 14:43:54 -05:00
CPS-MIB::mtrapinfoString "Battery is not present."
2020-04-10 06:27:15 -05:00
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 $device->ip
2022-11-05 14:43:54 -05:00
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "comstring"
SNMPv2-MIB::snmpTrapEnterprise.0 CPS-MIB::cps
TRAP,
'Battery is not present.',
'Could not handle CpUpsBatteryNotPresent trap',
);
2020-04-10 06:27:15 -05:00
}
}