1 Installing LibreNMS - tuning

1.1 Goals

 

1.2 Notes

 

1.3 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 first become root if your not already the root user:

$ sudo bash

Then install the rrdcached caching package:

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

Look for the line with:

#OPTS=""

and underneath this line add the following lines:

OPTS="-s librenms"
OPTS="$OPTS -l unix:/var/run/rrdcached/rrdcached.sock"
OPTS="$OPTS -j /var/lib/rrdcached/journal/ -F"
OPTS="$OPTS -b /opt/librenms/rrd/ -B"
OPTS="$OPTS -w 1800 -z 1800 -f 3600 -t 4"

And then add the definition for the user rrdcached will run as by placing this underneath the "OPTS=" statements:

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 and add another:

# cd /opt/librenms
# editor config.php

Find the line:

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

And change it to:

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

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

# service apache2 restart

 

1.4 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

=> YOU CAN NOW PROCEED TO THE BASIC CONFIGURATION LAB! <=