Use this utility to migrate existing RRDTool- or JRobin-based data to a Newts cluster.
The migration process traverses the share/rrd
directory and its subdirectories, reads the data and properties files, and persists this data to Newts.
The following suggestions try to minimize the data collection gap that occurs when reconfiguring {page-component-title} for a different storage strategy. First, we determine the parameters needed for migration of the existing data. After that, we reconfigure {page-component-title} to persist all new collected data to Newts storage. Finally, we convert and persist the Rrd- or JRobin-based data to Newts using the newts-repository-converter utility.
-
Working {page-component-title} installation with RRDTool- or JRobin-based storage strategy configured.
-
Installed and working Newts cluster reachable by the {page-component-title} instance.
-
Check and write down the values for the following options in your
opennms.properties
file. You need this information later to invoke the newts-repository-converter utility.-
File
etc/opennms.properties
:-
In
org.opennms.rrd.storeByGroup
, check ifstoreByGroup
is enabled. -
In
rrd.base.dir
, check for the location where RRD or JRB files are stored. -
In
rrd.binary
, check for the location of the RRDTool binary.
-
-
File
etc/rrd-configuration.properties
:-
In
org.opennms.rrd.strategyClass
, check ifJRobinRrdStrategy
(JRobin) orJniRrdStrategy
/MultithreadedJniRrdStrategy
(RRDTool) is used.
-
-
-
Stop your {page-component-title} instance.
-
Reconfigure {page-component-title} to persist data to Newts, so that when correctly configured all new samples will be persisted into Newts after {page-component-title} starts. Note that the converter assumes
storeByForeignSource
to be enabled. -
Start your {page-component-title} instance.
-
Use the newts-repository-converter utility to convert the existing data to Newts by specifying the options that correspond to the information gathered during step #1.
This procedure will minimize the data collection gap to the time needed to reconfigure {page-component-title} for Newts storage.
Important
|
The newts_converter utility needs the path to the base directory of your {page-component-title} instance to read the configuration files. For example, the utility needs the datasource configuration during the migration process to query the database to look up node data. |
The utility is installed by default and its wrapper script is located in the ${OPENNMS_HOME}/bin
directory.
$ cd /path/to/opennms/bin
$ ./newts-repository-converter
Tip
|
When invoked without parameters the usage and help information is printed. |
The newts-repository-converter tool provides the following options and parameters:
Short-option | Long-option | Description | Default |
---|---|---|---|
|
|
Prints help and usage. information |
false |
|
|
{page-component-title} home directory |
/opt/opennms |
|
|
The path to the RRD data |
ONMS-HOME/share/rrd |
|
|
Whether to use RRDtool or JRobin. |
|
|
|
The binary path to the rrdtool command (used only if rrd-tool is set). |
/usr/bin/rrdtool |
|
|
Whether store by group was enabled. |
|
|
|
Number of conversion threads |
defaults to number of CPUs |
The following example shows how to convert RRDTool-based data that was stored with storeByGroup
enabled.
The {page-component-title} home is /opt/opennms
, the data directory is /opt/opennms/share/rrd
, and the RRDTool binary located at /usr/local/bin/rrdtool
.
This program call uses 16 concurrent threads to convert the RRD files.
$ ./newts-repository-converter -t true -s true -T /usr/local/bin/rrdtool -n 16
<output omitted>
The following example shows how to convert JRobin-based data located in the directory /mnt/opennms/rrd
that was collected with storeByGroup
disabled.
This program call uses eight concurrent threads to convert the JRB files.
$ ./newts-repository-converter -t false -s false -r /mnt/opennms/rrd -n 8
<output omitted>