Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank

MuninMunin is a monitoring tool used to survey and monitor the performance of computers, networks, SANs, applications, databases, weather measurements and other parameters. Munin remembers and records information it captured and presents them in graphs through a web interface. cPanel, 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.

8 Responses to “Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank”

  1. Mr PHP
    September 16th, 2009 09:31
    8

    works perfect. thanks for your time posting this!

  2. Sahel
    July 9th, 2009 14:54
    7

    Didnt work for me .. still no data showing

  3. Marco
    November 5th, 2008 20:32
    6

    hi all, play with mysql monitoring tool. then look what i have found monyog. simply rocks!!!

  4. tomek
    January 25th, 2008 08:40
    5

    sweetness.

    now if you could only post the same for apache ;)

    thx lots,

    tomek.

  5. Pierre Labrie
    October 10th, 2007 22:18
    4

    It works fine in my environment without cPanel Control Panel. I had the same problem on a machine and your procedure worked.

  6. admin
    September 25th, 2007 01:30
    3

    Why not try it out and let us know if it works?

  7. mahmoud
    September 24th, 2007 23:23
    2

    thank you for this kind article.

    YET, /root/.my.cnf is only a shortcut.

    am lost here ?

  8. tri m s
    August 29th, 2007 02:32
    1

    Create a MySQL user with a password that is NOT granted privilege to any DB is safer than point it directly to /root/.my.cnf

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to My Digital Life Comments RSS feed to receive notification of latest comments posted.

New Articles

Incoming Search Terms for the Article

munin mysql - munin mysql plugin - mysql munin - munin mysql password - cpanel munin mysql - munin cpanel mysql - mysql munin cpanel - munin could not connect to mysql - munin mysql - CPanel Munin - munin mysql slow queries - munin mysql queries - cpanel mysql munin - munin mysql plugins - munin mysqladmin not found - munin mysql monitor - env.mysqlopts - munin node mysql - mysql munin plugin - munin mysql user - munin mysql cpanel - Unknown graph mysql munin - munin mysql config - munin mysql error - freebsd munin apache2 plugin - configure mysql munin - munin empty graphs - munin mysql could not connect - munin mysql nan - munin slow queries - munin-node mysql_queries - munin mysqlopts - munin mysql howto - env.mysqladmin - munin mysql slow query - munin no graphs - munin missing mysql graph - munin enable mysql - munin plugin mysql - mysql monitoring munin - munin mysql_queries configuration - mysql queries munin - munin mysql not showing - monitor mysql munin - cpanel munin mysql empty - munin mysql cat /root - install munin cpanel - munin "could not connect to mysql" - munin mysql root password - munin mysql_queries password -