The migration from opFlow 2 to 3 cannot be totally seamless, because opFlow 3 uses the database differently and relies on a different flow collection tool. This document briefly describes the recommended procedure for such an upgrade.
switch off the 'flowd' data collector
opFlow 3 uses 'nfdump/nfcapd' as collector, and the old flowd collector interferes with that and needs to be retired.
sudo service flowd stop sudo chkconfig --del flowd |
shut down 'opflowd'
It is very inadvisable to modify the database while opflowd is running.
sudo service opflowd stop |
/usr/local/opmantek/conf/opFlow.nmis
and look for db_name
.Connect to the database server
You need to connect to your mongoDB server using the mongo
client, with username and password as given in your opFlow.nmis
config file:
# if your installation uses the default username and password: mongo -u opUserRW -p op42flow42 admin > show dbs admin 0.078GB local 0.078GB nmis 0.078GB opFlow 14.071GB > |
Drop the whole database or drop only the flow-related collections
To drop the whole "opFlow
" database, issue the following commands: "use opFlow
" and "db.dropDatabase();" - if the db is named differently, substitute the correct name in the use
statement.
To drop just the relevant collections (primarily required if the database is called "nmis
"), issue these commands instead:
use nmis db.conversations.drop(); db.customapps.drop(); db.endpoints.drop(); db.flows.drop(); db.iana.drop(); db.reportConfig.drop(); db.reportData.drop(); db.sites.drop(); db.sumCache.drop(); |
disable all opFlow 2 cron jobs
The opFlow 3 installer will recreate suitable cron entries; until that stage is reached any jobs for opFlow 2 need to be disabled.
sudo rm -f /etc/cron.d/opflow |
If you have any opFlow-related cron entries in root
's crontab, comment those out as well:
sudo crontab -u root -e # ... and use the editor to remove or comment out anything matching "opflow" |
old /usr/local/etc/flowd.conf
file for the "Listen" directives, e.g. listen on 0.0.0.0:12345
. /etc/sysconfig/nfdump
(CentOS/RedHat) or /etc/default/nfdump
(Debian/Ubuntu) after the opFlow 3 installation has completed, then restart the collector using sudo service nfdump restart
./usr/local/opmantek
completely./data/opflow
: the new nfdump flow capture infrastructure uses /var/lib/nfdump
for capture files.