Package: munin-node
Version: 1.4.3-2
Severity: normal
Tags: + patch

I upgraded munin packages on several Lenny servers from 1.2.6 (Lenny) to 1.4.3 (Squeeze). I discovered the "old" mysql plugin note on the mysql graphs and created the various plugin symlinks I wanted to use for the new mysql plugin, while leaving the old mysql links intact, running both old/new mysql plugins.

The the new /usr/share/munin/plugins/mysql_ plugin uses the DBD::Mysql perl module (the old one uses mysqladmin), and testing out one of them out, I got:

mshu...@bay:~$ sudo munin-run mysql_connections
DBI connect('mysql;mysql_connect_timeout=5','root',...) failed: Access denied for user 'root'@'localhost' (using password: NO) at /etc/munin/plugins/mysql_connections line 875

I added the following to [mysql*] in plugin-conf.d/munin-node:

env.mysqlconnection DBI:mysql:mysql;mysql_read_default_file=/etc/mysql/debian.cnf

then received:

mshu...@bay:~$ sudo munin-run mysql_connections
DBI connect('mysql;mysql_read_default_file=/etc/mysql/debian.cnf;mysql_connect_timeout=5','root',...) failed: Access denied for user 'root'@'localhost' (using password: YES) at /etc/munin/plugins/mysql_connections line 875

So the connection is still attempting user 'root' with the client password of the debian-sys-maint user, which fails. One more env addition that the new mysql plugin groks got me a successful run:

env.mysqluser debian-sys-maint

I am currently graphing both the old mysql and the new mysql2 graphs successfully - the addition of the 2 lines to plugin-conf.d/munin-node does not seem to interrupt the functionality of the old deprecated plugin, if there are people that continue to use it. Some further validation would be appreciated.

Patch attached.

--
Kind Regards,
Michael Shuler
--- debian/plugins.conf.orig	2010-02-09 08:54:14.000000000 -0600
+++ debian/plugins.conf	2010-02-09 10:23:26.704008243 -0600
@@ -76,7 +76,8 @@
 [mysql*]
 user root
 env.mysqlopts --defaults-file=/etc/mysql/debian.cnf
-
+env.mysqluser debian-sys-maint
+env.mysqlconnection DBI:mysql:mysql;mysql_read_default_file=/etc/mysql/debian.cnf
 
 [postfix_mailqueue]
 user postfix

Reply via email to