System monitoring with munin
Sometimes it's nice to be able to glance at a graph and see a trend such as how the server handles the Friday rush. Exactly when is the swap space being utilised? Is mysql using cached queries?
Munin goes a long way to answering these questions with easy to read graphs and charts.
The install and configuration of munin is very simple and should take no more than a couple of minutes.
We start by installing munin and some preconfigured nodes:
sudo apt-get install munin munin-node
Well, that's the install done.
To configure munin, open the config file with your favourite text editor:
sudo nano /etc/munin/munin.conf
Make a note of the htmldir. The default entry is:
htmldir /var/www/munin
The only line you would want to change at this stage is if you want to be notified of changes. Uncomment the following line and enter a relevant email address:
#contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm
Well, that's the configuration done.
Restart munin:
sudo /etc/init.d/munin-node restart
To navigate the output, use an existing domain and create a 'munin' folder. As such, create a link from the htmldir you noted earlier to your domain's munin folder:
ln -s /var/www/munin/ /home/paul/public_html/mydomain.com/public/munin
My advice would be not to actually call the public folder 'munin'. Pick something else as this helps stop casual scans of known application names.
Now comes the difficult part: you have to wait a few minutes for the output to be generated...... Navigate to your 'munin' folder, e.g:
http://www.mydomain.com/munin
You will be presented with:
Clicking 'localdomain' will give a choice of variables to examine:
Select an option and after a few hours you will start to see something like this:
As that came from my test server, not a lot's happening but you get the idea.
Final thing is to password protect the 'munin' directory.
If you use Litespeed please reference the Litespeed .htpasswd protection article but it's very easy to do:
Add a new static 'context' to the Virtual Host - add '/munin/' to the url field, 'yes' to accessible and add a realm:
Apply changes and restart the server. Now you have a password protected munin install.
PickledOnion
Digg it |
del.icio.us |
reddit |
StumbleUpon

Subscribe to Feed
Article Comments:
Roland Halder 07 Aug, 2007
Just did a test install - after installing ruby according to your ubuntu-setup-page-3.
I didn't want to install apache just for munin and used a simple default webrick script - works fine for my purpose.
Sure I need to add security ...
Thanks for the fine post!
Roland