Skip to main content

Raymii.org Raymii.org Logo

Quis custodiet ipsos custodes?
Home | About | All pages | Cluster Status | RSS Feed

Munin - Fix MySQL plugin on Ubuntu 12.04 and Debian 6

Published: 02-02-2013 | Author: Remy van Elst | Text only version of this article


❗ This post is over twelve years old. It may no longer be up to date. Opinions may have changed.

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.

Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below. It means the world to me if you show your appreciation and you'll help pay the server costs:

GitHub Sponsorship

PCBWay referral link (You get $5, I get $20 after you've placed an order)

Digital Ocea referral link ($200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!)

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:

[mysql*]
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 , snippets , ubuntu