Replicating whole of config.php to distributed pollers - bad idea?

Hi LibreNMS community,

I’ve ‘inherited’ a LibreNMS setup and would appreciate a bit of advice. The setup has a web server and two additional distributed pollers (plus a separate db server and separate rrcached server). The web server and pollers are running the despatcher service.

Currently nearly all config is done in config.php on the servers rather than in the database. This is a policy from above which I have to stick with, at least for now.

The web server has a full config.php on it, but the pollers have quite sparse ones - it looks as if only settings that were deemed relevant to the pollers were added to their config.php files. However, I’ve now found several instances where settings which should have been on the pollers weren’t there, leading to inconsistent behaviour between the servers.

To avoid this happening again, I was planning on setting up some sort of replication to automatically keep the pollers’ config.php files in sync with the main server’s one. Before I do - is this going to cause any issues? I’ve looked through as much of the documentation as I can, and couldn’t see anywhere that said “only configure this on the web server and never on your pollers”, but not having set the system up myself I don’t feel 100% confident that I’ve got my head round all of it yet.

So in essence my question is: Is there anything in config.php that should absolutely only be set on the main/web server or will cause problems if included in the distributed pollers config.php files?

(And yes, I know I’m re-inventing the wheel and that using the database for config would avoid all this, but it’s not possible here yet.)
Many thanks.

=====
Output of validate.php

Component Version
LibreNMS 24.10.1-51-ged49b5b67 (2024-11-18T19:34:16+00:00)
DB Schema 2024_10_13_162920_add_custom_map_nodeimage_column (307)
PHP 8.3.13
Python 3.8.10
Database MariaDB 10.6.20-MariaDB-ubu2004
RRDTool 1.7.2
SNMP 5.8
===========================================

[OK] Composer Version: 2.8.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Distributed Polling setting is enabled globally
[OK] Connected to rrdcached
[OK] Active pollers found
[OK] Dispatcher Service is enabled
[OK] Locks are functional
[OK] Python wrapper cron entry is not present
[OK] Redis is functional
[OK] rrdtool version ok
[OK] Connected to rrdcached

Depending on your setup, you should be able to mirror the config on all web / pollers with the exception of the group, if you have multiple groups on each poller is associated with a different set of groups then you need to configure that uniquely on each one. billing should only be run once per poller group so you probably only want to set that on one poller per group:

So the following can be used across all pollers if in the same group:

$config['distributed_poller_name']           = php_uname('n');
$config['distributed_poller_group']          = '0';
$config['distributed_billing']               = true;

Obviously the hostname of the roller should be unique.

Other than that, I can’t think of anything that you might put only on say the web node.

Thanks so much laf, that’s much appreciated. We only run a single polling group at the moment, so sounds like it’s worth giving replication/mirroring a shot, keeping in mind the caveat about billing. Thank you :smiley: