= RRDtool
:description: Install and configure RRDtool for OpenNMS on RHEL, Centos, and Debian.

Many open source applications use link:http://oss.oetiker.ch/rrdtool[RRDtool], which is the de-facto open standard for time series data.
This section describes how to install RRDtool and how to configure your {page-component-title} Core instance to use it.

Configurations must in the `etc` directory relative to the {page-component-title} Core home directory.
Depending on your operating system, the home directory is `/opt/opennms` for Debian/Ubuntu and for CentOS/RHEL.

[{tabs}]
====
CentOS/RHEL 8::
+
--
.Enable the OpenNMS repository and install rrdtool and jrrd2
[source, console]
----
sudo dnf config-manager --enable opennms-repo-stable-*
sudo dnf -y install rrdtool jrrd2
----

.Create a configuration file with the time series database settings
[source, console]
----
sudo vi etc/opennms.properties.d/timeseries.properties
----

[source, properties]
----
org.opennms.rrd.strategyClass=org.opennms.netmgt.rrd.rrdtool.MultithreadedJniRrdStrategy<1>
org.opennms.rrd.interfaceJar=/usr/share/java/jrrd2.jar<2>
opennms.library.jrrd2=/usr/lib64/libjrrd2.so<3>
org.opennms.web.graphs.engine=rrdtool<4>
rrd.binary=/usr/bin/rrdtool<5>
----

<1> Set JNI RRD strategy class.
<2> Use the internal JRRD library.
<3> Use the JRRD library to interface with RRDtool.
<4> This is optional; use RRDtool to render graphs.
If unset, keep Backshift as default.
<5> Path to the RRDtool binary file.

TIP: If your RRDtool binary is not in `/usr/bin/rrdtool`, adjust the path in the following files: +
     `response-adhoc-graph.properties`, +
     `response-graph.properties`, +
     `snmp-adhoc-graph.properties`, +
     `snmp-graph.properties`.

.Restart the {page-component-title} Core instance to apply the configuration
[source, console]
----
sudo systemctl restart opennms
----

.Verify that RRD files get created
[source, console]
----
find /opt/opennms/share/rrd -iname "*.rrd"
----

NOTE: The first data collection creates RRDtool files with extension `.rrd`.
      You must delete them manually.
--

CentOS/RHEL 7::
+
--
.Enable the OpenNMS repository and install rrdtool and jrrd2
[source, console]
----
sudo yum-config-manager --enable opennms-repo-stable-*
sudo yum -y install rrdtool jrrd2
----

.Create a configuration file with the time series database settings
[source, console]
----
sudo vi etc/opennms.properties.d/timeseries.properties
----

[source, properties]
----
org.opennms.rrd.strategyClass=org.opennms.netmgt.rrd.rrdtool.MultithreadedJniRrdStrategy<1>
org.opennms.rrd.interfaceJar=/usr/share/java/jrrd2.jar<2>
opennms.library.jrrd2=/usr/lib64/libjrrd2.so<3>
org.opennms.web.graphs.engine=rrdtool<4>
rrd.binary=/usr/bin/rrdtool<5>
----

<1> Set JNI RRD strategy class.
<2> Use the internal JRRD library.
<3> Use the JRRD library to interface with RRDtool.
<4> This is optional; use RRDtool to render graphs.
If unset, keep Backshift as default.
<5> Path to the RRDtool binary file.

TIP: If your RRDtool binary is not in `/usr/bin/rrdtool`, adjust the path in the following files: +
     `response-adhoc-graph.properties`, +
     `response-graph.properties`, +
     `snmp-adhoc-graph.properties`, +
     `snmp-graph.properties`.

.Restart the {page-component-title} Core instance to apply the configuration
[source, console]
----
sudo systemctl restart opennms
----

.Verify that RRD files get created
[source, console]
----
find /opt/opennms/share/rrd -iname "*.rrd"
----

NOTE: The first data collection creates RRDtool files with extension `.rrd`.
      You must delete them manually.
--

Debian/Ubuntu::
+
--
.Install rrdtool and jrrd2
[source, console]
----
apt -y install rrdtool jrrd2
----

.Create a configuration file with the time series database settings
[source, console]
----
sudo vi etc/opennms.properties.d/timeseries.properties
----

[source, properties]
----
org.opennms.rrd.strategyClass=org.opennms.netmgt.rrd.rrdtool.MultithreadedJniRrdStrategy<1>
org.opennms.rrd.interfaceJar=/usr/share/java/jrrd2.jar<2>
opennms.library.jrrd2=/usr/lib/jni/libjrrd2.so<3>
org.opennms.web.graphs.engine=rrdtool<4>
rrd.binary=/usr/bin/rrdtool<5>
----

<1> Set JNI RRD strategy class.
<2> Use the internal JRRD library.
<3> Use the JRRD library to interface with RRDtool.
<4> This is optional; use RRDtool to render graphs.
If unset, keep Backshift as default
<5> Path to the RRDtool binary file.

TIP: If your RRDtool binary is not in `/usr/bin/rrdtool`, adjust the path in the following files: +
     `response-adhoc-graph.properties`, +
     `response-graph.properties`, +
     `snmp-adhoc-graph.properties`, +
     `snmp-graph.properties`.

.Restart the {page-component-title} Core instance to apply the configuration
[source, console]
----
sudo systemctl restart opennms
----

.Verify that RRD files get created
[source, console]
----
find /opt/opennms/share/rrd -iname "*.rrd"
----

NOTE: The first data collection creates RRDtool files with extension `.rrd`.
      You must delete them manually.
--

====

== Converting JRobin data to RRDTool data

JRobin, the pure-Java RRD implementation has been removed. In order to convert existing JRobin `.jrb` files to RRDTool `.rrd` files you can use the
JRobin to RRDtool Converter. Refer to https://github.com/opennms-forge/jrobin-to-rrdtool-converter for detailed information on how to download, build and use the utility.

