Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
TomBruno
New Contributor

Export a filtered list from Device Inventory

Hi All

I have a filtered list of nearly 4000 devices in the Device Inventory of a 1500D FortiGate I support and wondered if there is a way to export the list

 

Thanks in advance

1 Solution
Dave_Hall
Honored Contributor

Closest commands is the "diagnose user device <commands>" from the CLI

eg.

 

#diagnose user device <command> where command is... list                 List known hosts. get                  List a specific host. del                  Remove a specific host. clear                Clear discovered hosts. os-summary           Discovered OS summary. host-type-summary    Discovered host type summary. stats                User device stats. filter               Filter for various src-vis diagnostics. #diagnose user device filter <options> where options are: vd                 Index of virtual domain. os-name            Operating system name; "" matches unknown. type               Device type; "" matches unknown. list               Display the current filter. addr               IPv4 address range. type-src           Device type source. generation         Device generation. type-generation    Device type generation. joined             Device is joined to another. negate             Negate the specified filter parameter. clear              Clear the filter or parameter. Haven't played around with this diag commands, but I can assume you need to perform a console capture.

 

NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C

View solution in original post

NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C
3 REPLIES 3
Dave_Hall
Honored Contributor

Closest commands is the "diagnose user device <commands>" from the CLI

eg.

 

#diagnose user device <command> where command is... list                 List known hosts. get                  List a specific host. del                  Remove a specific host. clear                Clear discovered hosts. os-summary           Discovered OS summary. host-type-summary    Discovered host type summary. stats                User device stats. filter               Filter for various src-vis diagnostics. #diagnose user device filter <options> where options are: vd                 Index of virtual domain. os-name            Operating system name; "" matches unknown. type               Device type; "" matches unknown. list               Display the current filter. addr               IPv4 address range. type-src           Device type source. generation         Device generation. type-generation    Device type generation. joined             Device is joined to another. negate             Negate the specified filter parameter. clear              Clear the filter or parameter. Haven't played around with this diag commands, but I can assume you need to perform a console capture.

 

NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C

NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C
sw2090

Or just create an (unencrypted) backup of your FGT via webinterface. This is then ust a textfile containing the whole config including your filtered device list.

-- 

"It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams

-- "It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams
lpopov
New Contributor

echo diag user dev list | ssh <user>@fg.ip.or.fqdn > usr.dev.lst

or in case there is vdoms :

(echo config vdom; echo edit VDOM_NAME; echo diag user dev list) | ssh <user>@fg.ip.or.fqdn > usr.dev.lst

 

or use sshpass to avoid interactively typing password

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors