The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Munin not show MySQL graphs

Discussion in 'cPanel Developers' started by arabws, Dec 28, 2006.

  1. arabws

    arabws Member

    Joined:
    Dec 28, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Munin not show MySQL graphs after i make "Reset Local MySQL Root Password" in WHM.

    but i can see all other graphs.

    how can i back it to show MySQL graphs ??
     
  2. markfrompf

    markfrompf Well-Known Member

    Joined:
    Mar 27, 2006
    Messages:
    176
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles, CA
    Try the following:
    - Try restarting MySQL.
    - Give Munin some time to do its thing.

    - Restart the server if the above two didn't work.
     
  3. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Make sure that the password in /root/.my.cnf is valid, first.
    Secondly, I have had this problem off and on for months with munin installs. To resolve it, this is what I did:

    in /etc/munin/plugin-conf.d , you will see a file called cpanel.conf . Modify it completely to look like so:

    Code:
    [mysql*]
    user root
    group wheel
    env.mysqlopts --defaults-extra-file=/root/.my.cnf
    [exim_mailqueue]
    group mail
    
    [exim_mailstats]
    group mail
    
    [mailman]
    user mailman
    
    then restart munin
    Code:
    /etc/init.d/munin-node restart
    
    This tells munin to pull the mysql environment from the file necessary
    Of course , in this case you will need munin to run as ROOT. To do this:
    su to your munin user
    Code:
    su munin
    
    remove the munin crontab
    Code:
    crontab -e
    remove the line, or just add an # to the beginning of it
    
    then exit out of the shell, and add the SAME crontab (that was in the munin user) to root, adding --force-root to the end of the statement, so it'd be something like:
    Code:
    */5 * * * * /opt/munin/bin/munin-cron --force-root
    
    Please note that this is NOT the exact entry, as I have my munin collection server on a non cp server, but this works for CP setups as well

    Good luck
     
  4. arabws

    arabws Member

    Joined:
    Dec 28, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1


    when I remove the munin crontab and add it to root crontab munin not work.

    I back it and munin work and mysql work.

    just I add

    Code:
    env.mysqlopts --defaults-extra-file=/root/.my.cnf
    in cpanel.conf and it's work



    thanks :)
     
  5. arabws

    arabws Member

    Joined:
    Dec 28, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    No, I back it to the old.

    what will --force-root option do if i add it ?
     
  6. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Did you add the --force-root option?
    Either way, good to ehar it's working for you now.
     
  7. Rooter

    Rooter Well-Known Member

    Joined:
    Apr 23, 2003
    Messages:
    146
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    Root Administrator
    Empty/Blank MySQL Stats/Graphs in Munin

    I confirm that upon adding "env.mysqlopts --defaults-extra-file=/root/.my.cnf" to "/etc/munin/plugin-conf.d/cpanel.conf" as shown above, then restarting munin-node, Munin began to display MySQL statistics without performing the other additional steps. To reiterate for other people, however, it will take time for the MySQL statistics data to accumulate. :)
     
Loading...

Share This Page