Monitorix is a free, open source, lightweight system monitoring tool designed to monitor as many services and system resources as possible. It has been created to be used on production UNIX/Linux servers, but due to its simplicity and small size may also be used to monitor embedded devices as well.
.P
It consists mainly of two programs: a collector, called \fBmonitorix\fP, which is a Perl daemon that is started automatically like any other system service, and a CGI script called \fBmonitorix.cgi\fP.
.P
Every time \fBmonitorix\fP is started it reads the configuration file from the path specified in the command line (using the \fB-c\fP option), and once checked, it creates the \fIindex.html\fP file that will act as the Monitorix main page.
It also creates a file called \fI<base_dir>/cgi-bin/monitorix.conf.path\fP that includes the absolute path of the configuration file. This file will be read by \fBmonitorix.cgi\fP to determine the exact location of the configuration file. If for any reason it is unable to locate this file, Monitorix will try two alternate locations: \fI/etc/monitorix.conf\fP and \fI/usr/local/etc/monitorix.conf\fP.
Blank lines are ignored, and whitespace before and after a token or value is ignored as well as tabulators, although a value can contain whitespace within. Lines which begin with a # are considered comments and ignored.
If you want to comment out a large block you can use C-style comments. A /* signals the begin of a comment block and the */ signals the end of the comment block.
The interface mode defines the manner in which data is shown in the browser. Since version 1.4.0 it has been possible to display the graphic data using plain text tables. This allows Monitorix to be used by those running screen reader software, and also simplifies automatic data processing through scripts.
This option enables or disables the use of use javascript:void-URLs when opening windows with zoomed graphs. Some people likes to open links in the background by pressing the middle mouse button in Firefox, and with the default javascript:void-URLs the only they get is an empty window with nothing in it.
This is the path to the system log (also known as \fIsecure\fP, \fIauth.log\fP, etc.) Monitorix uses this file to report SSH, POP3, FTP and Telnet successful logins.
This is the path to the mail log file. Monitorix uses this file to report messages sent (supporting Sendmail and Postfix formats), and the MailScanner log format for spam-mail and virus-mail alerts.
This is the path to the FTP server (ProFTPD or vsftpd) log. Monitorix uses this file to report FTP successful logins and other FTP-related information.
This is the path to the CommuniGate logs directory. Monitorix uses these files to report the number of mail messages successfully received and sent, and to report IMAP and POP3 successful logins.
This enables or disables the alert capabilities that were introduced in Monitorix version 1.4.0. Only two alerts are currently implemented; one for the average CPU load and one for the root filesystem disk use. They work as follows:
The CPU load average uses the third value (the one that represents the last 15 minutes of load average), and if it reaches the \fBloadavg_threshold\fP value for the interval of time defined in \fBloadavg_timeintvl\fP, Monitorix will execute the external alert script defined in \fBloadavg_script\fP.
For the root filesystem disk use, if the percentage of disk space used reaches the \fBrootfs_threshold\fP value for the interval of time defined in \fBrootfs_timeintvl\fP, Monitorix will execute the external alert script defined in \fBrootfs_script\fP.
The default Monitorix installation includes an example alert shell-script called \fBmonitorix-alert.sh\fP which you can use as a base for your own script.
This is the value that needs to be reached or exceeded within the specified time period in \fBloadavg_timeintvl\fP to trigger the mechanism for a particular action, which in this case is the execution of an external alert script.
This is the value that needs to be reached or exceeded within the specified time period in \fBrootfs_timeintvl\fP to trigger the mechanism for a particular action, which in this case is the execution of an external alert script.
This enables or disables the monitoring of each graph. Placing a \fIy\fP on a desired graph and restarting Monitorix will automatically create the RRD file for that graph and start gathering information according to its settings.
This changes the layout of the kernel usage graph, the possible values are \fIr\fP for a real graph, or \fIs\fP for a stacked graph (every line or area is stacked on top of the previous element).
This is the list of values offered in modern Linux kernels. Older Linux kernels or other Operating Systems may not have all of them. Placing a \fIy\fP or an \fIn\fP will enable or disable the value in the graph.
This is the number of processors or cores that your system has. There is no limit, however keep in mind that every time this number is changed Monitorix will resize the \fIproc.rrd\fP file accordingly, removing all historical data.
This is the number of processor graphs that will be put in a row. Consider the interaction of this parameter with the \fBsize\fP and \fBdata\fP options (below) in order to adjust the size and number of graphs in relation to your horizontal screen size.
This list will hold the defined temperature sensors for each graph. You must have installed the command line \fIhplog\fP that comes with HP ProLiant System Health Application and Command Line Utilities.
The last one, \fIgpu0\fP, is set here just in case you have an NVIDIA card and want to monitor its temperature. Currently only NVIDIA cards are supported so the value \fInvidia\fP is mandatory.
WARNING: Every time the number of groups in this option changes, Monitorix will resize the \fIdisk.rrd\fP file accordingly, removing all historical data.
To collect the disk drive temperatures and health the commands \fIsmartmontools\fP or \fIhddtemp\fP are required.
.P
It is recommended that you first check if either \fIsmartctl\fP or \fIhddtemp\fP are able to collect data from the disk drive(s) that you plan to monitor. You may test this with the following command:
This is a list of groups of mounted filesystems that you want to monitor. Each group will become a graph and there may be an unlimited number of groups.
WARNING: Every time the number of groups in this option changes, Monitorix will resize the \fIfs.rrd\fP file accordingly, removing all historical data.
Take special care to use the same name as appears in the output of the \fIdf\fP command (the \fIswap\fP device is a special case). An example would be:
This list complements the \fBlist\fP option. It basically allows you to change the name that will appear in the graph, hiding the real name of the mount point. If no association is defined, then Monitorix will display the name specified in the \fBlist\fP option.
This list complements the \fBlist\fP option. When Monitorix is started it tries to detect automatically the device name associated to each filesystem defined in the \fBlist\fP option in order to be able to show its I/O activity. If for any reason Monitorix failed to detect it, then you can help it using this option.
This is the option where each network interface specified in \fBlist\fP is described. Each definition consists of three parameters separated by comma: the description of the interface and the rigid and limit values.
This is where the network interface that acts as the gateway for this server is defined. This is mainly used if you plan to monitor network traffic usage of your devices/networks using the \fBtraffacct\fP graph below.
This option specifies the Greylisting implementation that Monitorix will use to collect statistical information. In the future more Greylisting software will be supported.
This is the number of network ports that you want to monitor. There is no limit to the number of ports monitored, but keep in mind that every time this number changes, Monitorix will resize the \fIport.rrd\fP file accordingly, removing all historical data.
This is the rule number that Monitorix will use when using the \fIipfw\fP command to manage network port activity on FreeBSD and OpenBSD systems. Change it if you think it might conflict with any other rule number.
You may define here up to \fBmax\fP network port numbers. If you see a red color in the background of a network port graph, it means that there is not a daemon listening on that port. This can be useful to know if some service gone down unexpectedly.
This is the option where each network port specified in \fBlist\fP is described. Each port definition consists of four parameters separated by comma: the port description, the network protocol, and the rigid and limit values.
This is the number of graphs that will be put in a row. Consider the interaction of this parameter with the \fBmax\fP option in order to adjust the size and number of graphs in relation to your horizontal screen size.
This graph requires that \fImod_status\fP be loaded and \fIExtendedStatus\fP option set to \fIOn\fP in order to collect full status information of the Apache web server.
.P
This graph is able to monitor an unlimited number of local and remote Apache web servers.
WARNING: Every time the number of entries in this option changes, Monitorix will resize the \fIapache.rrd\fP file accordingly, removing all historical data.
This graph may require adding some lines in the configuration file \fInginx.conf\fP. Please see the \fIREADME.nginx\fP file to determine the exact steps needed to configure Nginx to get status information.
.P
This graph requires the \fIiptables\fP command on Linux systems, and the \fIipfw\fP command on FreeBSD and OpenBSD systems.
This is the rule number that Monitorix will use when using the \fIipfw\fP command to manage Nginx network activity on FreeBSD and OpenBSD systems. Change it if you think it might conflict with any other rule number.
.P
Default value: \fI24100\fP
.RE
.SSLighttpdstatistics(lighttpd.rrd)
This graph requires that \fImod_status\fP is loaded in order to collect status information from the Lighttpd web server.
.P
This graph is able to monitor an unlimited number of local and remote Lighttpd web servers.
WARNING: Every time the number of entries of this option changes, Monitorix will resize the \fIlighttpd.rrd\fP file accordingly, removing all historical data.
This graph requires that you create a password protected MySQL user that is NOT granted privileges on any DB.
.P
Example:
.P
mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
.br
mysql> FLUSH PRIVILEGES;
.br
.P
where \fIuser\fP is the new user name and \fIpassword\fP is the password that will be used for that user.
.P
This graph is able to monitor an unlimited number of local and remote MySQL web servers.
.P
NOTE: It is strongly recommended that you restart the MySQL service in order to avoid high spikes that could prevent correct display of the first plotted data.
WARNING: Every time the number of entries of this option change Monitorix will resize the \fImysql.rrd\fP file accordingly, removing all historical data.
This is the option where each entry specified in the list is described. Each definition consists of three parameters separated by comma: the port, the username and the password.
Some of the values shown in the graphs are the result of a calculation of two values from either \fISHOW [GLOBAL] STATUS\fP or \fISHOW VARIABLES\fP. The following is an explanation of them:
.P
\fBThread Cache Hit Rate\fP
.br
\fB(1 - (Threads_created / Connections)) * 100\fP
.br
When an application connects to a MySQL database, the database has to create a thread to manage the connection and the queries that will be sent in that connection. The database instructs the kernel to create a new thread, and the kernel allocates resources and creates the thread, then returns it to the MySQL service. When the connection is terminated by the application, MySQL tells the kernel to destroy the thread and free the resources. This create/destroy mechanism causes considerable overhead if the MySQL server has many new connections per second.
.br
If MySQL doesn't destroy the thread when the connection is terminated, but reuses it and assigns it to the next connection then this will decrease the kernel overhead. This is why a high \fBThread Cache Hit Rate\fP improves MySQL performance and decreases the system's CPU usage.
.br
Setting the parameter \fIthread_cache_size\fP in the \fImy.cnf\fP file accordingly will help to correctly balance between having a great thread cache and keeping MySQL memory consumption reasonable.
A query cache size increase is recommended if the query cache usage is very close to 100% and the query cache hit rate is far from 100%. But sometimes a size increase will not lead to a better hit rate: this means that the increase was not needed and that the application do not run enough cacheable SELECT queries.
.br
This value should grow proportionally with the number of executed queries as long as the query cache is performing well. Please also have a look at the \fBQuery cache usage\fP percentage to know if your query_cache configuration is appropriate.
These two lists hold the selected Squid result or status codes to be shown in each graph. Feel free to mix result status and code status in any of the two options.
These three lists hold the defined NFS server activity statistics to be shown in each graph. Put every statistic name exactly as they appear in the output of the \fInfsstat\fP command.
These five lists hold the defined NFS client activity statistics to be shown in each graph. Put every statistic name exactly as they appear in the output of the \fInfsstat\fP command.
This graph requires a BIND server with version 9.5 or higher, and in order to see all statistics provided by BIND you must configure the \fIstatistics-channels\fP like this:
.P
statistics-channels {
.br
inet 127.0.0.1 port 8053;
.br
};
.P
This graph is able to monitor an unlimited number of BIND servers.
WARNING: Every time the number of entries in this option changes, Monitorix will resize the \fIbind.rrd\fP file accordingly, removing all historical data.
This is a list of RR (Resource Records) types for each BIND server specified in \fBlist\fP option. The RR types defined here will appear in the Incoming Queries graph which shows the number of incoming queries for each RR type.
This is a list of RR (Resource Records) types for each BIND server. The RR types defined here will appear in the Outgoing Queries graph (_default view) which shows the number of outgoing queries sent by the DNS server resolver for each RR type.
This is a list of counters about name resolution performed in the internal resolver. The counters defined here will appear in the Resolver Statistics graph (_default view).
This is a list of RR (Resource Records) types for each BIND server. The RR types defined here will appear in the Cache DB RRsets graph (_default view) which shows the number of RRsets per RR type (positive or negative) and nonexistent names stored in the cache database.
WARNING: Every time the number of entries in this option changes, Monitorix will resize the \fIntp.rrd\fP file accordingly, removing all historical data.
This is the list that describes the groups of jails in \fBdesc\fP. Put one description for each group. For every group specified you need to specify its description in the \fBdesc\fP option.
WARNING: Every time the number of entries in this option changes, Monitorix will resize the \fIfail2ban.rrd\fP file accordingly, removing all historical data.
WARNING: Every time the number of entries in this option changes, Monitorix will resize the \fIicecast.rrd\fP file accordingly, removing all historical data.
This changes the layout of the listeners graph, the possible values are \fIr\fP for a real graph, or \fIs\fP for a stacked graph (every line or area is stacked on top of the previous element).
If your server acts as the gateway for a group of PCs, devices or even whole networks in your local LAN, you may want to know how much Internet traffic each one is generating.
This is the number of LAN devices you want to monitor. There is no limit, but keep in mind that every time this number changes, Monitorix will resize its current \fItraffacct.rrd\fP file, removing all historical data.
This is the list of names of PCs, LAN devices or whole networks that you want to monitor. The only requirement is that all they must utilize this server as their gateway.
If the names in this list are able to be resolved by a DNS query then you don't need to define the \fBdesc\fP list (below) with corresponding IP addresses, unless you want monthly reports.
This is the list of IP addresses with network masks and email addresses corresponding to the entries defined in the \fBlist\fP. This option is only used when the those entries are not resolvable through a DNS query.
If this option is set to \fIy\fP, Monitorix will send a report of all the monthly Internet activity of the defined devices in \fBlist\fP to the specified email address on the first day of each month.
The \fIMultihost\fP feature allows you to monitor an unlimitted number of remote servers that already have Monitorix installed.
.P
Monitorix assumes that every remote server has been configured with the same settings in the \fIbase_url\fP and \fIbase_cgi\fP options. Future versions may introduce the ability to have different configurations between local and remote servers.
.P
.BIenabled
.RS
This option enables the \fIMultihost\fP feature.
.P
Default value: \fIn\fP
.RE
.P
.BIfooter_url
.RS
If set to \fIy\fP Monitorix will show the original URL of each server at the bottom of the graph. Where security is important you may want to hide this information.
.P
Default value: \fIy\fP
.RE
.P
.BIgraphs_per_row
.RS
If your horizontal screen resolution is pretty wide, you may want to increase the number of graphs that appear on each row.
.P
Default value: \fI2\fP
.RE
.P
.BIremotehost_list
.RS
This is a list with descriptive names of remote servers with Monitorix already installed and working that you plan to monitor from here.
.P
An example of this list would be:
.P
.RS
remotehost_list = server 1, server 2, server 3
.RE
.RE
.P
.BIremotehost_desc
.RS
This is a numbered list that describes each of the names defined in the \fBremotehost_list\fP option.
.P
An example would be:
.P
.RS
<remotehost_desc>
.br
0 = http://www.example.com
.br
1 = http://10.0.0.1
.br
2 = http://192.168.0.100:8080
.br
</remotehost_desc>
.RE
.P
As you can see all three entries use URLs to designate the location of each remote server. This means that each server most also have been installed on a CGI capable web server like Apache.
.RE
.P
.BIgroups
.RS
This enables the server grouping for those environments where there are too much servers to display at the same time. Hence, you can group them in order to show them separatedly.
.P
Default value: \fIn\fP
.RE
.P
.BIremotegroup_list
.RS
This is a list of groups of remote servers with Monitorix already installed and working that you plan to monitor from here.
.P
An example of this list would be:
.P
.RS
remotegroup_list = My Group
.RE
.RE
.P
.BIremotegroup_desc
.RS
This is a numbered list that describes each of the names defined in the \fBremotegroup_list\fP option.
.P
An example would be:
.P
.RS
<remotegroup_desc>
.br
0 = server2, server 3
.br
</remotegroup_desc>
.RE
.RE
.SSrigidandlimitvalues
.BIrigid
.RS
This value defines how the graph must be scaled. Its possible values are:
.P
\fI0\fP No rigid. The graph will be scaled automatically.
.br
\fI2\fP The graph will be scaled using the \fBlimit\fP value as its upper-limit value.
.RE
.BIlimit
.RS
This is where you can enter the upper-limit value for a graph.