I installed munin-node
on CentOS 7. The default plugin to monitor system resources is working fine. I followed the steps online to enable the mysql_
plugin. However, I’m encountering the following error:
> sudo munin-run --debug mysql_
# Skipping systemd properties simulation due to lack of permissions.
# Processing plugin configuration from /etc/munin/plugin-conf.d/00-default
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/mysql
# Setting /rgid/ruid/ to /4257/498/
# Setting /egid/euid/ to /4257 4257/498/
# Setting up environment
# Environment mysqlpassword = password
# Environment mysqlconnection = DBI:mysql:information_schema;mysql_read_default_file=/etc/my.cnf
# Environment mysqluser = munin
# Environment mysqladmin = /usr/bin/mysqladmin
# About to run '/etc/munin/plugins/mysql_'
Unknown graph at /etc/munin/plugins/mysql_ line 1805.
It seems to be an issue with the plugin code itself. Has anyone else encountered a similar issue and/or has a fix?
Setup steps
$ sudo yum install munin-node
$ sudo ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_
- Create
/etc/munin.plugin-conf.d/mysql
with:
[mysql*]
env.mysqlconnection DBI:mysql:information_schema;mysql_read_default_file=/etc/my.cnf
env.mysqluser munin
env.mysqlpassword munin
- Create munin user in MySQL:
CREATE USER 'munin'@'localhost' IDENTIFIED BY 'munin';
GRANT PROCESS, SUPER ON *.* TO 'munin'@'localhost';
GRANT SELECT ON mysql.* TO 'munin'@'localhost';
FLUSH PRIVILEGES;
$ sudo systemctl restart munin-node
2
Answers
The default MySQL plugin shipped with the
munin-node
installation didn't work for us (with the error mentioned in the original post).Instead, we found this alternate plugin that worked of us:
https://github.com/kjellm/munin-mysql
As CentOS 7 uses systemd, you'll have to change the line in the Makefile that's
$(MUNIN_NODE) restart
tosystemctl restart munin-node
.Hopefully, this helps others that may encounter the same issue we did.
I had the same problem with munin 2 on CentOS 7.7.
mysql_ and mysql_connection didn’t work, but mysql_connections is working fine, I don’t know why, but these steps made it work for me.
Step 1: Change symbolic link name
Step 2: Update config file, in my case, it is /etc/munin/plugin-conf.d/munin-node (path depends on your system)
Step 3: Test with –debug option
If there is any error like
installing additional package will fix it.