From f3043fe7df24dd3cf94900ed076ccedbbbd719f5 Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Fri, 1 May 2020 13:41:26 +0200 Subject: [PATCH 01/10] update RRDCached Documentation - socket fix --- doc/Extensions/RRDCached.md | 192 +++++++++++++++++++++++++----------- 1 file changed, 132 insertions(+), 60 deletions(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index a7f9c1f7fa..9d5ba12555 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -39,35 +39,17 @@ Features: Supported features in the version indicated. 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: +# Installation Manual for -``` -[Unit] -Description=Data caching daemon for rrdtool -After=network.service +1. [RRDCached installation Ubuntu 16](## RRDCached installation Ubuntu 16) +1. [RRDCached installation Debian Buster](## RRDCached installation Debian Buster) +1. [RRDCached installation Debian Stretch](## RRDCached installation Debian Stretch) +1. [RRDCached installation Debian Jessie](## RRDCached installation Debian Jessie) +1. [RRDCached installation CentOS 7](## RRDCached installation CentOS 7) +1. [RRDCached installation CentOS 6](## RRDCached installation CentOS 6) +1. [Securing RRCached](# Securing RRCached) -[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 - -```bash -systemctl enable --now rrdcached.service -``` - -3: Edit `/opt/librenms/config.php` to include: - -```php -$config['rrdcached'] = "unix:/run/rrdcached.sock"; -``` ## RRDCached installation Ubuntu 16 @@ -89,7 +71,7 @@ WRITE_JITTER=1800 BASE_PATH=/opt/librenms/rrd/ JOURNAL_PATH=/var/lib/rrdcached/journal/ PIDFILE=/run/rrdcached.pid -SOCKFILE=/run/rrdcached.sock +SOCKFILE=/var/run/rrdcached.sock SOCKGROUP=librenms BASE_OPTIONS="-B -F -R" ``` @@ -109,40 +91,11 @@ systemctl restart rrdcached.service 5: Edit `/opt/librenms/config.php` to include: ```php -$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; +$config['rrdcached'] = "unix:///var/run/rrdcached.sock"; ``` -## RRDCached installation Debian Jessie (rrdcached 1.4.8) - -1: Install rrdcached - -```bash -sudo apt-get install rrdcached -``` - -2: Edit /etc/default/rrdcached to include: - -```bash -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 - -```bash - systemctl restart rrdcached.service -``` - -4: Edit /opt/librenms/config.php to include: - -```php -$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; -``` - -## RRDCached installation Debian Stretch (rrdcached 1.6.0) +## RRDCached installation Debian Buster +(rrdcached 1.7.1) 1: Install rrdcached @@ -184,7 +137,7 @@ chown librenms:librenms /var/lib/rrdcached/journal/ For local RRDCached server ```php -$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; +$config['rrdcached'] = "unix:///var/run/rrdcached.sock"; ``` For remote RRDCached server make sure you have network option in /var/default/rrdcached @@ -199,6 +152,125 @@ $config['rrdcached'] = "IPADDRESS:42217"; NOTE: change IPADDRESS to the ip the rrdcached server is listening on. +## RRDCached installation Debian Stretch +(rrdcached 1.6.0) + +1: Install rrdcached + +```bash +sudo apt-get install rrdcached +``` + +2; Edit /etc/default/rrdcached to include: + +```bash +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 + +```bash +chown librenms:librenms /var/lib/rrdcached/journal/ +``` + +4: Restart the rrdcached service + +```bash + systemctl restart rrdcached.service +``` + +5: Edit /opt/librenms/config.php to include: + +For local RRDCached server + +```php +$config['rrdcached'] = "unix:///var/run/rrdcached.sock"; +``` + +For remote RRDCached server make sure you have network option in /var/default/rrdcached + +```bash +NETWORK_OPTIONS="-L" +``` + +```php +$config['rrdcached'] = "IPADDRESS:42217"; +``` + +NOTE: change IPADDRESS to the ip the rrdcached server is listening on. + +## RRDCached installation Debian Jessie +(rrdcached 1.4.8) + +1: Install rrdcached + +```bash +sudo apt-get install rrdcached +``` + +2: Edit /etc/default/rrdcached to include: + +```bash +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 + +```bash + systemctl restart rrdcached.service +``` + +4: Edit /opt/librenms/config.php to include: + +```php +$config['rrdcached'] = "unix:///var/run/rrdcached.sock"; +``` + +## 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 + +```bash +systemctl enable --now rrdcached.service +``` + +3: Edit `/opt/librenms/config.php` to include: + +```php +$config['rrdcached'] = "unix:/run/rrdcached.sock"; +``` + ## RRDCached installation CentOS 6 This example is based on a fresh LibreNMS install, on a minimal CentOS 6 installation. From 75e4b63a51a8c2e59db0229898ebddd18cb2a273 Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Fri, 1 May 2020 13:48:25 +0200 Subject: [PATCH 02/10] remove spaces --- doc/Extensions/RRDCached.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index 9d5ba12555..ca78d2316e 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -42,12 +42,12 @@ so you can view the disk I/O usage delta. # Installation Manual for -1. [RRDCached installation Ubuntu 16](## RRDCached installation Ubuntu 16) -1. [RRDCached installation Debian Buster](## RRDCached installation Debian Buster) -1. [RRDCached installation Debian Stretch](## RRDCached installation Debian Stretch) -1. [RRDCached installation Debian Jessie](## RRDCached installation Debian Jessie) -1. [RRDCached installation CentOS 7](## RRDCached installation CentOS 7) -1. [RRDCached installation CentOS 6](## RRDCached installation CentOS 6) +1. [RRDCached installation Ubuntu 16](## RRDCached-installation-Ubuntu-16) +1. [RRDCached installation Debian Buster](## RRDCached-installation-Debian-Buster) +1. [RRDCached installation Debian Stretch](## RRDCached-installation Debian-Stretch) +1. [RRDCached installation Debian Jessie](## RRDCached-installation-Debian-Jessie) +1. [RRDCached installation CentOS 7](## RRDCached-installation-CentOS-7) +1. [RRDCached installation CentOS 6](## RRDCached-installation-CentOS-6) 1. [Securing RRCached](# Securing RRCached) From f83bdbf9affd2f1c9ee1b36a1926b6422c2db7d9 Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Fri, 1 May 2020 13:50:01 +0200 Subject: [PATCH 03/10] remove spaces --- doc/Extensions/RRDCached.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index ca78d2316e..d9d571b70e 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -42,13 +42,13 @@ so you can view the disk I/O usage delta. # Installation Manual for -1. [RRDCached installation Ubuntu 16](## RRDCached-installation-Ubuntu-16) -1. [RRDCached installation Debian Buster](## RRDCached-installation-Debian-Buster) -1. [RRDCached installation Debian Stretch](## RRDCached-installation Debian-Stretch) -1. [RRDCached installation Debian Jessie](## RRDCached-installation-Debian-Jessie) -1. [RRDCached installation CentOS 7](## RRDCached-installation-CentOS-7) -1. [RRDCached installation CentOS 6](## RRDCached-installation-CentOS-6) -1. [Securing RRCached](# Securing RRCached) +1. [RRDCached installation Ubuntu 16](##RRDCached-installation-Ubuntu-16) +1. [RRDCached installation Debian Buster](##RRDCached-installation-Debian-Buster) +1. [RRDCached installation Debian Stretch](##RRDCached-installation Debian-Stretch) +1. [RRDCached installation Debian Jessie](##RRDCached-installation-Debian-Jessie) +1. [RRDCached installation CentOS 7](##RRDCached-installation-CentOS-7) +1. [RRDCached installation CentOS 6](##RRDCached-installation-CentOS-6) +1. [Securing RRCached](#Securing-RRCached) ## RRDCached installation Ubuntu 16 From 4173c75b1c6a073f12e31ff30f04c6ad1af9a1b4 Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Fri, 1 May 2020 13:50:55 +0200 Subject: [PATCH 04/10] remove spaces --- doc/Extensions/RRDCached.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index d9d571b70e..982e68e8a3 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -44,7 +44,7 @@ so you can view the disk I/O usage delta. 1. [RRDCached installation Ubuntu 16](##RRDCached-installation-Ubuntu-16) 1. [RRDCached installation Debian Buster](##RRDCached-installation-Debian-Buster) -1. [RRDCached installation Debian Stretch](##RRDCached-installation Debian-Stretch) +1. [RRDCached installation Debian Stretch](##RRDCached-installation-Debian-Stretch) 1. [RRDCached installation Debian Jessie](##RRDCached-installation-Debian-Jessie) 1. [RRDCached installation CentOS 7](##RRDCached-installation-CentOS-7) 1. [RRDCached installation CentOS 6](##RRDCached-installation-CentOS-6) From ed580b0f6bf493dcd5ad016f4032c2b17544f456 Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Fri, 1 May 2020 13:52:40 +0200 Subject: [PATCH 05/10] . --- doc/Extensions/RRDCached.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index 982e68e8a3..6a9dfe3d43 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -42,12 +42,12 @@ so you can view the disk I/O usage delta. # Installation Manual for -1. [RRDCached installation Ubuntu 16](##RRDCached-installation-Ubuntu-16) -1. [RRDCached installation Debian Buster](##RRDCached-installation-Debian-Buster) -1. [RRDCached installation Debian Stretch](##RRDCached-installation-Debian-Stretch) -1. [RRDCached installation Debian Jessie](##RRDCached-installation-Debian-Jessie) -1. [RRDCached installation CentOS 7](##RRDCached-installation-CentOS-7) -1. [RRDCached installation CentOS 6](##RRDCached-installation-CentOS-6) +1. [RRDCached installation Ubuntu 16](#RRDCached-installation-Ubuntu-16) +1. [RRDCached installation Debian Buster](#RRDCached-installation-Debian-Buster) +1. [RRDCached installation Debian Stretch](#RRDCached-installation-Debian-Stretch) +1. [RRDCached installation Debian Jessie](#RRDCached-installation-Debian-Jessie) +1. [RRDCached installation CentOS 7](#RRDCached-installation-CentOS-7) +1. [RRDCached installation CentOS 6](#RRDCached-installation-CentOS-6) 1. [Securing RRCached](#Securing-RRCached) From 784ca04314b6fc11d81e89122ea9e6953ba5a868 Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Fri, 1 May 2020 16:32:20 +0200 Subject: [PATCH 06/10] . --- doc/Extensions/RRDCached.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index 6a9dfe3d43..ad07c9f4c8 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -91,7 +91,7 @@ systemctl restart rrdcached.service 5: Edit `/opt/librenms/config.php` to include: ```php -$config['rrdcached'] = "unix:///var/run/rrdcached.sock"; +$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; ``` ## RRDCached installation Debian Buster @@ -137,7 +137,7 @@ chown librenms:librenms /var/lib/rrdcached/journal/ For local RRDCached server ```php -$config['rrdcached'] = "unix:///var/run/rrdcached.sock"; +$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; ``` For remote RRDCached server make sure you have network option in /var/default/rrdcached @@ -195,7 +195,7 @@ chown librenms:librenms /var/lib/rrdcached/journal/ For local RRDCached server ```php -$config['rrdcached'] = "unix:///var/run/rrdcached.sock"; +$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; ``` For remote RRDCached server make sure you have network option in /var/default/rrdcached @@ -238,7 +238,7 @@ OPTS="$OPTS -w 1800 -z 1800 -f 3600 -t 4" 4: Edit /opt/librenms/config.php to include: ```php -$config['rrdcached'] = "unix:///var/run/rrdcached.sock"; +$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; ``` ## RRDCached installation CentOS 7 From b0f75da05d20b4653db5278175b9114d9f405d20 Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Mon, 18 May 2020 22:17:38 +0200 Subject: [PATCH 07/10] path fix --- doc/Extensions/RRDCached.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index ad07c9f4c8..a8da99ab9a 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -71,7 +71,7 @@ WRITE_JITTER=1800 BASE_PATH=/opt/librenms/rrd/ JOURNAL_PATH=/var/lib/rrdcached/journal/ PIDFILE=/run/rrdcached.pid -SOCKFILE=/var/run/rrdcached.sock +SOCKFILE=/run/rrdcached.sock SOCKGROUP=librenms BASE_OPTIONS="-B -F -R" ``` From 09c69056c9f9878eb3b3880d9d201c165d7fb3cc Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Mon, 18 May 2020 22:21:01 +0200 Subject: [PATCH 08/10] user mode --- doc/Extensions/RRDCached.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index a8da99ab9a..55c6e44769 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -226,7 +226,7 @@ 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" +OPTS="$OPTS -w 1800 -z 1800 -f 3600 -t 4 -U librenms -G librenms" ``` 3: Restart the rrdcached service From 2d31e9583a8567b41d6a7bdb8b44ca1aa4c703db Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Mon, 18 May 2020 22:42:42 +0200 Subject: [PATCH 09/10] remove Debian Jessi howto --- doc/Extensions/RRDCached.md | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index 55c6e44769..55f0d2ee4d 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -45,7 +45,6 @@ so you can view the disk I/O usage delta. 1. [RRDCached installation Ubuntu 16](#RRDCached-installation-Ubuntu-16) 1. [RRDCached installation Debian Buster](#RRDCached-installation-Debian-Buster) 1. [RRDCached installation Debian Stretch](#RRDCached-installation-Debian-Stretch) -1. [RRDCached installation Debian Jessie](#RRDCached-installation-Debian-Jessie) 1. [RRDCached installation CentOS 7](#RRDCached-installation-CentOS-7) 1. [RRDCached installation CentOS 6](#RRDCached-installation-CentOS-6) 1. [Securing RRCached](#Securing-RRCached) @@ -210,37 +209,6 @@ $config['rrdcached'] = "IPADDRESS:42217"; NOTE: change IPADDRESS to the ip the rrdcached server is listening on. -## RRDCached installation Debian Jessie -(rrdcached 1.4.8) - -1: Install rrdcached - -```bash -sudo apt-get install rrdcached -``` - -2: Edit /etc/default/rrdcached to include: - -```bash -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 -U librenms -G librenms" -``` - -3: Restart the rrdcached service - -```bash - systemctl restart rrdcached.service -``` - -4: Edit /opt/librenms/config.php to include: - -```php -$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; -``` - ## RRDCached installation CentOS 7 1: Create `/etc/systemd/system/rrdcached.service` with this content: From f5d537ff18d58fcb7aa561962c0c44475fac05d4 Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Mon, 18 May 2020 22:50:26 +0200 Subject: [PATCH 10/10] equalize socket location --- doc/Extensions/RRDCached.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/Extensions/RRDCached.md b/doc/Extensions/RRDCached.md index 55f0d2ee4d..b91885968c 100644 --- a/doc/Extensions/RRDCached.md +++ b/doc/Extensions/RRDCached.md @@ -90,7 +90,7 @@ systemctl restart rrdcached.service 5: Edit `/opt/librenms/config.php` to include: ```php -$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; +$config['rrdcached'] = "unix:/run/rrdcached.sock"; ``` ## RRDCached installation Debian Buster @@ -112,7 +112,7 @@ WRITE_THREADS=4 BASE_PATH=/opt/librenms/rrd/ JOURNAL_PATH=/var/lib/rrdcached/journal/ PIDFILE=/var/run/rrdcached.pid -SOCKFILE=/var/run/rrdcached.sock +SOCKFILE=/run/rrdcached.sock SOCKGROUP=librenms DAEMON_GROUP=librenms DAEMON_USER=librenms @@ -136,7 +136,7 @@ chown librenms:librenms /var/lib/rrdcached/journal/ For local RRDCached server ```php -$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; +$config['rrdcached'] = "unix:/run/rrdcached.sock"; ``` For remote RRDCached server make sure you have network option in /var/default/rrdcached @@ -170,7 +170,7 @@ WRITE_THREADS=4 BASE_PATH=/opt/librenms/rrd/ JOURNAL_PATH=/var/lib/rrdcached/journal/ PIDFILE=/var/run/rrdcached.pid -SOCKFILE=/var/run/rrdcached.sock +SOCKFILE=/run/rrdcached.sock SOCKGROUP=librenms DAEMON_GROUP=librenms DAEMON_USER=librenms @@ -194,7 +194,7 @@ chown librenms:librenms /var/lib/rrdcached/journal/ For local RRDCached server ```php -$config['rrdcached'] = "unix:/var/run/rrdcached.sock"; +$config['rrdcached'] = "unix:/run/rrdcached.sock"; ``` For remote RRDCached server make sure you have network option in /var/default/rrdcached @@ -262,7 +262,7 @@ vi /etc/yum.repos.d/rpmforge.repo 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/" +OPTIONS="-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/" RRDC_USER=librenms mkdir /var/run/rrdcached @@ -276,7 +276,7 @@ service rrdcached start - Edit /opt/librenms/config.php to include: ```php -$config['rrdcached'] = "unix:/var/run/rrdcached/rrdcached.sock"; +$config['rrdcached'] = "unix:/run/rrdcached.sock"; ``` # Verify