Let Munin monitor your servers and network
If you are looking for an easy to install, configure, and use systems monitor, look no further. The Munin is a network/systems monitor that presents all its data is easy to read graphs.
Munin is setup as a server/client (or node) which makes this system very flexible. Munin also offers an extensive plugins library that extends that flexibility to include the monitoring of many various systems and even applications.
And what's best is you don't have to jump through a bunch of hoops to get munin up and running. In this tutorial you will see how to get your Munin server up and running and monitoring your system and a sample client configuration that will monitor a client node. As you might expect, I will continue to build upon the Ubuntu Server series and install Munin on a Ubuntu 9.04 installation. NOTE: This same installation will work on Ubuntu 9.10 as well.Server installation/configuration
Installing Munin on the Ubunter server is simple. Open up a terminal window (or log into your server console) and issue the command:
sudo apt-get install munin
The above command will also install munin-node which is the client-side software. This is fine, so let it happen. Upon installation Munin will install the configuration files in /etc/munin, the executable in /etc/init.d/, and the web files in /var/www/munin.
The first thing that will need to be done is to configure your server correctly. Open up the /etc/munin/munin.conf file and look for this section:
dbdir Â Â /var/lib/munin
htmldir Â Â /var/www/munin/
logdir Â Â /var/log/munin
rundir Â Â /var/run/munin
Out of the box, this will work just fine. Â But if you have any other needs that would dictate any of these directives change, change them here.
The next section to look for is this:
# a simple host tree
What the above section does is monitor the server Munin is installed on. This configuration only needs to change if you have specific requirements. Also, if you need to add a client (node), this is where you add it.
In order to instruct Munin to monitor a remote machine you need to add a new host tree. Say, for instance, you want to monitor a machine on the IP addres 192.168.1.150. To do this you would add:
Where MACHINE NAME is a name to indicate the job (or user, or department, etc) of the machine.
Once you have these configurations and save the file. Now to move on to the /etc/munin/munin-node.conf file. There is only one configuration you would need to add in order to monitor nodes. Look for this line:
Beneath this line you will want to add (in order to enable our new node):
Save this file and restart the Munin server with the command:
Installing for client
All you need to do for your client is to install the munin-node package. To do this issue the command:
sudo apt-get install munin-node
On the client machine. Now start munin-node with the command:
sudo /etc/init.d/munin-node start
Munin will begin to monitor this client now.
When all is up and running, point your browser to http://ADDRESS_TO_SERVER/munin/
Where ADDRESS_TO_SERVER is the actual address of the server. Very shortly after you install Munin you may only see a listing of the nodes being watched (see Figure 1). This is okay, it will take some time before data is actually collected.
After a while you will notice data collected and graphs developing. If you click on the localhost.localdomain link you will see data beginning to collect (see Figure 2).
Munin is a very powerful tool that allows you to gather crucial data about your systems and networks. Now that you have Munin installed and running you can begin to extend the server by adding more and more clients as well as plugins. You will quickly find Munin to be a very valuable tool for data analysis on your various systems and networks.Advertisement