Index

General

Development

Troubleshooting

General

What is the Monitorix tool?

Monitorix is a free, open source, lightweight system monitoring tool designed to monitorize as many services as possible. At this time it monitors from the CPU load and temperatures to the users using the system. Network devices activity, network services demand and even the devices' interrupt activity are also monitored.

Monitorix is extremely easy to install. If you already have a running web server with Perl installed, it shouldn't take you more than 10 minutes to get Monitorix running.

It is written in Perl (using RRDtool's RRDs.pm module) and will require a working web server supporting CGI scripts (such as Apache). The following versions are recommended:

  • Perl 5.6 or later.
  • RRDtool version 1.0.41 or later (including 1.2.1 and above).

Where can I get Monitorix?

Monitorix can be freely obtained from the project official website at http://www.monitorix.org.

Can I use it for comercial purposes?

Yes. Monitorix is an open source project and it is released under the GNU License. This license allows you to use the source code free of charge in your commercial products. You don't have to tell us about your products. But, we are happy if you inform us of the usage of Monitorix. Please see the License section.

Who is the author of Monitorix?

Jordi Sanfeliu is the primary author of Monitorix.

What are the right steps to upgrade Monitorix?

When a new Monitorix version is released and once you had already downloaded it, you may just follow the same steps you'd do it to upgrade practically any other application:
# service monitorix stop
Stopping Monitorix:                                        [  OK  ]

# rpm -Uvh monitorix-n.n.n.noarch.rpm 
Preparing...                ########################################### [100%]
   1:monitorix              ########################################### [100%]

# service monitorix start
Starting Monitorix:                                        [  OK  ]
      
Only on those cases when the new version comes with some new changes in the monitorix.conf configuration file, you'll see the following output:
# rpm -Uvh monitorix-n.n.n.noarch.rpm 
Preparing...                ########################################### [100%]
   1:monitorix              warning: /etc/monitorix.conf created as /etc/monitorix.conf.rpmnew
   ########################################### [100%]
      
In such cases please take some time to compare your current configuration file and adapt the new changes on it.

WARNING. If you are using the install.sh instead the .rpm package, just backup your current /etc/monitorix.conf before execute the install.sh script.

Can be used in non Linux systems?

Monitorix was initially made to be fully Linux dependant, but since the 0.8 version the code was prepared to be easier portable to different Linux distributions and even to other UNIX systems like FreeBSD.

Where can I find more documentation about the options in the configuration file?

For more information about how to configure the options in monitorix.conf check the Configuration.help file.

Once started there's no Monitorix process, is this correct? so how it can get statistics?

Monitorix is a cron-based tool. It means that once it has been started it creates a /etc/cron.d/monitorix.sh file that will be executed by crond every minute.

When Monitorix is stopped it just removes it. That's how Monitorix collects data.

What about the .rrd files in /var/lib/monitorix, it's expected that they will grow every day?

Don't worry about the RRD files in /var/lib/monitorix they are sized during their creation and the sizes will remain the same during all the time. That's a feature of RRDtool.

I have a lot of servers, how can I use Monitorix to centralize the statistics?

If you plan to use Monitorix on several servers you will want to use the Multihost feature as you can see in this Monitorix screenshot.

Here are the steps to setup the Multihost feature.

You need to install Monitorix in each server you want monitorize and once installed decide from what machine you plan to monitorize all the other machines, and then modify the following options only in its /etc/monitorix.conf file:

our $MULTIHOST="Y";
      
This will enable the Multihost feature on that machine and it will prepare a suitable web main-page to select your defined servers. Alternatively you can adjust the other Multihost feature related options (that's optional):
our $MULTIHOST_FOOTER="Y";
our $MULTIHOST_IMGPERLINE="2";
      
The first one will show in the bottom line of each graph the URL of the server. If you think this can be dangerous or not recommendable in your LAN, just switch it to "N".

The second one is the number of graphs that will appear on each line while monitorizing the servers. The default is 2 and is a good choice for resolutions up to 1280x1024 to avoid scrolling. For bigger resolutions you can try other values. The more resolution you have, the more images per line you'll like to choice.

Finally you need to specify the list of servers you plan monitorize, and you can create such list below in the same configuration file. Like this:

# List of Servers
our @SERV_LIST=("Main Server Linux", "http://linux.mydomain.lan",
		"MySQL Linux", "http://192.168.1.4",
		"Samba Linux", "http://192.168.1.5",
		"SMTP Linux", "http://21.16.11.244:8080");
      
After applying those configurations just restart the Monitorix service and point your browser to your main machine from where you planed to monitorize the rest of servers, that is, the same machine where you had configured the /etc/monitorix.conf file.

In the Monitorix main page you'll see you'll be able to select you defined servers individually or collectively using All hosts option. The rest is sufficiently auto-explanatory. ;-)

In Multihost feature, why do I get only the CPU graph of the selected machine even when I've actually choosen the "All Graphs" option?

That's a very common question.

As you already know, in the main page of Monitorix there are two list-boxes. The one in the left side is to choose the hostname(s), and the one in the right is to choose the graph.

When Multihost feature is disabled the only option in the left side is Localhost. That's right because there isn't any other hostname defined. So, in this case one can choose All graphs option (in the right list-box) and see the results of all graphs of his hostname in the same page in a well structured layout.

But when the Multihost feature is enabled, you can see that it appears more options in the left list-box. That's right too because it appears the hostnames you've defined in the monitorix.conf file. I mean, all the hostnames that you are about to monitorize.

Now imagine that with the Multihost feature enabled, someone chosen All hosts (in the left) and All graphs (in the right). That's would be really a big mess!. I don't think that someone would want all this information in the same page.

Because I don't use use Javascript in the main page, it is really difficult for me to implement an automatic logic with HTML to avoid the use of the All graphs option in such circumstance. So I decided that when that happens, the All graphs option takes the same functionality as if the CPU load option had chosen.

That's the reason why you get the same results choosing any of two options in the right, when you chose All hosts in the left.

How should I interpret the Memory Allocation graph?

First of all, the red color in the graph doesn't means that something is going bad.

In Linux systems the term Used includes memory used by the user applications, the I/O buffers, and other types of cache. The importance here is that the user applications have enough memory all the time, otherwise people tends to complain as soon as they see their applications running slower. To accomplish this, the Linux kernel balances its memory between buffers, cache and user applications, having the later the higher priority when they need more memory.

So, you should expect to see all the time the memory Used as higher as possible, which will means that your system is correctly using all its memory for all the purposes, including disk buffers and reducing the number of disk reads and at the same time, extending the life of your disk.

We can conclude that all the memory that is not being used by the user applications, is free. So, in order to know how much of free memory the system has, you must add the amount of memory in green and white colors, because they are used by the buffers and cache. Or said in the other way around, the less red color you see in the graph, the more free memory your system has, and in consequence meaning you purchased more memory than needed. ;-)

Development

Is there a developer's email list for Monitorix?

Not at this time, but you can contact with me here.

Is there an IRC channel for Monitorix?

Yes. There is a channel at Freenode called #monitorix. You can find me there to discuss about help, bugs and enhancements.

Troubleshooting

I just installed Montorix but I don't see any activity.

The Monitorix graphs takes a few minutes to start showing activity. Please be patient.

I just installed Monitorix but the graphs are not visible. What's going on?

If you only see the skeleton page without the graphs that probably means that your web server (Apache) don't have enough permissions to write into the $BASE_WWW/monitorix/imgs directory. Check that.

When I start Monitorix I get the error: print() on closed filehandle OHTML at /usr/sbin/monitorix.pl line NNN. readline() on closed filehandle IHTML at /usr/sbin/monitorix.pl line NNN.

Everytime Monitorix is started it creates the index.html file according the changes you had made in its configuration file. This error occurs during the creation of such index.html file based in the path $BASE_WWW/monitorix.

Although the install script had asked you which Linux distribution or Operating System are you using, don't figure it had setup all the paths for you. So, please check if your current /etc/monitorix.conf has the correct paths for your Operating System.