Skip to content

Commit

Permalink
fix: Added Raritan PDU support
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Dec 6, 2024
1 parent 165bf96 commit f0fac57
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ netdiscovery/netinventory:
* don't send discovery xml to server target for remoteinventory task event initiated
from toolbox
* fix #781: Filter invalid firmware date on HP peripherals
* Added Raritan PDU devices support
* Updated sysobject.ids

deploy:
* Fix checks on command run and clarify reason of success or failure. This fixes
Expand Down
63 changes: 63 additions & 0 deletions lib/GLPI/Agent/SNMP/MibSupport/Raritan.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package GLPI::Agent::SNMP::MibSupport::Raritan;

use strict;
use warnings;

use parent 'GLPI::Agent::SNMP::MibSupportTemplate';

use GLPI::Agent::Tools;
use GLPI::Agent::Tools::SNMP;

use constant raritan => '.1.3.6.1.4.1.13742' ;
use constant pdu2 => raritan . '.6' ;

use constant nameplateEntry => pdu2 . '.3.2.1.1';
use constant pduManufacturer => nameplateEntry . '.2.1';
use constant pduModel => nameplateEntry . '.3.1';
use constant pduSerialNumber => nameplateEntry . '.4.1';

use constant unitConfigurationEntry => pdu2 . '.3.2.2.1';
use constant pduName => unitConfigurationEntry . '.13.1';

our $mibSupport = [
{
name => "raritan-pdu2",
sysobjectid => getRegexpOidMatch(pdu2)
}
];

sub getManufacturer {
my ($self) = @_;

return getCanonicalString($self->get(pduManufacturer)) || 'Raritan';
}

sub getSerial {
my ($self) = @_;

return getCanonicalString($self->get(pduSerialNumber));
}

sub getModel {
my ($self) = @_;

return getCanonicalString($self->get(pduModel));
}

sub getSnmpHostname {
my ($self) = @_;

return getCanonicalString($self->get(pduName));
}

1;

__END__
=head1 NAME
GLPI::Agent::SNMP::MibSupport::Raritan - Inventory module for Raritan Pdu devices
=head1 DESCRIPTION
The module enhances Raritan Pdu devices support.
11 changes: 11 additions & 0 deletions share/sysobject.ids
Original file line number Diff line number Diff line change
Expand Up @@ -6987,9 +6987,15 @@
12532.253.4.1 Juniper Networks NETWORKING IC-6500
12532.254.4.1 Juniper Networks NETWORKING MAG-SM360

12740 Dell STORAGE
12740.17 Dell STORAGE

12925 HP STORAGE 3PAR
12925.1 HP STORAGE 3PAR 7400

13742 Raritan NETWORKING
13742.6 Raritan NETWORKING

13885 Polycom PHONE

14179 Cisco NETWORKING WLC 4100
Expand Down Expand Up @@ -9139,6 +9145,9 @@
26866.1.1 Gigamon NETWORKING GigaVUE-420
26866.3.1 Gigamon NETWORKING GigaVUE-2404

26928 Aerohive NETWORKING
26928.1 Aerohive NETWORKING

27282 Ubiquiti NETWORKING
27282.3.2.10 Ubiquiti NETWORKING EdgeSwitch 10X

Expand Down Expand Up @@ -9390,3 +9399,5 @@
52642.2.1.45.101 FS NETWORKING S3900-48T4S

55062 Qnap STORAGE

1004849 Intelbras NETWORKING

0 comments on commit f0fac57

Please sign in to comment.