From b26aef9e8f876f299daebba6725283ccbd6d6469 Mon Sep 17 00:00:00 2001 From: RobsanInc Date: Sat, 12 Sep 2015 17:47:31 -0400 Subject: [PATCH] Added CentOS 7 installation, tweaked formatting --- doc/Extensions/RRDCached.md | 71 +++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index 27a157c5d..bbd025429 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -2,8 +2,8 @@ This document will explain how to setup RRDCached for LibreNMS. -### RRDCached installation -This example is based on a fresh LibreNMS install, on a minimimal CentOS installation. +### RRDCached installation CentOS 6 +This example is based on a fresh LibreNMS install, on a minimimal CentOS 6 installation. In this example, we'll use the Repoforge repository. ```ssh @@ -33,7 +33,72 @@ chkconfig rrdcached on service rrdcached start ``` -Edit config.php to include: +- Edit /opt/librenms/config.php to include: ```ssh $config['rrdcached'] = "unix:/var/run/rrdcached/rrdcached.sock"; ``` +### RRDCached installation CentOS 7 +This example is based on a fresh LibreNMS install, on a minimimal CentOS 7.x installation. +We'll use the epel-release and setup a RRDCached as a service. +It is recommended that you monitor your LibreNMS server with LibreNMS so you can view the disk I/O usage delta. +See [Installation (RHEL CentOS)][1] for localhost monitoring. + +- Install the EPEL and update the repos and RRDtool. +```ssh +yum install epel-release +yum update +yum update rrdtool +``` + +- Create the needed directories, set ownership and permissions. +```ssh +mkdir /var/run/rrdcached +chown librenms:librenms /var/run/rrdcached +chmod 755 /var/run/rrdcached +``` + +- Create an rrdcache service for easy daemon management. +```ssh +touch /etc/systemd/system/rrdcache.service +``` +- Edit rrdcache.service and paste the example config: +```ssh +[Unit] +Description=RRDtool Cache +After=network.service + +[Service] +Type=forking +PIDFile=/run/rrdcached.pid +ExecStart=/usr/bin/rrdcached -w 1800 -z 1800 -f 3600 -s librenms -j /var/tmp -l unix:/var/run/rrdcached/rrdcached.sock -t 4 -F -b /opt/librenms/rrd/ +RRDC_USER=librenms + +[Install] +WantedBy=default.target +``` + +- Restart the systemctl daemon so it can recognize the newly created rrdcache.service. Enable the rrdcache.service on boot, and start the service. +```ssh +systemctl daemon-reload +systemctl enable rrdcache.service +systemctl start rrdcache.service +``` + +- Edit /opt/librenms/config.php to include: +```ssh +$config['rrdcached'] = "unix:/var/run/rrdcached/rrdcached.sock"; +``` + +- Restart Apache +```ssh +systemctl restart httpd +``` + +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%. + + +[1]: http://librenms.readthedocs.org/Installation/Installation-(RHEL-CentOS)/#add-localhost +"Add localhost to LibreNMS"