Monitoring a VPS with munin

I’ve been looking round for something simple and light-weight to monitor my 2 VPS’s. I wanted to see cpu, memory, disk usage output to a web page with graphs.

Munin looks quite good so I though I’d have a go at installing that.

Installation on Ubuntu couldn’t have been easier, just –

apt-get install munin-node munin

and it was done.

That created a folder called /var/www/munin so this has to be accessible through your current web server config or you might need to change a few things.

I’m running Apache and had to create a site file pointing to that folder. I created the file – /etc/apache2/sites-available/munin which looks like this –

<VirtualHost *>
        ServerAdmin [email protected]
        ServerName aaaa.co.uk

        DocumentRoot /var/www/munin/
        <Directory /var/www/munin/>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.munin.log
        LogLevel warn

        CustomLog /var/log/apache2/access.munin.log combined
        ServerSignature Off
</VirtualHost>

And then link to it in the sites-enabled folder

ln -s /etc/apache2/sites-available/munin /etc/apache2/sites-enabled/munin

and then reload Apache

/etc/init.d/apache2 reload

and it was good to go.

You can alter which statistics are collected just by deleting the symbolic links in

/etc/munin/plugins

You can always link to the plugins again in /usr/share/munin/plugins/ if you want to enable them in the future

If you do delete some links don’t forget to restart the munin-node process –

/etc/init.d/munin-node restart

For an example of what sort of graphs you get with munin have a look here. This is a live munin site.