cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3379
Views
0
Helpful
6
Replies

How to find list of Devices from FMC CLI

MSJ1
Level 1
Level 1

How to find list of Devices from FMC CLI. My FMC version is 6.7.0

1 Accepted Solution

Accepted Solutions

Marvin Rhoads
Hall of Fame
Hall of Fame

You cannot. Managed devices are stored as database objects in FMC, not lines in a config file.

View solution in original post

6 Replies 6

Marvin Rhoads
Hall of Fame
Hall of Fame

You cannot. Managed devices are stored as database objects in FMC, not lines in a config file.

I should add that you can get a list of the registered devices' IP addresses.

In the FMC cli, switch to expert mode. Then look at the sftunnel.conf file in et/sf. It will (among other things) list the peer IP addresses (but not necessarily their names).

right , but while in FTD we can remove single entries on the DB by using Omniquery.pl ------------- is that possible to do the same on FMC?

eg.: mdb.sfsnort> delete from EM_peers where name = '172.16.1.240';

Theoretically you can delete just about anything by directly manipulating the database. You can also completely destroy your system and require a rebuild from scratch if you do something wrong. I would only recommend doing such manipulation with direct involvement of Cisco TAC.

I would add (thanks Wei!) that you can query the FMC database in expert mode as root user with:

OmniQuery.pl -db mdb -e "select name, ip, uuid, role from EM_peers;"

Removals can be done as well; but I would advise contacting TAC for confirmation if you believe that is necessary in your situation.

Hello @Marvin Rhoads Thanks for sharing! You’ve jogged my memory. I just need to check my notes and find a similar workaround command. Hopefully, it will be helpful to others as well. 

 

To work this I have to go to SFR Module find the UUID/IP but this does not work either. I have to go to FMC command line 

"root@fmc2:~# OmniQuery.pl -db mdb -e "select * from EM_peers;" against the IP/UUID. 

admin@fmc2:~$ sudo remove_peer.pl ~d2e989e8-f4bc-11eb-9fc8-9e4279a48f45

 

please do not forget to rate.
Review Cisco Networking for a $25 gift card