RRDcached assistance needed

Hi All,

I need some help cause I dont understand the config setup for the distributed pollers on the docs page.

I have two servers running a full install of LibreNMS

Server 1 (Main server where I use the Web Interface) 1.1.1.1 (This server is in another country)
Server 2 (This Server should only poll devices I assign to it) 2.2.2.2 (This Server is in my Country)

Here is where I need some clarification.

on what server should this config be on (/opt/librenms/config.php)

$config['distributed_poller_name']           = php_uname('n');
$config['distributed_poller_group']          = 'x';
$config['distributed_poller_memcached_host'] = "xx.xx.xx.xx";
$config['distributed_poller_memcached_port'] = 11211;
$config['distributed_poller']                = true;
$config['rrdcached']                         = "xx.xx.xx.xx.xx:42217";
$config['rrdcached'] = "unix:/run/rrdcached.sock";

some clarification for you.

rrdcached is installed on both my servers aswell as memcached.

/etc/default/rrdcached

DAEMON=/usr/bin/rrdcached
DAEMON_USER=librenms
DAEMON_GROUP=librenms
WRITE_THREADS=4
WRITE_TIMEOUT=1800
WRITE_JITTER=1800
BASE_PATH=/mnt/data-01/rrd
JOURNAL_PATH=/var/lib/rrdcached/journal/
PIDFILE=/run/rrdcached.pid
SOCKFILE=/run/rrdcached.sock
SOCKGROUP=librenms
BASE_OPTIONS=ā€œ-B -F -Rā€

/etc/memcached.conf

-d
-m 64
-p 11211
-u memcache
-l xx.xx.xx.xx

if anyone can assist me would be great.

Server1 validate

====================================

Component Version
LibreNMS 1.60-52-gc136e1ad6
DB Schema 2020_02_10_223323_create_alert_location_map_table (159)
PHP 7.2.27-6+ubuntu18.04.1+deb.sury.org+1
MySQL 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.9.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[WARN] Some devices have not been polled in the last 5 minutes. You may have performance issues.

Server2 validate

====================================

Component Version
LibreNMS 1.60-56-g40cac40ae
DB Schema 2020_02_10_223323_create_alert_location_map_table (159)
PHP 7.2.27-6+ubuntu18.04.1+deb.sury.org+1
MySQL 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.9.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] Some devices have not completed their polling run in 5 minutes, this will create gaps in data.

So in your scenario your two installs shouldnā€™t be full ones. The config you have posted should be on both but obviously both point to one central instance. I.e:

Poller 1:
Needs to run LibreNMS, MySQL, Memcached, Redis, Web Server and RRDCached. All config points to itself.

Poller 2: LibreNMS. All config points to poller 1.

Be warned you will see an increase in latency for devices polled from poller 2 as it will have to send itā€™s data back to Poller 1.
Needs to run

1 Like

Hi Laf,

so my poller 2 is not running MYSQL its logging in to Poller 1 MYSQL.

Iā€™ve updated poller 2 config.php

$config[ā€˜distributed_poller_nameā€™] = php_uname(ā€˜nā€™);
$config[ā€˜distributed_poller_groupā€™] = ā€˜1ā€™;
$config[ā€˜distributed_poller_memcached_hostā€™] = ā€œPoller1ā€;
$config[ā€˜distributed_poller_memcached_portā€™] = 11211;
$config[ā€˜distributed_pollerā€™] = true;
$config[ā€˜rrdcachedā€™] = ā€œPoller1:42217ā€;
$config[ā€˜rrdcachedā€™] = ā€œunix:/run/rrdcached.sockā€;

What Iā€™ve done now is added poller2 on my Poller1 web interface to be monitored but Iā€™ve assigned the poller to poller2

Poller group is assigned to my Poller2.

but its not graphing.

You only need the first line here.

1 Like

Thanks Laf,

so seems to be some firewall issues blocking this connection

ERROR: Unable to connect to rrdcached: Connection refused

Iā€™m going to speak to our Network team get them to allow this and then revert if all is sorted.

Thank you for your help.

1 Like

Hi Laf,

so network side is allowing this connection on the specified port but my RRD command still says Connection Refused.

check the system firewall

Hi Kevin,

I got it working.

I think the issue was the fact that rrdcached was installed on both my hosts after uninstalling and re-configuring on my poller1 seems to be working now

is this the correct config to have inside poller to conjob?

33 */6 * * * librenms /opt/librenms/cronic /opt/librenms/discovery-wrapper.py 1
*/5 * * * * librenms /opt/librenms/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16
15 0 * * * librenms /opt/librenms/daily.sh >> /dev/null 2>&1

You should run the python service instead, itā€™s much better. https://docs.librenms.org/Extensions/Dispatcher-Service/

1 Like