The tool Munin offers an easy way to monitor a webserver. It comes along with a lot of features like monitoring disk and memory usage, the CPU, the fork rate of new processes and much more. The monitored data is accessible by the web browser. The setup of Munin takes only a few minutes.
First you have to install Munin. In Fedora Linux this can be done via YUM:
yum install munin munin-node
Once installed you have to edit the configuration file /etc/munin/munin.conf (The default file contains a lot of comments). For a basic setup you can add the following lines:
In this case “/var/www/html/” has to be the HTML directory of you webserver. What is missing now is to create the HTML directory for Munin and set the correct permissions:
mkdir -p /var/www/html/munin
chown munin:munin /var/www/html/munin
The monitoring is running now. The results can be accessed by the webbrowser:
By default there is a .htaccess password protection for this page activated. You can either remove the file /var/www/html/munin/.htaccess or create a username password combination like follows:
You can create the required password file (usually /etc/munin/munin-htpasswd, it is quoted in the .htaccess file) like follows
htpasswd -c /etc/munin/munin-htpasswd Admin
Where Admin is the username. You will be asked for the password in a prompt.
Munin produces intuitive graphs of the monitored resources like the following one: