Munin - Fix MySQL plugin on Ubuntu 12.04 and Debian 6

02-02-2013 | Remy van Elst

Table of Contents

On Ubuntu and Debian (12.04/6) the munin plugins which graphs mysql by default gives the following error:

Missing dependency Cache::Cache at /usr/share/munin/plugins/mysql_ line 716.

This is because a Perl cache package is needed. In the repositories there are two of those packages. Install them both:

## Execute as root
apt-get install libcache-{perl,cache-perl} 

Now generate the munin plugin config again:

## Execute as root
munin-node-configure --suggest --shell | sh

And restart the munin-node service:

## Execute as root
/etc/init.d/munin-node restart

The graphs should now appear. If not, you might need to manually symlink the munin mysql plugins from /usr/share/munin/plugins/ to /etc/munin/plugins/.

If you need to define another user for MySQL, configure /etc/munin/plugin-conf.d/munin-node with the following settings:

user root
env.mysqluser monitoring
env.mysqlpassword MyOwnSuperSecretPassword

Altough on Ubuntu and Debian this should run via the debian maintenance user.

Tags: debian, monitoring, munin, mysql, ubuntu,