Flow Statistics Database Files Missing

Document ID : KB000004111
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

Flow Statistics is showing no data. Port 8067 has been confirmed to be open between the NFA Master Console and the Harvesters. The mysql\data\reporter directory should show a new flow_stats#p#data_till_*.idb file every day, but these files are not getting created.

Environment:
NFA 9.3.x
Cause:

The Flow Statistics data is stored in a partitioned flow_stats table in the MySQL database. The installer should install an event called “RotateFlowStatPartitionsEvent” on the target system. This is the one responsible for creating the new partitions and deleting partitions that contain data that is older than 30 days. If you run the following mysql commands, you should see the “RotateFlowStatPartitionsEvent” event:

Mysql Reporter

SHOW EVENTS;

Resolution:

If the “RotateFlowStatPartitionsEvent” is missing, we can use the following procedure to add it.

Look in the directory: NFA\REPORTER\SQL\install, and you will see an SQL script named: RotateFlowStatPartitionsEvent.sql. That is the script that is responsible for creating the event on the system. We can create the missing event by running the commands from this script from the MySQL Command line, i.e.:

  1. DROP EVENT IF EXISTS RotateFlowStatPartitionsEvent;
  2. CREATE EVENT RotateFlowStatPartitionsEvent ON SCHEDULE EVERY 1 DAY STARTS (TIMESTAMP(CURRENT_DATE) + INTERVAL 1 DAY + INTERVAL 23 HOUR) DO CALL RotateFlowStatPartitions();
  3. CALL RotateFlowStatPartitions();

 

Additional Information: