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 Linux/UNIX servers, but due to its simplicity and small size may also be used to monitor embedded devices as well.
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. Since 3.0 version Monitorix includes its own HTTP server built in, so you don't need to install any web server to use it.
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/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.
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 option, when enabled, shows the gaps (missing data) in the graphs. This is specially useful to detect if the server or Monitorix were stopped for a while, or any other unavailability.
.P
In order to be able to locate those gaps easily in each graph, it uses the white color in the default black theme and the black color in the white theme. These default colors are defined in \fImonitorix.conf\fP so they can be changed as any other option.
This option zooms all the graphs (including the legend's font size) by the given amount. The factor must be greater than 0 and it accepts decimal values.
.P
This is specially useful for people with big screens that either want to avoid using the browser feature to zoom the contents of the window and for those that watch the graphs from certain distance.
Keep in mind that the contents of the graphs remains with the same detail level all the time, and that it doesn't affects to the standard zoomed graph that appears when clicking in the picture.
This enables or disables the HTTP server that Monitorix has built-in. This is specially useful for system administrators that don't want to install a web server (Apache, Lighttpd, Nginx, etc.) to see the Monitorix graphs.
This is a comma delimited set of IP addresses which are not permitted to access Monitorix graphs. There is the special keyword called \fIall\fP that can be used to deny all IP addresses.
This is the opposite of \fBhosts_deny\fP option. IP addresses listed here are permitted to access Monitorix graphs. There is also the special keyword called \fIall\fP that can be used to allow access to all IP addresses.
This enables or disables the authentication mechanism to control access to pages and other resources. The only allowed mechanism is Basic and uses the 401 status code and the WWW-Authenticate response header.
.P
For more information about the Basic access authentication mechanism and its security implications, please refer to http://en.wikipedia.org/wiki/Basic_access_authentication.
.P
Default value: \fIn\fP
.RE
.P
.BImsg
.RS
This option sets the \fIRealm\fP to be used in the authentication. That message should appear in the client dialog box to help user to identify the secure area.
This option sets the path to the password file that was created with the help of the \fIhtpasswd.pl\fP script. That script encrypts and validates passwords using the system's crypt() routine. If your Monitorix package doesn't come with that script, you may use the similar \fIhtpasswd\fP(1) program provided with the Apache web server.
The format of the password file consist of one or more lines with a username and password separated by a colon.
.P
The following is an example of a password file:
.P
paul:oGkEsQK6RYIII
.br
peter:HF1r7qRL4Kg6E
.P
Since the script uses the crypt() algorithm, only the first 8 characters of the password are used to form the password. If the supplied password is longer, the extra characters will be silently discarded.
This is the path to the system log (also known as \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 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 section enables or disables the alert capabilities for this graph. Only the alert for the average CPU load is currently implemented. It works as follows:
The CPU load average uses the third value (the one that represents the last 15 minutes of the 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.
The default Monitorix installation includes an example of a shell-script alert 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 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 \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 a supported graphics card and want to monitor its temperature. Currently only NVIDIA and ATI graphic cards are supported; with the values \fInvidia\fP and \fIati\fP respectively. It requires the official NVIDIA or ATI drivers.
WARNING: Every time the number of groups in this option changes, Monitorix will resize the \fIdisk.rrd\fP file accordingly, removing all historical data.
It is recommended that you first check if either \fIsmartctl\fP(8) 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:
During the init stage this graph verifies that every defined device name does exist in the system. If not, then the graph disables itself.
.P
This option changes this behavior and permits to continue working even if the device names defined doesn't exist. Keep in mind that you will continue seeing error messages in the logfile.
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(1) 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 section enables or disables the alert capabilities for this graph. Only the alert for the root filesystem disk usage is currently implemented. It works as follows:
.P
If the percentage of disk space used in the root filesystem 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.
.P
The default Monitorix installation includes an example of a shell-script alert called \fBmonitorix-alert.sh\fP which you can use as a base for your own script.
.P
Default value: \fIn\fP
.RE
.P
.BIrootfs_timeintvl
.RS
This is the period of time (in seconds) that the threshold needs to be exceeded before the external alert script is executed.
.P
Default value: \fI3600\fP
.RE
.P
.BIrootfs_threshold
.RS
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.
.P
The value of this option is compared to the current root filesystem disk usage.
.P
Default value: \fI100\fP
.RE
.P
.BIrootfs_script
.RS
This is the full path name of the script that will be executed by this alert.
.P
It will receive the following three parameters:
.P
1st - the value currently defined in \fBrootfs_timeintvl\fP
.br
2nd - the value currently defined in \fBrootfs_threshold\fP
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.
If the number of delivered messages reaches the \fBdelvd_threshold\fP value for the interval of time defined in \fBdelvd_timeintvl\fP, Monitorix will execute the external alert script defined in \fBdelvd_script\fP.
.P
The default Monitorix installation includes an example of a shell-script alert called \fBmonitorix-alert.sh\fP which you can use as a base for your own script.
.P
Default value: \fIn\fP
.RE
.P
.BIdelvd_timeintvl
.RS
This is the period of time (in seconds) that the threshold needs to be exceeded before the external alert script is executed.
.P
Default value: \fI60\fP
.RE
.P
.BIdelvd_threshold
.RS
This is the value that needs to be reached or exceeded within the specified time period in \fBdelvd_timeintvl\fP to trigger the mechanism for a particular action, which in this case is the execution of an external alert script.
.P
The value of this option is compared against the number of delivered messages since the last \fBdelvd_timeintvl\fP seconds.
.P
Default value: \fI100\fP
.RE
.P
.BIdelvd_script
.RS
This is the full path name of the script that will be executed by this alert.
.P
It will receive the following three parameters:
.P
1st - the value currently defined in \fBdelvd_timeintvl\fP
.br
2nd - the value currently defined in \fBdelvd_threshold\fP
This section enables or disables one of the alert capabilities for this graph; the alert for the number of queued messages. It works as follows:
.P
If the number of queued messages reaches the \fBmqueued_threshold\fP value for the interval of time defined in \fBmqueued_timeintvl\fP, Monitorix will execute the external alert script defined in \fBmqueued_script\fP.
.P
The default Monitorix installation includes an example of a shell-script alert called \fBmonitorix-alert.sh\fP which you can use as a base for your own script.
This is the period of time (in seconds) that the threshold needs to be exceeded before the external alert script is executed.
.P
Default value: \fI3600\fP
.RE
.P
.BImqueued_threshold
.RS
This is the value that needs to be reached or exceeded within the specified time period in \fBmqueued_timeintvl\fP to trigger the mechanism for a particular action, which in this case is the execution of an external alert script.
.P
The value of this option is compared with the number of messages in the mail queue.
.P
Default value: \fI100\fP
.RE
.P
.BImqueued_script
.RS
This is the full path name of the script that will be executed by this alert.
.P
It will receive the following three parameters:
.P
1st - the value currently defined in \fBmqueued_timeintvl\fP
.br
2nd - the value currently defined in \fBmqueued_threshold\fP
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 *BSD 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 five parameters separated by comma: the port description, the network protocol, the connection type (\fIin\fP, \fIout\fP or \fIin/out\fP) 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.
For best results with the vsftpd server I recommend to setup the option \fIxferlog_std_format\fP to \fINO\fP, and the option \fBftp_log\fP to \fI/var/log/vsftpd.log\fP.
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.
This is the rule number that Monitorix will use when using the \fIipfw\fP command to manage Nginx network activity on *BSD systems. Change it if you think it might conflict with any other rule number.
WARNING: Every time the number of entries of this option changes, Monitorix will resize the \fIlighttpd.rrd\fP file accordingly, removing all historical data.
NOTE: It is strongly recommended that you restart the MySQL service in order to avoid high peaks 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.
During operation, MySQL has to create some temporary tables (that can be explicit, so created by the web application, or implicit, so for example MySQL has to create one when he runs some "SELECT DISTINCT", "UNION" or "VIEW" queries). MySQL will prefer to save this tmp tables to memory, for a fast access. But if \fItmp_table_size\fP gets saturated, he has to write them on the disk instead, making the access slower.
.br
Note that if you modify the value of \fItmp_table_size\fP in the MySQL configuration file, you should also modify the value of \fImax_heap_table_size\fP as well, since both values should have the same value because MySQL uses the minimum of both, so raising one of them is useless.
Therefore this value helps to know how many tmp tables go to the disk instead than to the memory. Keep in mind that some large queries, involving TEXT and BLOB columns, are directly written to the disk instead than to the memory, because they would be too big. So you probably will want to avoid having a high % of tmp tables written to the disk, but you will never reach 0% on a big site, and this is fine.
.br
Lower is better ... but 0% is not reachable and you should not try to reach it, usually.
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(8) 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(8) 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 option like this:
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).
This graph is able to monitor an unlimited number of Wowza servers.
.P
.BIlist
.RS
This is a list of URLs of Wowza server status pages.
.P
WARNING: Every time the number of entries in this option changes, Monitorix will resize the \fIwowza.rrd\fP file accordingly, removing all historical data.
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 the \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. Make sure that all servers (local and remote) have the same version of Monitorix, otherwise there would be some incompatibilities that would prevent showing correctly the graphs.
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.
This is a numbered list that describes each of the names defined in the \fBremotehost_list\fP option and the remote values of \fBbase_url\fR and \fBbase_cgi\fR options.
As you can see all these three entries use URLs to designate the location of each remote server. This means that each server most also have been enabled the built-in HTTP server, or have been installed a CGI capable web server like Apache.
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.
This allows to send automatically selected graphs to one or more email addresses. This could be specially useful for some system administrators who prefer receiving via email selected graphs instead of browsing to the remote servers every day.
.P
.BIenabled
.RS
This option enables this feature. Note that you still need to enable the same
option for each time interval you want to activate: \fIdaily\fP, \fIweekly\fP, \fImonthly\fP, \fIyearly\fP.
.P
Default value: \fIn\fP
.RE
.P
.BIurl_prefix
.RS
This is the prefix of the same URL you use to connect to Monitorix. This is needed in order to get the graphs of the same machine.
.P
Default value: \fIhttp://localhost:8080\fP
.RE
.P
.BIsmtp_hostname
.RS
This is the hostname that will be used as a SMTP relay to deliver the automatic email reports.
.RE
.P
.BIfrom_address
.RS
This is the address that will be used as remitent for all the monthly report emails.
.P
Default value: \fInoreply@example.com\fP
.RE
.P
.BIdaily
.br
.BIweekly
.br
.BImonthly
.br
.BIyearly
.RS
The email reports are sent based on the following schedule:
.P
\fIdaily\fP reports will be sent every day at 00:00h.
.br
\fIweekly\fP reports will be sent the first Monday of each week.
.br
\fImonthly\fP reports will be sent the first day of each month.
.br
\fIyearly\fP reports will be sent the first day of each year.
.RE
.P
.BIgraphs
.RS
This is a comma-separated list of graph names you want to appear in the email report. The names are the same as their \fI.rrd\fP files. There is a list of them in the \fBgraph_name\fP option in \fImonitorix.conf\fP.
.P
Default value: \fIsystem, fs\fP
.RE
.P
.BIto
.RS
This is a comma-separated list of recipient email addresses.