bradandersen

Active Member
Oct 6, 2003
42
0
156
Hello,

Here is how you fix Munin 1.24 for CPanel to get the mysql graphs, the HDD temp graphs, and the Mailman graphs:

First, you must edit your /etc/munin/plugin-conf.d/cpanel.conf file to look like this:

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

[exim_mailqueue]
group mail

[exim_mailstats]
group mail

[mailman]
user mailman

[hddtemp_smartctl]
user root
group root

Next, edit /etc/munin/plugins/mailman and change the line:

$pos=undef;

to

$pos=0;

I also touched 'touch /var/lib/munin/plugin-state/munin-mailman-log.state'

Finally, if exim stats fail and you've made changes or restarted you need to remove the state file at /var/lib/munin/plugin-state/plugin-exim_mailstats.state

Good luck,
Brad
 

Kent Brockman

Well-Known Member
Jan 20, 2008
1,237
44
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Hi, I'm trying to make Munin work fully but when I change $pos=undef; to $pos=0; in /etc/munin/plugins/mailman, Munin logs correctly the mailman data ONLY ONCE and after that it simply stops registering data from all other plugins too! Even if I revert the changes to the variable $pos, it will simply not log anything anymore. (I had to reinstall Munin in order to make it work back again)
I cannot figure out why this happens. I'm running cPanel 11.24.4-S36281 with CentOS 4 on Virtuozzo with the Munin 1.2.4 from WHM plugins.
Any ideas?


Also, how can I avoid Munin to log things like swap? I noticed that simply erasing the swap symbolic link in /etc/munin/plugins (which links to the real swap plugin at /usr/share/munin/plugins ) makes Munin stop registering data from all other plugins too.

Regards
 

Kent Brockman

Well-Known Member
Jan 20, 2008
1,237
44
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Also, how can I avoid Munin to log things like swap? I noticed that simply erasing the swap symbolic link in /etc/munin/plugins (which links to the real swap plugin at /usr/share/munin/plugins ) makes Munin stop registering data from all other plugins too.
Solved. It was a write permissions problem.
 

gemby

Well-Known Member
PartnerNOC
Feb 16, 2002
182
0
316
Pula, Croatia
cPanel Access Level
DataCenter Provider
This should fix it permanently

Code:
# munin mysql fix
touch /etc/munin/plugin-conf.d/mysql.conf
echo -e "[mysql*]\nuser root\ngroup wheel\nenv.mysqladmin /usr/bin/mysqladmin\nenv.mysqlopts --defaults-extra-file=/root/.my.cnf" > /etc/munin/plugin-conf.d/mysql.conf
/etc/init.d/munin-node restart