Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank

through WebHost Manager (WHM) has added the Munin Service Monitor as easily installed plugin to monitor the web host and check the capacity of resources available.

Easily install, Munin version 1.24 works immediately once webmaster installs it on the server through cPanel/WHM, and start checking and capturing various resources’ usage reading, including MySQL nodes such as MySQL throughputs, MySQL queries, MySQL Slow Queries, and MySQL threads. However, if you restart the server, Munin will fail to monitor MySQL nodes. No information is capture, and the graphs is no longer updated with statistics and appears blank. Sometimes, the MySQL graphs blank symptom may happen even when web server is not rebooted.

The error is due to a bug in a Perl library Munin uses which causes $PATH variable to be lost, and then causes the plugin cannot find the mysqladmin program which it needs to retrieve the numbers to populate in the graphs. Uninstall and reinstall Munin Service Monitor may make it works again, however, a more permanent solution is to hardcode the path of the program, which will fix the problem. Here the guide on how to specify the path to mysqladmin to Munin.

Fix for Munin installed by cPanel/WHM

  1. Determine where is mysqladmin program located with the one of the following command:

    which mysqladmin
    type mysqladmin
    locate mysqladmin

    If should return a path to mysqladmin which looks similar or the same to /usr/bin/mysqladmin.

  2. Edit the /etc/munin/plugin-conf.d/cpanel.conf Munin configuration file, and modify the [mysql*] to look like below:


    [mysql*]
    user root
    group wheel
    env.mysqladmin /usr/bin/mysqladmin
    env.mysqlopts --defaults-extra-file=/root/.my.cnf

    Ensure the env.mysqladmin value is path returned by step above. Also ensure that /root/.my.cnf contains correct root password to the MySQL databases.

  3. Then restart Munin service:

    /etc/init.d/munin-node restart

  4. Wait a while for MySQL statistics to be gathered, and check the graphs again.

Fix for Host or Server without cPanel Control Panel

Simply add the “env.mysqladmin /usr/bin/mysqladmin” (ensure that the path is correct according to your system) to the /etc/munin/plugin-conf.d/munin-node file will do the trick, according to Munin FAQ.

  • Email, SSL
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

[cPanel] Fix Bandwidth Logs on all users

To run/fix all users Web logs (Bandwidth Fix) run the following command from root SSH...

Configuring Apache to use mod_expires

mod_expires it will caches the page content to the visitors temporary files it may reduce on your...