Distributed Poller - Assistance with memcache setup

Hi,

I have a distributed poller setup

1 Server with DB
1 Server with rrd, rrdcache, and memcache
5 different pollers

While trying to get everything going, when I run the validate to determine if my setup is correct it’s complaining memcache isn’t working.

./validate.php -g distributedpoller

Component Version
LibreNMS 1.51-14-g554e22d
DB Schema 2019_02_10_220000_add_dates_to_fdb (390)
PHP 7.2.16
MySQL 5.7.14-8-log
RRDTool 1.7.1
SNMP NET-SNMP 5.7.2

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

[OK] Composer Version: 1.8.5
[OK] Dependencies up-to-date.
Checking distributedpoller: FAIL
[FAIL] We could not get memcached stats, it is possible that we cannot connect to your memcached server, please check

I have the following in the config.php

cat config.php | grep memcache
$config[‘memcached’][‘enable’] = true;
$config[‘memcached’][‘host’] = “X.X.X.X”;
$config[‘memcached’][‘port’] = 11211;
$config[‘distributed_poller_memcached_host’] = ‘X.X.X.X’;
$config[‘distributed_poller_memcached_port’] = ‘11211’;

I installed the php memcache extension: sudo yum install php72w-pecl-memcached.x86_64. I installed this on all the pollers.

How do I go about troubleshooting this? It also does not appear that memcache is listening on port 11211.

Did you start your memcached server?

What is the command to start it? Below - which was my guess, did not work.

sudo systemctl start memcached
Failed to start memcached.service: Unit not found.

Did you install memcached on one server?

That part was slightly unclear to me. Please let me know what are the correct steps.
One a single server I installed:

  • libevent
  • libevent-devel
  • python-memcached
  • php72w-pecl-memcached

On all the other I installed:

  • python-memcached
  • php72w-pecl-memcached

I tried a sudo yum install memcached, but I get an error “No package memcached available.
Error: Nothing to do”.

Thanksl

So you haven’t installed memcached, only language plugins…
It is probably called just memcache

OK I think I have some of the problems fixed.

One a single server I installed:

  • libevent
  • libevent-devel
  • python-memcached
  • php72w-pecl-memcached
  • memcached

On all the other pollers I installed:

  • python-memcached
  • php72w-pecl-memcached

memcached is now showing it is running:
● memcached.service - Memcached
Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2019-05-10 15:52:39 CDT; 7min ago
Main PID: 184743 (memcached)
CGroup: /system.slice/memcached.service
└─184743 /usr/bin/memcached -u memcached -p 11211 -m 64 -c 1024

And now I am seeing the right results:
[ ./validate.php -g distributedpoller

Component Version
LibreNMS 1.51-14-g554e22d
DB Schema 2019_02_10_220000_add_dates_to_fdb (390)
PHP 7.2.16
MySQL 5.7.14-8-log
RRDTool 1.7.1
SNMP NET-SNMP 5.7.2

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

[OK] Composer Version: 1.8.5
[OK] Dependencies up-to-date.
Checking distributedpoller: OK
[OK] Connection to memcached is ok

Final 2 questions:
Do I need to modify any of the package installs listed above? should the language plugins be removed from the pollers?

Also do I need remove the first 3 lines listed from my config.php and just leave the ones referencing the distributed poller?
$config[‘memcached’][‘enable’] = true;
$config[‘memcached’][‘host’] = “X.X.X.X”;
$config[‘memcached’][‘port’] = 11211;
$config[‘distributed_poller_memcached_host’] = ‘X.X.X.X’;
$config[‘distributed_poller_memcached_port’] = ‘11211’;

Thanks again for all the help on this one.

The first three aren’t actually settings in LibreNMS, you can remove them.