Migrating a Single-Box ReporterAnalyzer to Distributed INTRODUCTION The steps to migrate a ReporterAnalyzer single-box to a distributed system mainly consist of file copies and SQL updates. MySQL databases on the ReporterAnalyzer single-box must be copied to their new destinations. SQL statements are then applied to change IP address information in various tables. But prior to file copy, you will run the first time setup using the ReportAdminTool on the new ReporterAnalyzer: Run ReporterAdminTool on new ReporterAnalyzer Stop all NetQoS services on the single-box RA Copy files to new locations Update tables with new IP addresses FIRST TIME SETUP ON NEW REPORTERANALYZER The purpose of running the ReportAdminTool and stepping through the first time setup is twofold: Preparing for the new DSA (defining the DSA to ReporterAnalyzer and vice versa) Preparing for the new NetFlow Manager (creating a ODBC DSN that Reporter uses to pump data from NFM) Review the ReporterAnalyzer Initial Setup Guide for instructions When prompted to add a datasource, you MUST name the datasource ‘nfm’ STARTING THE MIGRATION Prior to copying the mySQL data files to their new locations, you must stop all ReporterAnalyzer services. In addition to ‘MySql’, stop any service beginning with the name ‘NetQoS’. Perform this task on all systems, including the single-box ReporterAnalyzer as well as each of the distributed systems. Note: On the DSA, you must disable the ‘dostarter’ scheduled task If you begin with the ‘MySql’ service, you should be prompted to stop many of the other services. Click ‘Yes’ and then stop any other “NetQoS…” services still running. Pg. 2 COPYING FILES The mysql databases on the RA single-box are found in ‘D:\NetQoS\mysql\data’. The folder structure should look like the following: The ‘harvester’ folder will be copied to the new Harvester. ‘nfm’ will be copied to the NetFlow Manager. ‘nqrptr’ is the DSA data and is copied there. ‘reporter’ is then copied to the new ReporterAnalyzer. From the new Harvester, map a drive to the single-box ReporterAnalyzer D$ share (or Start->Run “\\[ReporterAnalyzerIP]\D$”). For safekeeping, rename the existing ‘\MySQL\Data\Harvester’ folder on the target (i.e. new, distributed Harvester) to harvester.BAK. Copy the ReporterAnalyzer single-box ‘harvester’ folder to the corresponding location on the new Harvester. Delete any files in the new systems D:/NetQoS/NetFlow/datafiles HarvesterArchive, ReaperWork, and NFMInput directories. Set the time and start the mySQL and “NetQoS …” services. Pg. 3 From the new NetFlow Manager, map a drive to the single-box ReporterAnalyzer D$ share (or Start->Run “\\[ReporterAnalyzerIP]\D$”). For safekeeping, rename the existing ‘\MySQL\Data\NFM’ folder on the target (i.e. new, distributed NetFlow Manager) to ‘nfm.BAK’. Copy the ReporterAnalyzer single-box ‘nfm’ folder to the corresponding location on the new NetFlow Manager. Now, launch Internet Explorer, navigating to ‘localhost’. In left-hand navigation of the NetFlow Manager Web, click ‘Administration’ under the ‘NetFlow Harvester’ heading. Click ‘Edit’ and update the Harvester definition with the new IP address. Click ‘Submit’. Set the time and start the relevant services. Now from the new DSA, map a drive to the ReporterAnalyzer single-box. For safekeeping, rename the existing ‘\MySQL\Data\Nqrptr’ folder on the target (i.e. new, distributed DSA) to ‘nqrptr.BAK’. Copy the ReporterAnalyzer single-box ‘nqrptr’ folder to the corresponding location on the new DSA. Now, from the ‘nqrptr.BAK’ folder, copy ‘parameter.*’ , ‘log.*’ and ‘statistics.*’ to the new ‘nqrptr’ folder. From the new RA, map a drive to the ReporterAnalyzer single-box. For safekeeping, rename the existing ‘\MySQL\Data\Reporter’ folder on the target (i.e. new, distributed ReporterAnalyzer) to ‘reporter.BAK’. Copy the ReporterAnalyzer single-box ‘reporter’ folder to the corresponding location on the new ReporterAnalyzer. From the ‘reporter.BAK, copy ‘parameter_descriptions.*’, ‘database_servers*.*’ and ’ ‘*_status.*’ to the ‘reporter’ folder you just created. Pg. 4 RUN SQL STATEMENTS Now that the database files are copied to their new locations, you need to update a few tables on the new ReporterAnalyzer. On the new ReporterAnalyzer, open a command prompt and type ‘ mysql -D reporter’. At the mysql prompt, issue the following SQL statement: Update agent_definitions set dataServer=inet_aton(‘10.20.30.40’); Update system_settings set value=‘1.2.3.4’ where parameter=’reporterIP’; Update system_settings set value=‘1.2.3.4’ where parameter=’reporterDSAIP’; Replace ‘10.20.30.40’ with the IP address of the new DSA server, and ‘1.2.3.4’ with the IP address of the new ReporterAnalyzer server. Include single quotes around the IP address. Include a semi-colon at the end of each statement. Now issue the following statement to inform ReporterAnalyzer about the new Harvester IP address. Update agent_definitions set ReceiverAddress=inet_aton(‘5.6.7.8’); Replace ‘5.6.7.8’ with the IP address of the new Harvester. Include single quotes around the IP address. Include a semicolon at the end of the statement. Update netflow_receiver_checkpoints set IPAddr= inet_aton(‘5.6.7.8’); Once again replace ‘5.6.7.8’ with the IP address of the new Harvester. Include single quotes around the IP address. Include a semi-colon at the end of the statement. That should cover all the necessary changes, but it is a good idea to check the DSA database to make sure the correct ip addresses is there for the RA Master in the DSA database. This doesn’t always occur in the migration process if you don’t follow the step of running the RA Admin Tool after the DSA database has been copied over to the new DSA server. Once you have the DSA database copied over to that server, run this command on the DSA: mysql nqrptr select * from parameters; It should look something like the following, and the two entries you want to look for are the ‘reporterip’ and the ‘pumpIP’ entries. They need to be updated with the correct ip addresses of the RA Master. +-------------------+---------------------+ | parameter | value | +-------------------+---------------------+ | stagingRoot | D:/ | | stagingPath | NETQOS/DSA/staging/ | | interfaceCapacity | 500 | | dataRoot | D:/ | Pg. 5 | dataPath | NETQOS/mysql/data/ | | systemRoot | D:/ | | systemPath | NETQOS/DSA/system/ | | reporterip | 192.168.1.1 | | pumpIP | 192.168.1.1 | +-------------------+---------------------+ 9 rows in set (0.00 sec) To update those two entries, use this command: update parameters set value=’x.x.x.x’ where parameter=’reporterip’; (using the RA master ip) update parameters set value=’x.x.x.x’ where parameter=’pumpIP’; (also RA master ip, note that the parameter ‘pumpIP’ is case sensitive) If those two entries don’t exist, they need to be inserted with this command: insert into parameters values (‘reporterip’, ‘x.x.x.x’); insert into parameters values (‘pumpIP’, ‘x.x.x.x’); It is also a good idea to make sure that if you are now using a Super DSA on the new distributed system, that you update the interface capacity setting on the DSA database to match the new DSA. update parameters set value=’2500’ where parameter=’interfaceCapacity’; Set this value to what your new DSA interface capacity should be. START RA AND DSA Set the correct time on ReporterAnalyzer and start mySQL and all “NetQoS …” services. Verify data is pumped to the DSA’s data folder under ‘D:/NetQoS/Reporter/datashare/data/1.2.3.4’ Set the correct time on the DSA and start mySQL. Test the DSA by running startup.bat from D:/NetQoS/bin. Enable the scheduled task. COPY CUSTOM REPORT (OPTIONAL) You can optionally copy the Custom Reports CSV file from the single-box to new ReporterAnalyzer. From the new ReporterAnalyzer map a drive to single-box. Browse to D:/NetQoS/Reporter/web. Copy the ‘CSV’ folder to the corresponding location on the new RA Pg. 6 Pg. 7 Copyright 2005, NetQoS Inc. 877.835.9575 www.netqos.com