Difference between revisions of "Monitorix"

From ArchWiki
Jump to: navigation, search
(update templates, the article summary is not meant for that use, see Help_talk:Style/Article_summary_templates for the related discussion)
m (Viewing Monitorix Data)
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Web Server (English)]]
+
[[Category:Web Server]]
{{i18n|Monitorix}}
+
 
+
 
{{Article summary start}}
 
{{Article summary start}}
 
{{Article summary text|Installation and configuration of Monitorix.}}
 
{{Article summary text|Installation and configuration of Monitorix.}}
 
{{Article summary heading|Related}}
 
{{Article summary heading|Related}}
{{Article summary wiki|Monitorix-sync-daemon}}
+
{{Article summary wiki|Anything-sync-daemon}}
 
{{Article summary wiki|lm_sensors}}
 
{{Article summary wiki|lm_sensors}}
 
{{Article summary wiki|hddtemp}}
 
{{Article summary wiki|hddtemp}}
 
{{Article summary end}}
 
{{Article summary end}}
  
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.  The current status is accessed via web browser [[http://www.monitorix.org/ 1]].
+
[http://www.monitorix.org/ 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 of Monitorix==
 
==Installation of Monitorix==
 
 
Visit the [[AUR]] and grab the tarball for the {{AUR|monitorix}} package and build/install it.
 
Visit the [[AUR]] and grab the tarball for the {{AUR|monitorix}} package and build/install it.
 
$ tar -zxvf monitorix.tar.gz
 
$ cd monitorix
 
$ makepkg -src
 
# pacman -U monitorix-<TAB>.tar.gz
 
  
 
{{Note| Depending on which font packages are installed on your system, 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.}}
 
{{Note| Depending on which font packages are installed on your system, 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.}}
Line 25: Line 17:
 
==Configuration of Monitorix==
 
==Configuration of Monitorix==
 
Before starting the monitorix daemon, '''be sure''' to adjust the {{ic|/etc/monitorix.conf}} to your liking.  For a complete list of options and features, see the [[http://monitorix.org official website]] or the included man page for monitor.conf.   
 
Before starting the monitorix daemon, '''be sure''' to adjust the {{ic|/etc/monitorix.conf}} to your liking.  For a complete list of options and features, see the [[http://monitorix.org official website]] or the included man page for monitor.conf.   
 
$ man monitorix.conf
 
  
 
Most if not all of the user settings are self explanatory based on the commented text within the conf file itself.
 
Most if not all of the user settings are self explanatory based on the commented text within the conf file itself.
 
===General===
 
{{bc|1=
 
our $TITLE = "Reborn's Monitorix";
 
our $HOSTNAME = "Reborn";
 
our $THEME_COLOR = "black";
 
our $REFRESH_RATE = "150";
 
our $IFACE_MODE = "graph";
 
our $ENABLE_ZOOM = "Y";
 
}}
 
 
Common settings to tweak here include title, hostname, and theme color.
 
 
===Select Which Data Gets Graphed===
 
 
{{bc|<nowiki>
 
        "system"        => "Y",
 
        "kern"          => "N",
 
        "proc"          => "Y",
 
        "hptemp"        => "N",
 
        "lmsens"        => "Y",
 
        "nvidia"        => "Y",
 
        "disk"          => "Y",
 
        "fs"            => "N",
 
        "net"          => "Y",
 
        "serv"          => "N",
 
        "mail"          => "N",
 
        "port"          => "N",
 
        "user"          => "Y",
 
        "apache"        => "N",
 
        "nginx"        => "N",
 
        "int"          => "N",
 
</nowiki>}}
 
 
Toggle which of the data gets displayed.
 
 
===Temperature monitor===
 
Monitorix optionally reads the info from lm-sensors and from hddtemp and logs CPU, MB, and HDD temps as well as fan speeds.  See the [[lm_sensors]] wiki article to setup sensors on your box.  See the [[hddtemp]] wiki article to setup hddtemp on your box.
 
 
{{Note| both packages are in the [extra] repo.  Install them via: pacman -S lm_sensors hddtemp}}
 
 
To setup monitorix to read your specific sensors data, simply run sensors on the box and make the appropriate substitutions in the {{ic|/etc/monitorix.conf}}
 
 
For example:
 
 
{{bc|<nowiki>
 
        "MB0"    => "Mobo Temp",
 
        "CPU0"  => "CPU0 Temp",
 
        "FAN1"  => "CPU0 Fan",
 
        "CORE0"  => "CPU0 Temp",
 
        "CORE1"  => "CPU1 Temp",
 
        "VOLT0"  => "VCore 1",
 
        "VOLT1"  => "VCore 2",
 
        "VOLT2"  => "\\+3.3V",
 
        "VOLT3"  => "\\+5V",
 
        "VOLT4"  => "\\+12V",
 
        "VOLT5"  => "\\-12V",
 
        "VOLT6"  => "\\-5V",
 
        "VOLT7"  => "cpu0_vid",
 
        "GPU0"  => "nvidia",
 
</nowiki>}}
 
 
Again, change the values for each variable based on your own hardware and based on what you want to capture in the rrd databases.
 
 
===Filesystems===
 
 
Set up to block devices and mount points (optional).
 
 
For example:
 
 
{{bc|1=
 
our @DISK_LIST = (
 
        "/dev/sda",
 
#      "/dev/sdb",
 
#      "/dev/sdc",
 
);
 
our @FS_LIST = (
 
        "/boot",
 
        "/",
 
        "/data",
 
);
 
}}
 
 
===Additional sections===
 
 
The rest of the config file includes data that most users won't want or need to customize.  Feel free to tweak the file to your liking.
 
  
 
==Start Monitorix==
 
==Start Monitorix==
 +
Start Monitorix with the included service file like any other systemd service:
 +
# systemctl start monitorix
  
Monitorix is started like any other daemonData collection will occur '''once per minute''' triggered via a cron job ({{ic|/etc/cron.d/monitorix}}).  When running monitorix for the very first time, it is necessary to restart the crond.  On any subsequent start or restart this step is not necessary.
+
==Viewing Monitorix Data==
 +
With the release of version 3.0.0, 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.conf}} which users may elect to either use or not.
  
# rc.d start monitorix
+
{{Note|This the perl-http-server is defaulted to ''disabled'' in /etc/monitorix.conf.}}
  
{{Note|To have monitorix start at boot, add it to your daemons array in {{ic|/etc/rc.conf}}.}}
+
To view system stats, using the perl-http-server, simply point a browser to [[http://localhost:8080/monitorix http://localhost:8080/monitorix]] to see the data.
 
+
==Viewing Monitorix Data==
+
 
+
To view system stats, make sure a webserver is running (see the next section) and browse to [[http://localhost/monitorix http://localhost/monitorix]] to see the data.
+
  
 
{{Note|It will take several minutes before data are displayed graphically so be patient.}}
 
{{Note|It will take several minutes before data are displayed graphically so be patient.}}
  
==Configure a Webserver==
+
==Configure an External Webserver==
Monitorix has minimal requirements for webservering the data.  Arch has several options in the main repos for web serving, two of which are listed below.  Lighttpd is recommended since its system resource footprint is minimal compared to apache (0.94 MB vs. 6.52 MB).  Alternatively, Apache will work, but it is overkill!
+
 
+
 
===Lighttpd===
 
===Lighttpd===
 
+
{{Pkg|Lighttpd}} is another option.
# pacman -S lighttpd
+
  
 
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 {{ic|/etc/lighttpd/lighttpd.conf}}:
 
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 {{ic|/etc/lighttpd/lighttpd.conf}}:
Line 141: Line 41:
 
  server.modules = ( "mod_cgi" )
 
  server.modules = ( "mod_cgi" )
 
  cgi.assign = ( ".cgi" => "/usr/bin/perl" )
 
  cgi.assign = ( ".cgi" => "/usr/bin/perl" )
 
Start lighttpd like any other daemon:
 
# rc.d start lighttpd
 
 
{{Note|To have lighttpd start at boot, add it to your daemons array in {{ic|/etc/rc.conf}}.}}
 
  
 
===Apache===
 
===Apache===
 +
{{Pkg|Apache}} is yet another option.
  
# pacman -S apache
 
 
Make sure the hostname appears in {{ic|/etc/hosts}} and in {{ic|/etc/rc.conf}} or apache will not operate.
 
 
Start apache like any other daemon:
 
# rc.d start httpd
 
 
{{Note|To have apache start at boot, add it to your daemons array in {{ic|/etc/rc.conf}}.}}
 
 
==Using tmpfs to Store RRD Databases==
 
==Using tmpfs to Store RRD Databases==
Have a look at the following package which provides a script that will make use of tmpfs to store your RRD Databases for Monitorix.  Doing so will greatly reduce hdd reads/writes.
+
{{AUR|Anything-sync-daemon}} 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.
 
+
{{AUR|monitorix-tmpfs}}
+

Revision as of 03:00, 22 April 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end

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 of Monitorix

Visit the AUR and grab the tarball for the monitorixAUR package and build/install it.

Note: Depending on which font packages are installed on your system, 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 of Monitorix

Before starting the monitorix daemon, be sure to adjust the /etc/monitorix.conf to your liking. For a complete list of options and features, see the [official website] or the included man page for monitor.conf.

Most if not all of the user settings are self explanatory based on the commented text within the conf file itself.

Start Monitorix

Start Monitorix with the included service file like any other systemd service:

# systemctl start monitorix

Viewing Monitorix Data

With the release of version 3.0.0, Monitorix now comes with a light, built in webserver thanks to the dependency on perl-http-server-simple. This is a configuration option in /etc/monitorix.conf which users may elect to either use or not.

Note: This the perl-http-server is defaulted to disabled in /etc/monitorix.conf.

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

Note: 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.

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.