Distributed poller set up

Got it! I uncommented NETWORK_OPTIONS="-L" and commented out SOCKFILE=/var/run/rrdcached.sock
in the config.php, I changed this line from $config[‘rrdcached’] = “unix:/var/run/rrdcached.sock”; to $config[‘rrdcached’] = “127.0.0.1:42217”;
Bounce rrdcached and it is now listening to port 42217.
Validated setup and no errors.

I assume that means its working?

Many Thanks for the help!

Continue to setup first poller.

1 Like

Fingers crossed it does mean it’s working :slight_smile:

It worked indeed!

So I spun up another poller and move the devices to that poller, it seems all the servers devices worked with that poller but not the networking devices. When I moved it back to the default pooler after a while, they all appear to be offline. I tried delete a device and re-add it, but wasn’t success, webserver timed out.

Any Clues?

Thanks

Most likely you aren’t allowing icmp / snmp from the new pollers IP.

yeah, I think that’s most likely the case.

When I move them back to the default poller and they still not working. The default poller IP should be allowed on those devices. They were working before I moved them to the new poller and back.

Is there a way to delete a device and clean all the memcached and db history about that device and treat it as new?

Thanks

Harry

Data like that isn’t stored in memcache. Removing a device should clear all it’s data out.

If you run ./poller.php -h HOSTNAME -d -m os -r -f it will give you some debug on what’s wrong.

I am very confused on setting up the poller.
My current config for a poller.(see below)
172.16.37.209 is where the master poller/memcached/rrdcached located and they use 11211 and 42217 make sense because this host need to get to those services via these ports.

The lines that threw me off was $config['distributed_poller_host'] and $config['distributed_poller_port'].
I put this poller’s IP on this line and put 11211 in the port section, but I felt its not right. What is port 11211 is used for in this case? Does this connect back to the memcached server?
If I put 172.16.37.209 there, then it still not making sense since its asking for the distributed_poller_host.

Any helps will be very much appreciated!

$config['distributed_poller_name'] = file_get_contents('/etc/hostname');
$config['distributed_poller_group'] = '1';
$config['distributed_poller_memcached_host'] = "172.16.37.209";
$config['distributed_poller_memcached_port'] = 11211;
$config['distributed_poller_host'] = "172.30.16.102";
$config['distributed_poller_port'] = 11211;
$config['distributed_poller'] = true;
$config['rrdcached'] = "172.16.37.209:42217";
$config['update'] = 0;

Those are wrong. Ignore that the docs need updated. Just remove those two lines.

Thanks all!
Finally got my distributed pollers setup.
All thanks to you guys!

Cheers

One thing I just noticed is that the poller has a service I can start. I thought the cronjobs dictates everything on the polling and stuff.
http://docs.librenms.org/Extensions/Poller-Service/

Can someone tell me what’s the different between starting the service and doing cronjobs? Or do I need both running?
I started poller service via systemctl and found two identical pollers on poller drop down.

Any ideas?

Many Thanks

That’s a replacement for poller-wrapper.py and discovery in cron - run only one or the other not both.

I removed the cron jobs and left the service running, the new poller shows the correct number of devices that’s associated with that poller, but the pollers is not polling.
I wonder if I have remove all devices and re-add them to the new pollers.

You don’t have to delete and re-add.

Run ./poller.php -h HOSTNAME -d for one device and see what it outputs.

I deleted some devices and try to re-adding them to a different poller. The webUI kept giving me SNMP unreachability error. Sometimes, I can only add one new device in a region but can not add another one, the errors are always SNMP unreachability.

When I try to add devices from the command line of the poller, they were added just fine.

Any clue?

If your webui is separate then it’s most likely because you aren’t allowing snmp from it, either allow it, add the device from a poller with access or just force add.

1 Like

not sure what’s wrong with the permission but forcing add is working.
Thanks @laf

Hi Murrant

For clarity (on my end), should the below be removed / commented out on all poller servers when using distributed poller environment?

$config[‘memcached’][‘enable’] = true;
$config[‘memcached’][‘host’] = “localhost”;
$config[‘memcached’][‘port’] = 11211;

And with this leaving only:

$config[‘distributed_poller_memcached_host’] = “localhost”;
$config[‘distributed_poller_memcached_port’] = 11211;

If they are both specified, what would be the expected output of librenms? Does it use more memcache? Is $config[‘memcached’] favoured over $config[‘distributed_poller_memcached’] for example?

Thanks

Did you ever get an answer on this? I have both in my config and wonder if it’s causing issues?

A post was split to a new topic: Pi and distributed polling