[pulledquote]As part of Oktobertest I am going to share 5 free tools you can use to monitor your Moodle server. The focus of this post is on load testing but these tools can be (and some should be) used as part of your normal monitoring.[/pulledquote]
Note: this post is aimed towards admins who run their Moodle installation on a Ubuntu Linux server. As usual, this is not meant to be a definitive list or how-to, but rather an introduction to what a Moodle administrator can do to ensure their installation is running smoothly
Monitoring tools
The following tools are listed in increasing order of difficulty of use. I have used them all but I have found that unless I load test, the first 3 tools tend to be enough for me. I ran Zabbix for a while but it requires quite a bit of TLC, which I simply don’t have time for – great tool though. If I had to keep only one tool it would be htop.
Moodle server monitoring tool 1: top
What it does
- By default, the
top
command lists all processes in decreasing order of amount of CPU they use - The
top
command also shows your memory (RAM) status and your overall load average (CPU usage) - Pressing the M key (capital letter) will sort the processes by amount of RAM used (decreasing)
- All figures are updated in real time, so I usually have it running in a window whenever I load test to see how the server performs under specific loads
Installation
- Top should come packaged up with your Linux server, you shouldn’t need to install anything for it to work.
- All you need to do to start it up is type the following command in a terminal window:
sudo top |
If you would like to find out more about all of the options the top
command has to offer, read this excellent article.
Moodle server monitoring tool 2: atop
What it does
- atop is very similar to top but gives you access to more data (network, disk, etc.)
- atop shows usage summaries by all processes e.g. you have access to a summary of all memory, network, CPU (per core) usage
Installation
- If you want to install atop from a package, simply type
sudo apt-get install atop |
- All you need to do to start it up is type the following command in a terminal window:
sudo atop |
If you would like to find out more about all of the options the atop
command has to offer, read this excellent article.
Moodle server monitoring tool 3: htop
What it does
- htop is very similar to top but allows you to sort data more easily
- htop also shows CPU & memory usage in a more user-friendly way
Installation
- If you want to install htop from a package, simply type
sudo apt-get install htop |
- All you need to do to start it up is type the following command in a terminal window:
sudo htop |
If you would like to find out more about all of the options the htop
command has to offer, read this excellent article.
Moodle server monitoring tool 4: Munin
What it does
- Munin presents your server data in easy to read graphs
- Munin can monitor pretty much everything on your server, from CPU usage to MySQL slow queries, etc.
- Munin data is saved in a flat file and historical data can be accessed in the graphs
- Good support community
Installation
Rather than re-write an install guide for Munin, I have compiled all of the resources I used to get Munin up and running smoothly on my VPS
- http://akyl.net/install-munin-ubuntu-1004
- http://ubuntuserverguide.com/2012/08/how-to-install-and-configure-munin-on-ubuntu-server-12-04.html
- http://yorch.org/2010/04/install-munin-on-ubuntu-server/ to enable Apache and MySQL to be monitored
- https://wiki.archlinux.org/index.php/Munin#Removing to remove the MySQL iSAM plugin
You might run into some issues (I did) – here is where you can get an easy fix
- Fixed the Apache module issue with http://serverfault.com/questions/328851/apache-server-status-not-found-check-if-mod-status-is-enabled (look at both answers)
- http://isp-control.net/ispcp/wiki/howto_munin
You can see a screenshot of whole Munin report page here (800KB) – possibly the World’s longest screenshot 🙂
Moodle server monitoring tool 5: Zabbix
What it does
- Zabbix is similar to Munin – it displays server vitals in graphs
- Zabbix also has the ability to send you email alerts should your server reach critical values e.g. disk usage > 80%
- You have the ability to create your own alerts, with custom thresholds
- Zabbix is a full fledged server monitoring solution – you can monitor multiple servers
- Zabbix is best run on its own server as it is MySQL intensive (every piece of data is stored in a database)
Installation
- Preferred way (newer version of Zabbix): http://www.zabbix.com/wiki/howto/install/ubuntu/ubuntuinstall
- Faster way (older version of Zabbix): http://www.brainhemorage.com/2010/08/05/installing-zabbix-on-ubuntu-10-04-lts/
asdasdasdqwe wq asd sd
What? No tools for Windows?
Hi Joseph,
I don’t manage any Moodle installations on Windows and I don’t know much in this area. I am sure there are plenty of good tools out there to monitor Windows servers (maybe even built-in). If you know of any, please post the links here.
Cheers,
Fred
Nice post as always Frederic, but I think you forgot the best of all: sysstat! With the right configuration, it’s verylightweight and may server for long time monitoring, without much hassle to setup.
Hope to see more of your posts in the future!
Thanks Jerônimo, it is an excellent tool indeed. I cannot remember why I didn’t include it in this post. I might revisit in the future.
Cheers,
Fred