Difference between revisions of "Monitorix"

From ArchWiki
Jump to: navigation, search
(move info about the built-in httpd up into configuration (unchanged) to merge the info with next edit)
(Configuration: merge info on built-in httpd; add link to its options; use hc template to merge Rc arc's info into it.)
Line 14: Line 14:
  
 
==Configuration==
 
==Configuration==
Edit {{ic|/etc/monitorix/monitorix.conf}} to match graphing options and system-specific variables.  For a complete list of options and features, see the [http://www.monitorix.org/documentation.html#3 man page].  
+
Edit {{ic|/etc/monitorix/monitorix.conf}} to match graphing options and system-specific variables.  For a complete list of options and features, see the [http://www.monitorix.org/documentation.html man page].  
  
 
Most of the user settings are self explanatory based on the commented text within the configuration file itself.
 
Most of the user settings are self explanatory based on the commented text within the configuration file itself.
  
With the release of version 3.0.0 (18-Feb-2013), Monitorix now comes with a light, built in webserver thanks to the dependency on {{Pkg|perl-http-server-simple}}. This is a configuration option in {{ic|/etc/monitorix/monitorix.conf}} which users may elect to either use or not. 
+
Since release 3.0.0 (18-Feb-2013), Monitorix comes with a light, built-in webserver; via the dependency {{Pkg|perl-http-server-simple}}. It is, however, disabled by default. To use it, change the configuration option as follows:  
 
 
{{Note|This the perl-http-server is defaulted to ''disabled'' in /etc/monitorix/monitorix.conf.}}
 
 
 
'''Note: If monitorix doesn't start, try checking to see if the builtin httpd server is enabled.'''
 
 
    
 
    
  ....
+
{{hc|1=/etc/monitorix/monitorix.conf|2=
  <httpd_builtin>
+
....
 +
<httpd_builtin>
 
    
 
    
    enabled = y
+
enabled = y
  ....
+
....}}
 +
See the configuration file for the other related options, for example [http://www.monitorix.org/documentation.html#3 accesss restrictions], or [[#Configure an external webserver]].
  
 
==Start==
 
==Start==

Revision as of 16:46, 4 July 2015

Monitorix is an open source, lightweight system monitoring tool designed to monitor as many services and system resources as possible. It has been created to be used under production UNIX/Linux servers, but due to its simplicity and small size many use it on embedded devices as well.

Installation

A package for monitorixAUR can be found in the AUR.

Note: Depending on which font packages are installed, it might been necessary to install the terminus-font package. For now, proceed without it, once monitorix is configured and running, users will know very quickly if they are missing the correct font as the graphs will not contain any text at which point, go ahead and install the terminus-font package via pacman.

Configuration

Edit /etc/monitorix/monitorix.conf to match graphing options and system-specific variables. For a complete list of options and features, see the man page.

Most of the user settings are self explanatory based on the commented text within the configuration file itself.

Since release 3.0.0 (18-Feb-2013), Monitorix comes with a light, built-in webserver; via the dependency perl-http-server-simple. It is, however, disabled by default. To use it, change the configuration option as follows:

/etc/monitorix/monitorix.conf
....
<httpd_builtin>
  
enabled = y
....

See the configuration file for the other related options, for example accesss restrictions, or #Configure an external webserver.

Start

Start monitorix.service and enable it to run at boot like any other systemd service.

Viewing Monitorix data

To view system stats, using the perl-http-server, simply point a browser to http://localhost:8080/monitorix to see the data.

Tip: If this is a the first time running Monitorix, it will take several minutes before data are displayed graphically so be patient.

Configure an external webserver

Lighttpd

lighttpd is another option.

By default, cgi support is not enabled in lighttpd. To enable it and to assign perl to process .cgi files, add the following two lines to /etc/lighttpd/lighttpd.conf:

server.modules		= ( "mod_cgi" )
cgi.assign		= ( ".cgi" => "/usr/bin/perl" )

Apache

apache is yet another option.

Nginx

nginx can be used as a reverse proxy/webserver by adding the following server block the nginx config:

server {
    listen       80;
    server_name  your.domain.com;

    location / {
       proxy_pass http://127.0.0.1:8080/;
       proxy_buffering off;
    }

    location ~ ^/monitorix/(.+\.png)$ {
        alias /srv/http/monitorix/$1;
    }
}

Also add url_prefix_proxy = http://your.domain.com to /etc/monitorix/monitorix.conf.

Using tmpfs to Store RRD databases

Anything-sync-daemonAUR is a package which provides a pseudo-daemon that makes use of tmpfs to store RRD Databases for Monitorix. Doing so will greatly reduce hdd reads/writes.