arabws

Member
Dec 28, 2006
8
0
151
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 ??
 

markfrompf

Well-Known Member
Mar 27, 2006
176
0
166
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.
 

twhiting9275

Well-Known Member
Sep 26, 2002
560
27
178
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
 

arabws

Member
Dec 28, 2006
8
0
151
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


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 :)
 

Rooter

Well-Known Member
Apr 23, 2003
146
1
168
Houston, Texas, U.S.A.
cPanel Access Level
Root Administrator
Empty/Blank MySQL Stats/Graphs in Munin

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
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. :)