Skip Menu |

This queue is for tickets about the SNMP-Info CPAN distribution.

Report information
The Basics
Id: 94834
Status: resolved
Priority: 0/
Queue: SNMP-Info

People
Owner: OLIVER [...] cpan.org
Requestors: ad_user [...] runbox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: small bugfixes and imporovement of SNMP::Info::Layer3::Mikrotik
Series of small patches, improves Mikrotik's module and fixes two mistypes. Please review and merge upstream.
Subject: 0001-link-in-description.patch
From 3020d29d85d3572d311c911418ba77c10b7dd2bb Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z <ad_user@runbox.com> Date: Tue, 15 Apr 2014 15:30:25 +1100 Subject: [PATCH 1/3] = link in description --- Info.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Info.pm b/Info.pm index 982e167..56db2c6 100644 --- a/Info.pm +++ b/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 -- 1.7.10.4
Subject: 0002-param-name.patch
From 37feae376affcb3b305ec017f9638d24518f2d1a Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z <ad_user@runbox.com> Date: Tue, 15 Apr 2014 15:30:51 +1100 Subject: [PATCH 2/3] = param name --- DeviceMatrix.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DeviceMatrix.txt b/DeviceMatrix.txt index bb25154..d846d8d 100644 --- a/DeviceMatrix.txt +++ b/DeviceMatrix.txt @@ -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 -- 1.7.10.4
Subject: 0003-improve-SNMP-Info-Layer3-Mikrotik.patch
From e8bf3b590c43603b9fead390d6e007cd3cdc29e4 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z <ad_user@runbox.com> Date: Tue, 15 Apr 2014 16:20:47 +1100 Subject: [PATCH 3/3] * improve SNMP::Info::Layer3::Mikrotik --- Info/Layer3/Mikrotik.pm | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/Info/Layer3/Mikrotik.pm b/Info/Layer3/Mikrotik.pm index fd270e8..12650f9 100644 --- a/Info/Layer3/Mikrotik.pm +++ b/Info/Layer3/Mikrotik.pm @@ -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 -- 1.7.10.4
Merged, will be in next release.