From Mark Furneaux's Wiki
Revision as of 09:24, 24 August 2017 by Mark Furneaux (Talk | contribs) (Installation)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Monitorix is a web graphical utility for viewing server stats over time.


Add the repository to /etc/apt/sources.list:
deb generic universe

Add the key:
# wget -O - | apt-key add -

Install the package:
# apt update
# apt install monitorix apache2-utils


All configuration for Monitorix is in /etc/monitorix/monitorix.conf.

To get Monitorix to load on a server with Apache already installed, the built-in http server must be disabled by setting the line below and restarting Monitorix.

	enabled = n
	host =
	port = 8080
	user = nobody
	group = nogroup
	log_file = /var/log/monitorix-httpd
	hosts_deny =
	hosts_allow =
		enabled = n
		msg = Monitorix: Restricted access
		htpasswd = /var/lib/monitorix/htpasswd

To allow external clients to access Monitorix, edit /etc/apache2/conf-enabled/monitorix.conf to the desired permission levels and restart Apache.

Alias /monitorix /var/lib/monitorix/www
ScriptAlias /monitorix-cgi /var/lib/monitorix/www/cgi
<Directory /var/lib/monitorix/www/>
	<IfModule mod_authz_core.c>
		# Apache 2.4
		Require all granted
		#Require ip
	<IfModule !mod_authz_core.c>
		# Apache 2.2
		Order deny,allow
		Deny from all
		Allow from

<Directory /var/lib/monitorix/www/cgi/>
        DirectoryIndex monitorix.cgi
        Options ExecCGI

You may need to enable CGI processing with:
# a2enmod cgi

You may also need to run:
# chgrp -R www-data /var/lib/monitorix/www
# chmod -R g+rx /var/lib/monitorix/www
to make page display properly.


On certain models of HDD/SSD controller, the frequent calls Monitorix makes to smartctl to fetch drive temperatures will cause the SATA link to lock up, forcing the controller to timeout and reset the link. This will greatly disturb operation of the machine. If this occurs, simply disable HDD temperature monitoring.