Goals

 

Notes

 

Install rrdcache support for LibreNMS

rrdcache allows LibreNMS to write information about devices to memory instead of directly to disk. LibreNMS is a resource-intensive tool and adding memory cache support to LibreNMS will lessen the load on your server.

To do this do:

# apt-get install rrdcached
# editor /etc/default/rrdcached

Look for the line with:

#OPTS=""

and replace it with the following line:

OPTS="-w 1800 -z 1800 -f 3600 -s librenms -U librenms -G librenms -j
/var/tmp -l unix:/var/run/rrdcached/rrdcached.sock -t 4 -F -b
/opt/librenms/rrd/"

And then add the definition for the user rrdcached will run as:

RRDC_USER=librenms

Save the file and exit and then:

# service rrdcached restart

Next edit the file ''/opt/librenms/config.php'' and change one line:

# cd /opt/librenms
# cp config.php.default config.php
# editor config.php

Find the line:

#$config['rrdcached']    = "unix:/var/run/rrdcached.sock";

And change it to:

$config['rrdcached']    = "unix:/var/run/rrdcached.sock";

Now we can restart the Apache web server to pick up all the various changes we have made.

# service apache2 restart

 

Fine tuning MySQL

There is one setting we need to add and one we want to be sure is included for your MySQL database server that will help LibreNMS to run more efficiently. You need to edit the file /etc/mysql/my.cnf:

# editor /etc/mysql/my.cnf

Under the section of the file titled ''# * InnoDB'' add the following two lines to the file:

innodb_file_per_table   = 1
innodb_flush_log_at_trx_commit = 0

Now save the file and restart the MySQL server:

# service mysql restart

If you are interested in the details about this change you can read about it at http://dev.mysql.com/doc/refman/5.7/en/innodb-multiple-tablespaces.html