1

I installed this Munin MySQL plugin on a RHEL 6 machine and I'm experiencing a strange behavior.

I'm not getting any data in the Munin web page (the Categories list does not show a mysql link), but I'm not receiving any error neither. All other graphs (disk, processes, system, etc) work fine.

munin-run mysql and munin-run mysql config print absolutely no output and exit with zero status. Running munin-run with any other plugin works fine.

The Munin logfile shows no error:

2016/04/20-14:40:01 CONNECT TCP Peer: "[10.10.10.20]:33967" Local: "[10.10.10.15]:4949"
2016/04/20-14:45:02 CONNECT TCP Peer: "[10.10.10.20]:49531" Local: "[10.10.10.15]:4949"
2016/04/20-14:50:02 CONNECT TCP Peer: "[10.10.10.20]:59469" Local: "[10.10.10.15]:4949"

The mysql logs show no error neither.

What might be wrong with it?

I installed the same plugin a couple months ago on a CentOS 7 machine in pretty much the same way and it's working perfectly.

dr_
  • 28,763
  • 21
  • 89
  • 133

1 Answers1

2

Found the problem. The autoconf option of the plugin reported this error:

[root@linuxbox ~]# /usr/share/munin/plugins/mysql_ autoconf
no (DBI connect('mysql;mysql_connect_timeout=5','root',...) failed: Access denied for user 'root'@'localhost' (using password: NO))

Then I realized /etc/munin/plugin-conf.d/munin-node was missing the mysql plugin configuration:

[mysql*]
user root
group wheel
env.mysqladmin /usr/bin/mysqladmin
env.mysqlopts -umunin -pp4ssw0rd

where munin is the MySQL user (with password p4ssw0rd) that fetches the data from the MySQL server.

Once this was put in place, the plugin started working.

Edit: It might be necessary to check that /etc/munin/plugin-conf.d/mysql.conf contains the correct credentials as well.

dr_
  • 28,763
  • 21
  • 89
  • 133