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.

Fixing Munin

Discussion in 'cPanel Developers' started by bradandersen, Jul 6, 2007.

  1. bradandersen

    bradandersen Active Member

    Joined:
    Oct 6, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    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
     
  2. bradandersen

    bradandersen Active Member

    Joined:
    Oct 6, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Restart

    You'll also need to restart or reboot:

    /etc/init.d/munin-node restart

    Brad
     
  3. el_zat

    el_zat Active Member

    Joined:
    May 12, 2005
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Buen Post! :cool:
     
  4. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    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
     
  5. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Solved. It was a write permissions problem.
     
  6. gemby

    gemby Well-Known Member
    PartnerNOC

    Joined:
    Feb 16, 2002
    Messages:
    182
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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
     

Share This Page