Improvements to Mikrotik module (Alex Z)
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
SNMP::Info - Friendly OO-style interface to Network devices using SNMP.
|
||||
|
||||
version 3.14 ()
|
||||
|
||||
[ENHANCEMENTS]
|
||||
|
||||
* Improvements to Mikrotik module (Alex Z)
|
||||
|
||||
version 3.13 (2014-03-27)
|
||||
|
||||
[ENHANCEMENTS]
|
||||
|
||||
@@ -386,7 +386,7 @@ note: The Cisco 3000 device can return duplicate interface names, while Netdisco
|
||||
|
||||
device: ASA
|
||||
note: The Cisco ASA is the successor of the PIX which was bought from Altiga Networks.
|
||||
Class: Layer3::CiscoASA
|
||||
class: Layer3::CiscoASA
|
||||
|
||||
device-family: 1000
|
||||
duplex: no
|
||||
|
||||
2
Info.pm
2
Info.pm
@@ -108,7 +108,7 @@ See L<http://netdisco.org/doc/DeviceMatrix.html> or L<DeviceMatrix.txt> for more
|
||||
=head1 SUPPORT
|
||||
|
||||
Please direct all support, help, and bug requests to the snmp-info-users
|
||||
Mailing List at <http://lists.sourceforge.net/lists/listinfo/snmp-info-users>.
|
||||
Mailing List at L<http://lists.sourceforge.net/lists/listinfo/snmp-info-users>.
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
||||
@@ -50,17 +50,30 @@ $VERSION = '3.13';
|
||||
%GLOBALS = (
|
||||
%SNMP::Info::Layer3::GLOBALS,
|
||||
'hrSystemUptime' => 'hrSystemUptime',
|
||||
'os_level' => 'mtxrLicLevel',
|
||||
'os_ver' => 'mtxrLicVersion',
|
||||
'serial1' => 'mtxrSystem.3.0',
|
||||
'firmware' => 'mtxrSystem.4.0',
|
||||
'fan_type' => 'mtxrHlActiveFan',
|
||||
);
|
||||
|
||||
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, );
|
||||
%FUNCS = (
|
||||
%SNMP::Info::Layer3::FUNCS,
|
||||
);
|
||||
|
||||
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
|
||||
%MUNGE = (
|
||||
%SNMP::Info::Layer3::MUNGE,
|
||||
);
|
||||
|
||||
sub vendor {
|
||||
return 'mikrotik';
|
||||
}
|
||||
|
||||
sub serial {
|
||||
my $mikrotik = shift;
|
||||
return $mikrotik->serial1;
|
||||
}
|
||||
|
||||
sub model {
|
||||
my $mikrotik = shift;
|
||||
my $descr = $mikrotik->description() || '';
|
||||
@@ -73,6 +86,18 @@ sub os {
|
||||
return 'routeros';
|
||||
}
|
||||
|
||||
sub board_temp {
|
||||
my $mikrotik = shift;
|
||||
my $temp = $mikrotik->mtxrHlTemperature;
|
||||
return $temp / 10.0;
|
||||
}
|
||||
|
||||
sub cpu_temp {
|
||||
my $mikrotik = shift;
|
||||
my $temp = $mikrotik->mtxrHlProcessorTemperature;
|
||||
return $temp / 10.0;
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
@@ -148,6 +173,23 @@ Tries to extract the device model from C<sysDescr>.
|
||||
|
||||
Returns the value of C<mtxrLicVersion>.
|
||||
|
||||
=item $mikrotik->os_level()
|
||||
|
||||
Returns the value of RouterOS level C<mtxrLicLevel>
|
||||
|
||||
=item $mikrotik->board_temp()
|
||||
=item $mikrotik->cpu_temp()
|
||||
|
||||
Returns the appropriate temperature values
|
||||
|
||||
=item $mikrotik->serial()
|
||||
|
||||
Returns the device serial.
|
||||
|
||||
=item $mikrotik->firmware()
|
||||
|
||||
Returns the firmware version of hardware.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Globals imported from SNMP::Info::Layer3
|
||||
|
||||
Reference in New Issue
Block a user