MariaDB, Redis, and RRDcached will be installed on a dedicated machine that will not run LibreNMS.
Install necessary packages
apt install redis-server rrdcached mariadb-server
Currently, the Redis Server is only bound to 127.0.0.1 - modify the server config to bind to either all interfaces or a single access network address.
vim /etc/redis/redis.conf
Modify the bind
config. Comment out the original localhost
entry and create a new one with your desired config
#To bind all interface addresses
bind 0.0.0.0
#To bind to a specific interface address
bind 192.168.128.4
Restart redis-server
systemctl restart redis-server.service
systemctl status redis-server.service
Make MariaDB accessible to the pollers
Modify the MariaDB config to bind the correct interfaces like completed with the Redis Server
vim /etc/mysql/mariadb.conf.d/50-server.cnf
Change the interface binding
#bind-address = 127.0.0.1
bind-address = 0.0.0.0
Restart MariaDB
systemctl restart mariadb.service
Grant access to the LibreNMS database from the pollers
mysql -u root
use librenms;
Allow user librenms
to login from 192.168.128.0/24
create user 'librenms'@'192.168.128.%' identified by '********';
Grant all privileges to user librenms
on database librenms
coming from anywhere on 192.168.128.0/24
grant all privileges on librenms.* to 'librenms'@'192.168.128.%';
Flush privileges now that the changes have been made
flush privileges;
exit
Bind rrdcachd to a network interface
Edit the /etc/default/rrdcached
config file. Modify BASE_OPTIONS
to look like this:
BASE_OPTIONS="-B -F -R -l 0:42217"
In the web GUI, tell each node where to find the RRD files (the setting will be communicated to the other nodes via Redis)
Define the Redis server in the .env
config file of all LibreNMS nodes
#-----------------------#
# Redis Configuration #
#-----------------------#
REDIS_HOST=192.168.128.4 <-- Use the IP address of the Redis (database) server
REDIS_PORT=6379
REDIS_DB=0
CACHE_DRIVER=redis