After spending a few days trying to get the mysql_ plugin working in my munin installation, I’ve decided to write up the process. It include some pointers about troubleshooting and diagnosing problems with the plugin.
Once you have munin and mysql working:
# Save this to /etc/munin/plugin-conf.d/mysql_
You may need to install some perl dependencies:
yum install -y perl-Cache-Cache
Now, test that your new user is able to connect to the db thorough munin. You should not see any mysql errors printed here.
munin-node-configure –suggest 2>&1 | grep mysql
Next, install the suggested mysql plugins:
(munin-node-configure –shell 2>&1 | grep mysql | /bin/bash); service munin-node restart
Finally, you can confirm that the plugin is setup and working properly by testing it by running munin-run and telnet:
telnet localhost 4949
Connected to localhost.
Escape character is ‘^]’.
# munin node at localhost
Connection closed by foreign host.