Files
librenms-librenms/doc/Extensions/RRDCached.md
Zane C. Bowers-Hadley e4c9153d16 more documentation clean up (#10577)
* fix a few bare URLs

* make mdl happy

* make Weathermap.md as mdl happy as possible

* make Varnish.md as mdl happy as possible

* make Two-Factor-Auth.md mdl happy

* touch one header for Syslog.md, but little can be done about the rest

* make Sub-Directory.md as mdl happy as possible

* make SNMP-Trap-Handler.md lint happy

* make SNMP-Proxy.md mdl happy

* make Smokeping.md as mdl happy as possible

* make Services.md mdl happy

* make RRDTune.md mdl happy

* cleanup RRDCached.md as much as possible

* make RRDCached-Security.md mdl happy

* make Rancid.md as mdl happy as possible

* make Proxmox.md mdl happy

* make Plugin-System.md as mdl happy as possible

* make PeeringDB.md mdl happy

* make Oxidized.md more lint happy

* make Network-Map.md mdl happy

* make MIB-based-polling.md as mdl happy as possible

* make Metric-Storage.md mdl happy

* make IRC-Bot.md as mdl happy as possible

* make IRC-Bot-Extensions.md as mdl happy as possible

* make

* make Graylog.md mdl happy

* make Gateone.md mdl happy

* make Fast-Ping-Check.md mdl happy

* make Distributed-Poller.md as mdl happy as possible

* make Dispatcher-Service.md as mdl happy as possible

* make Device-Groups.md mdl happy

* make Dell-OpenManage.md mdl happy

* make Dashboard.md mdl happy

* make Customizing-the-Web-UI.md as mdl happy as possible

* make Component.md mdl happy

* make Billing-Module.md mdl happy

* make Auto-Discovery.md mostly mdl happy

* make Authentication.md as mdl happy as possible

* tidy up a few lines in Applications.md

* make Agent-Setup.md as mdl happy as possible

* make metrics/OpenTSDB.md mdl happy

* spelling fix
2019-09-09 12:48:35 +02:00

5.5 KiB

source: Extensions/RRDCached.md path: blob/master/doc/

Setting up RRDCached

This document will explain how to setup RRDCached for LibreNMS.

Since version 1.5, rrdtool / rrdcached now supports creating rrd files over rrdcached. If you have rrdcached 1.5.5 or above, you can also tune over rrdcached. To enable this set the following config:

$config['rrdtool_version'] = '1.5.5';

NOTE: This feature requires your client version of rrdtool to be 1.5.5 or over, in addition to your rrdcached version.

Distributed Poller Support Matrix

Shared FS: Is a shared filesystem required?

Features: Supported features in the version indicated.

          G = Graphs.
          C = Create RRD files.
          U = Update RRD files.
          T = Tune RRD files.
Version Shared FS Features
1.4.x Yes G,U
<1.5.5 Yes G,U
>=1.5.5 No G,C,U
>=1.6.x No G,C,U

It is recommended that you monitor your LibreNMS server with LibreNMS so you can view the disk I/O usage delta.

RRDCached installation CentOS 7

1: Create /etc/systemd/system/rrdcached.service with this content:

[Unit]
Description=Data caching daemon for rrdtool
After=network.service

[Service]
Type=forking
PIDFile=/run/rrdcached.pid
ExecStart=/usr/bin/rrdcached -w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l unix:/run/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/

[Install]
WantedBy=default.target

2: Start rrdcached

systemctl enable --now rrdcached.service

3: Edit /opt/librenms/config.php to include:

$config['rrdcached'] = "unix:/run/rrdcached.sock";

RRDCached installation Ubuntu 16

1: Install rrdcached

sudo apt-get install rrdcached

2: Edit /etc/default/rrdcached to include:

DAEMON=/usr/bin/rrdcached
DAEMON_USER=librenms
DAEMON_GROUP=librenms
WRITE_THREADS=4
WRITE_TIMEOUT=1800
WRITE_JITTER=1800
BASE_PATH=/opt/librenms/rrd/
JOURNAL_PATH=/var/lib/rrdcached/journal/
PIDFILE=/run/rrdcached.pid
SOCKFILE=/run/rrdcached.sock
SOCKGROUP=librenms
BASE_OPTIONS="-B -F -R"

2: Fix permissions

chown librenms:librenms /var/lib/rrdcached/journal/

3: Restart the rrdcached service

systemctl restart rrdcached.service

5: Edit /opt/librenms/config.php to include:

$config['rrdcached'] = "unix:/var/run/rrdcached.sock";

RRDCached installation Debian Jessie (rrdcached 1.4.8)

1: Install rrdcached

sudo apt-get install rrdcached

2: Edit /etc/default/rrdcached to include:

OPTS="-s librenms"
OPTS="$OPTS -l unix:/var/run/rrdcached.sock"
OPTS="$OPTS -j /var/lib/rrdcached/journal/ -F"
OPTS="$OPTS -b /opt/librenms/rrd/ -B"
OPTS="$OPTS -w 1800 -z 1800 -f 3600 -t 4"

3: Restart the rrdcached service

    systemctl restart rrdcached.service

4: Edit /opt/librenms/config.php to include:

$config['rrdcached'] = "unix:/var/run/rrdcached.sock";

RRDCached installation Debian Stretch (rrdcached 1.6.0)

1: Install rrdcached

sudo apt-get install rrdcached

2; Edit /etc/default/rrdcached to include:

DAEMON=/usr/bin/rrdcached
WRITE_TIMEOUT=1800
WRITE_JITTER=1800
WRITE_THREADS=4
BASE_PATH=/opt/librenms/rrd/
JOURNAL_PATH=/var/lib/rrdcached/journal/
PIDFILE=/var/run/rrdcached.pid
SOCKFILE=/var/run/rrdcached.sock
SOCKGROUP=librenms
DAEMON_GROUP=librenms
DAEMON_USER=librenms
BASE_OPTIONS="-B -F -R"

3: Fix permissions

chown librenms:librenms /var/lib/rrdcached/journal/

4: Restart the rrdcached service

    systemctl restart rrdcached.service

5: Edit /opt/librenms/config.php to include:

For local RRDCached server

$config['rrdcached'] = "unix:/var/run/rrdcached.sock";

For remote RRDCached server make sure you have network option in /var/default/rrdcached

NETWORK_OPTIONS="-L"
$config['rrdcached'] = "IPADDRESS:42217";

NOTE: change IPADDRESS to the ip the rrdcached server is listening on.

RRDCached installation CentOS 6

This example is based on a fresh LibreNMS install, on a minimal CentOS 6 installation. In this example, we'll use the Repoforge repository.

rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
vi /etc/yum.repos.d/rpmforge.repo
  • Enable the Extra repo
yum update rrdtool
vi /etc/yum.repos.d/rpmforge.repo
  • Disable the [rpmforge] and [rpmforge-extras] repos again
vi /etc/sysconfig/rrdcached

# Settings for rrdcached
OPTIONS="-w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -B -R -j /var/tmp -l unix:/var/run/rrdcached/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/"
RRDC_USER=librenms

mkdir /var/run/rrdcached
chown librenms:librenms /var/run/rrdcached/
chown librenms:librenms /var/rrdtool/
chown librenms:librenms /var/rrdtool/rrdcached/
chkconfig rrdcached on
service rrdcached start
  • Edit /opt/librenms/config.php to include:
$config['rrdcached']    = "unix:/var/run/rrdcached/rrdcached.sock";

Verify

Check to see if the graphs are being drawn in LibreNMS. This might take a few minutes. After at least one poll cycle (5 mins), check the LibreNMS disk I/O performance delta. Disk I/O can be found under the menu Devices>All Devices>[localhost hostname]>Health>Disk I/O.

Depending on many factors, you should see the Ops/sec drop by ~30-40%.

Securing RRCached

Please see RRDCached Security