I followed the instructions from the LibreNMS Docs Page:
https://docs.librenms.org/#Extensions/RRDCached/
When I get to the point of restarting rrdcached.service, it gives:
“Job for rrdcached.service failed because the control process exited with error code. See “systemctl status rrdcached.service” and “journalctl -xe” for details.”
I enter - systemctl status rrdcached.service and it gives:
root@LibreNMS:~# systemctl status rrdcached.service
● rrdcached.service - LSB: start or stop rrdcached
Loaded: loaded (/etc/init.d/rrdcached; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-03-07 15:09:45 PST; 4min 57s ago
Docs: man:systemd-sysv-generator(8)
Mar 07 15:09:45 LibreNMS rrdcached[1698]: [63B blob data]
Mar 07 15:09:45 LibreNMS rrdcached[1698]: [63B blob data]
Mar 07 15:09:45 LibreNMS rrdcached[1698]: [63B blob data]
Mar 07 15:09:45 LibreNMS rrdcached[1698]: [63B blob data]
Mar 07 15:09:45 LibreNMS rrdcached[1698]: [87B blob data]
Mar 07 15:09:45 LibreNMS rrdcached[1698]: * rrdcached FAILED
Mar 07 15:09:45 LibreNMS systemd[1]: rrdcached.service: Control process exited, code=exited status=2
Mar 07 15:09:45 LibreNMS systemd[1]: Failed to start LSB: start or stop rrdcached.
Mar 07 15:09:45 LibreNMS systemd[1]: rrdcached.service: Unit entered failed state.
Mar 07 15:09:45 LibreNMS systemd[1]: rrdcached.service: Failed with result ‘exit-code’.
root@LibreNMS:~#
As a test, I commented all of the config file entries. Service started successfully. So, it would seem a problem in the config file? Not sure what. I copy and pasted from the webpage so I wouldn’t think there is a typo.
These are the instructions I followed (seems pretty straightforward):
RRDCached installation Ubuntu 16
Install rrdcached
sudo apt-get install rrdcached
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"
Fix permissions
chown librenms:librenms /var/lib/rrdcached/journal/
Restart the rrdcached service
systemctl restart rrdcached.service
Edit /opt/librenms/config.php to include:
$config[‘rrdcached’] = “unix:/var/run/rrdcached.sock”;
This is my config file contents: (Not sure how to get the page to display a # and not large bold print
/etc/default file for RRD cache daemon
Full path to daemon
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"
Optional override flush interval, in seconds.
#WRITE_TIMEOUT=300
Optional override maximum write delay, in seconds.
#WRITE_JITTER=0
Optional override number of write_threads
#WRITE_THREADS=4
Where database files are placed. If left unset, the default /tmp will
be used. NB: The daemon will reject a directory that has symlinks as
components. NB: You may want to have -B in BASE_OPTS.
#BASE_PATH=/var/lib/rrdcached/db/
Where journal files are placed. If left unset, journaling will
be disabled.
#JOURNAL_PATH=/var/lib/rrdcached/journal/
FHS standard placement for process ID file.
#PIDFILE=/var/run/rrdcached.pid
FHS standard placement for local control socket.
#SOCKFILE=/var/run/rrdcached.sock
Optional override group that should own/access the local control
socket
#SOCKGROUP=root
Optional override access mode of local control socket.
SOCKMODE=0660
Optional unprivileged group to run under when daemon. If unset
retains invocation group privileges.
#DAEMON_GROUP=_rrdcached
Optional unprivileged user to run under when daemon. If unset
retains invocation user privileges.
#DAEMON_USER=_rrdcached
Network socket address requests. Use in conjunction with SOCKFILE to
also listen on INET domain sockets. The option is a lower-case ell
ASCII 108 = 0x6c, and should be repeated for each address. The
parameter is an optional IP address, followed by an optional port with
a colon separating it from the address. The empty string is
interpreted as "open sockets on the default port on all available
interfaces", but generally does not pass through init script functions
so use -L with no parameters for that configuration.
#NETWORK_OPTIONS="-L"
Any other options not specifically supported by the script (-P, -f,
-F, -B).
#BASE_OPTIONS="-B"