Skip to content

Commit

Permalink
Update the SNMP::Info::Layer3::Fortinet (#502)
Browse files Browse the repository at this point in the history
Needed to correctly retrieve the type of Fortimanager/Fortianalyzer/FortiAuthenticator
  • Loading branch information
earendilfr committed Mar 14, 2024
1 parent e20cab9 commit 45e599d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/SNMP/Info/Layer3/Fortinet.pm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ $VERSION = '3.970001';
%SNMP::Info::Aggregate::MIBS,
'FORTINET-CORE-MIB' => 'fnSysSerial',
'FORTINET-FORTIGATE-MIB' => 'fgVdMaxVdoms',
'FORTINET-FORTIMANAGER-FORTIANALYZER-MIB' => 'fmSysVersion',
'FORTINET-FORTIAUTHENTICATOR-MIB' => 'facSysVersion',
);

%GLOBALS = (
Expand Down Expand Up @@ -111,7 +113,7 @@ sub os {
sub os_ver {
my $fortinet = shift;

my $ver = $fortinet->fgSysVersion() || '';
my $ver = $fortinet->fgSysVersion() || $fortinet->fmSysVersion() || $fortinet->facSysVersion() || '';

if ( $ver =~ /(\d+[\.\d]+)/ ) {
return $1;
Expand Down Expand Up @@ -204,7 +206,11 @@ Returns 'fortios'
=item $fortinet->os_ver()
Returns the software version extracted from (C<systemVersion>).
Returns the software version extracted from the Fortinet MIB in this order:
(C<fgSysVersion>)
(C<fmSysVersion>)
(C<facSysVersion>)
=item $fortinet->serial()
Expand Down

0 comments on commit 45e599d

Please sign in to comment.