Hi all,
I’m currently running into issues with trying to pull the FDB table from a bunch of FortiSwitches running versions 7.x.y and I’m curious if anyone has this functioning in some way, perhaps with a custom fortiswitch.inc.php file?
Running the following command:
./discovery.php -h 10.101.254.84 -m fdb-table -dd
Returns the following (amongst others):
Error discovering fdb-table module for 10.101.254.84. TypeError: Cannot access offset of type string on string in /opt/librenms/includes/discovery/fdb-table/bridge.inc.php:62
Stack trace:
#0 /opt/librenms/includes/discovery/fdb-table.inc.php(29): include()
#1 /opt/librenms/includes/discovery/functions.inc.php(164): include('...')
#2 /opt/librenms/discovery.php(108): discover_device()
#3 {main}
SQL[insert into `eventlog` (`reference`, `type`, `datetime`, `severity`, `message`, `username`, `device_id`) values (?, ?, ?, ?, ?, ?, ?) [null,"discovery","2024-02-21 09:45:12",5,"Error discovering fdb-table module. Check log file for more details.","",82] 0.77ms]
Cannot access offset of type string on string {"exception":"[object] (TypeError(code: 0): Cannot access offset of type string on string at /opt/librenms/includes/discovery/fdb-table/bridge.inc.php:62)"}
snmpwalking the OID 1.3.6.1.2.1.17.4.3.1 returns the following:
[librenms@nms01 ~]$ snmpwalk -v3 -l authPriv -a SHA256 -A $pwd -x AES256 -X $key -u $user 10.101.254.84 1.3.6.1.2.1.17.4.3.1
SNMPv2-SMI::mib-2.17.4.3.1.1.1 = Hex-STRING: 58 6C 25 E6 3C 4B
SNMPv2-SMI::mib-2.17.4.3.1.1.2 = Hex-STRING: 28 D0 EA AB 6A 85
SNMPv2-SMI::mib-2.17.4.3.1.1.3 = Hex-STRING: 18 66 DA 1B 0C 1E
… and so on with all the MAC addresses on the switch.
I was under the impression that this was functional previously on 6.4.5 but it seems not as per the below; perhaps the fdb-table module has never worked on FortiSwitches?
./discovery.php -h 10.101.254.56 -m fdb-table -dd
SNMP['/usr/bin/snmpbulkwalk' '-v3' '-l' 'authPriv' '-n' "" '-a' 'SHA-256' '-A' 'PASSWORD' '-u' 'USER' '-x' 'AES-256' '-X' 'PASSWORD' '-OQUsetX' '-m' 'Q-BRIDGE-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/fortinet' 'udp:HOSTNAME:161' 'dot1qTpFdbPort']
dot1qTpFdbPort = No Such Object available on this agent at this OID
SNMP['/usr/bin/snmpbulkwalk' '-v3' '-l' 'authPriv' '-n' "" '-a' 'SHA-256' '-A' 'PASSWORD' '-u' 'USER' '-x' 'AES-256' '-X' 'PASSWORD' '-OQUsetX' '-m' 'BRIDGE-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/fortinet' 'udp:HOSTNAME:161' 'dot1dTpFdbPort']
dot1dTpFdbPort = No Such Object available on this agent at this OID
Here is my .validate.php:
[librenms@nms01 ~]$ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS | 24.1.0-88-g4d3149497 (2024-02-19T13:16:03+01:00)
DB Schema | 2024_02_07_151845_custom_map_additions (290)
PHP | 8.2.15
Python | 3.9.18
Database | MariaDB 10.5.22-MariaDB
RRDTool | 1.7.2
SNMP | 5.9.1
===========================================
[OK] Composer Version: 2.7.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
[librenms@nms01 ~]$
Many thanks for any and all help!