Enter the shell CLI:
execute enter-shell
Execute snmpwalk on device:
snmpwalk -v 1 -c fortinet 10.12.242.2 system SNMPv2-MIB::sysDescr.0 = STRING: SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.12356.106.1.1083 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (309641972) 35 days, 20:06:59.72 SNMPv2-MIB::sysContact.0 = STRING: SNMPv2-MIB::sysName.0 = STRING: FSW-DC SNMPv2-MIB::sysLocation.0 = STRING: SNMPv2-MIB::sysServices.0 = INTEGER: 78 SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
Exit shell and enter into the DB shell:
exit logout execute db-shell
Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 112 Server version: 10.7.8-MariaDB-log Source distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [bsc]>
Using an SQL select query, search for the device support in the DB:
MariaDB [bsc]> select ID,oid,name,type FROM DeviceOID where oid like '%12356.106.1.1083%'; +------+------------------------------+--------------------------+--------+ | ID | oid | name | type | +------+------------------------------+--------------------------+--------+ | 2025 | 1.3.6.1.4.1.12356.106.1.1083 | FortiSwitch FSW_108E_POE | switch | +------+------------------------------+--------------------------+--------+ 1 row in set (0.000 sec)
The above example shows that this switch support is already built into FortiNAC-F. After moving the wildcard back a space, it will collect and return more:
ariaDB [bsc]> select ID,oid,name,type FROM DeviceOID where oid like '%12356.106.1.108%'; +------+------------------------------+---------------------------+--------+ | ID | oid | name | type | +------+------------------------------+---------------------------+--------+ | 2015 | 1.3.6.1.4.1.12356.106.1.1088 | FortiSwitch FSW_108F_FPOE | switch | | 2016 | 1.3.6.1.4.1.12356.106.1.1087 | FortiSwitch FSW_108F_POE | switch | | 2018 | 1.3.6.1.4.1.12356.106.1.1086 | FortiSwitch FS108F | switch | | 2023 | 1.3.6.1.4.1.12356.106.1.1081 | FortiSwitch FSW_108D_POE | switch | | 2024 | 1.3.6.1.4.1.12356.106.1.1084 | FortiSwitch FSW_108E_FPOE | switch | | 2025 | 1.3.6.1.4.1.12356.106.1.1083 | FortiSwitch FSW_108E_POE | switch | | 2026 | 1.3.6.1.4.1.12356.106.1.1082 | FortiSwitch FSW_108E | switch | +------+------------------------------+---------------------------+--------+ 7 rows in set (0.000 sec)
This command has output all entries from 1081 to 1085. The following is what will be returned when the OID is not in the DB:
MariaDB [bsc]> select ID,oid,name,type FROM DeviceOID where oid like '%12356.106.1.1085%'; Empty set (0.005 sec)
|