Munin is a nice tool to monitor your Linux server.
It can show you a whole lot of information in graphs, and everybody likes graphs! They look cool and sometimes they even give you some information!
If you are running Ubuntu / Debian, it’s extremely simple to set up Munin and get it running.
Let’s assume that we have a server called nerdrage.org and we want to monitor that.
First we install Munin using apt-get
sudo apt-get install munin munin-node
With munin and munin-node installed, we would like to edit the configuration file which is in /etc/munin/munin.conf.
From here we can set the output directory and we also want to set a server name.
vi /etc/munin/munin.conf
Here we want to change htmldir (this is where munin puts the fancy graphs) and we also want to change [server1.example.com] to your own server name (for example www.nerdrage.org).
The rest of the settings we don’t have to worry about at this point.
dbdir /var/lib/munin
htmldir /var/www/www.nerdrage.org/munin
logdir /var/log/munin
rundir /var/run/munin
tmpldir /etc/munin/templates
[server1.example.com]
address 127.0.0.1
use_node_name yes
Then we create the output directory for munin
sudo mkdir /var/www/www.nerdrage.org/munin
And change the ownership so munin can write to the directory
sudo chown munin:munin /var/www/www.nerdrage.org/munin
And finally we restart the service
sudo /etc/init.d/munin-node restart
After a few minutes you can go to the address that you specified in the configuration file (in this case http://www.nerdrage.org/munin) and see some fancy graphs!
