How to cleanup bogus interfaces in NFA without losing data.
search cancel

How to cleanup bogus interfaces in NFA without losing data.

book

Article ID: 8513

calendar_today

Updated On:

Products

CA Network Flow Analysis (NetQos / NFA)

Issue/Introduction

If you had dual netflow configurations set (Flexible and Traditional), you may have a mess of bogus interfaces to clean up. The bogus interfaces look like below:

dualStream.png

Environment

NFA 9.1+Windows Server 2008Windows Server 2012RedHat Linux

Cause

NFA code does not know how to handle dual netflow streams. For more information on this issue please see Article 3979 - Dual Netflow Stream Causing Bogus Interfaces.


This is an issue that needs to be resolved on the router configuration. 

Resolution

Assuming the router configuration issue was already resolved, we can use this clean procedure. This procedure will cleanup bogus interfaces that came about for devices with SNMP connectivity only. If a device does not have an SNMP profile assigned, this procedure will not affect the device. If the historical data is not important, we recommend using this method: 

Article 3979 - Dual Netflow Stream Causing Bogus Interfaces.

There is a patch to prevent this which can be downloaded here: NFA 9.3.8 Bogus Interface Patch or you can upgrade to NFA 9.5 (recommended).




For NFA 9.3.3:



1. RDP to NFA harvester and open a CMD prompt and type in this exact order:



     a. mysqldump harvester > C:/harvesterbackup4cleanup.sql



     b. mysqldump poller > C:/pollerbackup4cleanup.sql



     c. mysql poller



     d. delete p.* from persistent_map p inner join routers r on p.routerid=r.id where r.profileid!=0 and p.valid=0 and p.ifindex>1;



     e. use harvester



     f. truncate table routers;



     g. truncate table interfaces;



2. Restart the CA NFA Harvester Service



3. RDP to NFA Console server and open a CMD prompt and type: 



     a. mysqldump reporter > C:/NFA_Backup/reporterbackup.sql



     b. mysql reporter



     c. CREATE TABLE temprouters (  ID int(10) unsigned );



     d. ALTER TABLE temprouters ADD PRIMARY KEY (ID);



     e. Insert into temprouters (ID) select id from routers where profileid!=0;



     f. DELETE FROM interfaces WHERE name like 'Interface %' and EXISTS (select id from temprouters where interfaces.routerid=temprouters.id);



     g. Drop table temprouters;



     h. DELETE FROM agent_definitions WHERE interfaceid NOT IN (SELECT id FROM interfaces);




For NFA 9.3.6 and later:



1. RDP to NFA harvester and open a CMD prompt and type in this exact order:



     a. mysqldump harvester > C:/harvesterbackup4cleanup.sql



     b. mysql harvester



     c. delete p.* from persistent_map p inner join routers r on p.routerid=r.routerid where r.profileid!=0 and p.valid=0 and p.ifindex>1;



     d. delete from interfaces;



2. Restart the CA NFA Harvester Service



3. RDP to NFA Console server and open a CMD prompt and type: 



     a. mysqldump reporter > C:/reporterbackup4cleanup.sql



     b. mysql reporter



     c. CREATE TABLE temprouters (  ID int(10) unsigned );


     

     d. ALTER TABLE temprouters ADD PRIMARY KEY (ID);


     e. Insert into temprouters (ID) select id from routers where profileid!=0;



     f. DELETE FROM interfaces WHERE name like 'Interface %' and EXISTS (select id from temprouters where interfaces.routerid=temprouters.id);



     g. Drop table temprouters;



     h. DELETE FROM agent_definitions WHERE interfaceid NOT IN (SELECT id FROM interfaces);

Additional Information

Please contact CA Support if you have a device without SNMP connectivity that you need to clean up bogus interfaces.