Rrdcached remote functionality

Component Version
LibreNMS 1.46-40-g8bddfe722
DB Schema 273
PHP 7.2.10-0ubuntu0.18.04.1
MySQL 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

hello ,

according to “Setting up RRDCached” article rrdcached supports creating rrd files over rrdcached. i did every single step on “Distributed Poller” article but i could not manage get rrd graphs running. it always gives me “error drawing graph” error.

if i choose/add nfs server-client method to my servers everything goes back to normal.
but article says sharing file system is not required anymore!! i dont get it :blush:

here is my config

rrd server ( libre is not installed - memcached and rrdcached installed )
DAEMON=/usr/bin/rrdcached
DAEMON_USER=librenms
DAEMON_GROUP=librenms
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
NETWORK_OPTIONS="-L"
BASE_OPTIONS="-B -F -R"

POLLER SERVER (libre installed)
$config[‘distributed_poller_name’] = php_uname(‘n’);
$config[‘distributed_poller_group’] = ‘0’;
$config[‘distributed_poller_memcached_host’] = “192.168.1.97”;
$config[‘distributed_poller_memcached_port’] = 11211;
$config[‘distributed_poller’] = true;
$config[‘rrdtool_version’] = ‘1.7.0’;
$config[‘rrdcached’] = “192.168.1.97:42217”;
$config[‘update’] = 0;

WEB SERVER ( libre is installed )

$config[‘distributed_poller’] = true;
$config[‘rrdtool_version’] = ‘1.7.0’;
$config[‘rrdcached’] = “192.168.1.97:42217”;
$config[‘distributed_poller_memcached_host’] = “192.168.1.97”;
$config[‘distributed_poller_memcached_port’] = 11211;

hello again ,
can someone please answer if NFS is required for distrubuted polling scenario?
if its not required how do i make my web and polling server read & write rrd files from my remote rrd server.

i am new to libre and rrd system sorry. thanks in advance.

well , since no one is care to answer , let me answer my own question.
i reinstalled and reconfigured the server the above configuration actually is working now.
thanks to me.

Hi, I have to cope with the same environment. I have a web server and a rrdstorage server with memcached and rrdcached. Let me ask you that if just adding distributed poller configuration of the docs and without using NFS, it works? I will be very grateful if you could answer.

Hi ,

yes it works. i got 6 poller server , db and rrd on the same server and the application server.

Right now, I have a web server, db server and a rrstorage server configured.

Web server (librnems installed): 172.20.10.71
./validate.php

./validate.php -g distributedpoller

It seems all connections are working. However I am not using NFS since with rrdtool 1.7.0 it should work.

This is my config.php file:

Database config

$config[‘db_host’] = ‘db_host’;
$config[‘db_port’] = ‘3306’;
$config[‘db_user’] = ‘librenms’;
$config[‘db_pass’] = ‘pasword’;
$config[‘db_name’] = ‘librenms’;
$config[‘db_socket’] = ‘’;

// This is the user LibreNMS will run as
//Please ensure this user is created and has the correct permissions to your ins tall
$config[‘user’] = ‘librenms’;

Locations - it is recommended to keep the default

#$config[‘install_dir’] = “/opt/librenms”;

This should only be set if you want to force a particular hostname/port

It will prevent the web interface being usable form any other hostname

#$config[‘base_url’] = “http://librenms.company.com”;

Authentication Model

$config[‘auth_mechanism’] = “mysql”; # default, other options: ldap, http-auth
#$config[‘http_auth_guest’] = “guest”; # remember to configure this user if you use http-auth

Default community

$config[‘snmp’][‘community’] = array(“community”);

#SERVICES
$config[‘show_services’] = 1;
$config[‘nagios_plugins’] = “/usr/lib/nagios/plugins”;

Enable the in-built billing extension

$config[‘enable_billing’] = 1;

#PING
$config[‘fping’] = “/usr/bin/fping”;
$config[‘fping6’] = “fping6”;

#Distributed pollers
$config[‘distributed_poller’]=true;
$config[‘rrdtool_version’]=‘1.7.0’;
$config[‘rrdcached’]=“rrdstorage_host:42217”;
$config[‘distributed_poller_memcached_host’]=“rrdstorage_host”;
$config[‘distributed_poller_memcached_port’]=11211;

#Disable daily updates
$config[‘update’] = 0;

Talking about the rrdstorage server:
rrdcached configuration:
DAEMON=/usr/bin/rrdcached
DAEMON_USER=librenms
DAEMON_GROUP=librenms
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
NETWORK_OPTIONS=“-L”
BASE_OPTIONS=“-B -F -R”

memcached.conf configuration:

-m 64
-p 11211
-u memcache
-l 0.0.0.0
-P /var/run/memcached/memcached.pid

It seems all is correct, however when I add a device errors drawing graphs appears. It seems that rrdtool is not able to write inside the rrd folder because a folder with device’s ip addres doesn’t appear. Did you add the following configuration in rrdcached file:

OPTS=“-l 0:42217”
OPTS=“$OPTS -R -j /var/lib/rrdcached/journal/ -F”
OPTS=“$OPTS -b /opt/librenms/rrd -B”
OPTS=“$OPTS -w 1800 -z 900”

my RRD server config procedure is like this for ubuntu 18.04.3

Set permissions

chown -R librenms:librenms /opt/librenms

setfacl -d -m g::rwx /opt/librenms/rrd
setfacl -R -m g::rwx /opt/librenms/rrd

Install rrdcached

sudo apt 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

make sure rrdcached port is listening

netstat -anp| grep 42217

and no . those lines are not included into my config.

and i got 1 more active line in my config. forgot to add.

NETWORK_OPTIONS="-L"

Perfect I got it! I have reviewed my configuration and I missed librenms permissions over rrd file in the Rrd server. Many thanks for the help!!

its great :wink: happy monitoring

Hi @serdaryar,
I have a question regardin ping.php on distributed poller setup and anyone have answered to it. I am frustrated and I don’t know if you could give me an answer. Do you use ping.php in your distributed setup? I want to reduce ping step to 1 min and I have followed the docs (https://docs.librenms.org/Extensions/Fast-Ping-Check/). However, when I try to update the rrd files to 1 minute ( ./scripts/rrdstep.php -h all), I am not able to convert any pin-perf.rrd file. I think that it is because rrdcached is located in another server than the poller one. I look forward to your answer.

should this be installed on both servers