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.

[Cases 47292, 47314] Sweet Munin Update!

Discussion in 'General Discussion' started by fkatzenb, Feb 17, 2011.

  1. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
    Nice push... thanks!
     
  2. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
    Can anyone remind what the fix is to keep exim from zipping the logs so munin continues to work with exim? Thanks!
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    It is likely that you have /etc/logrotate.conf set to compress for this section of it:

    Code:
    # uncomment this if you want your log files compressed
    compress
    If that isn't set to allow compression, then I'm not certain how only exim is being compressed unless you've defined a special one for exim itself. cPanel itself doesn't define the exim logs rotation, since WHM > cPanel Log Rotation Configuration area doesn't have exim listed.

    Thanks.
     
  4. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
    Thanks! I remember now. This is a new server and I forgot what I did to make it work.
     
  5. handsonhosting

    handsonhosting Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Omaha, NE
    cPanel Access Level:
    Root Administrator
    Saw the update on some servers and not on others.

    Anyone have the command handy for forcing the munin update from the command line?
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you have the following selected in WHM > Manage Plugins for Munin?

    If you do and it isn't the newest, simply try saving the area. If that doesn't work, you might try a forced cPanel update:

    Code:
    /scripts/upcp --force
     
  7. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Code:
    /usr/local/cpanel/whostmgr/bin/whostmgr2 --updateaddons
    
     
  8. LDHosting

    LDHosting Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    93
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    We're having some trouble getting the exim mail stats to work following the update. It always used to work but now the graph is blank.

    Calling it via munin-run outputs letters rather than a numerical value

    Code:
    # munin-run exim_mailstats
    received.value JC
    completed.value JD
    rejected.value BMK
    and calling the module directly outputs what looks like perl errors

    Code:
    # /usr/share/munin/plugins/exim_mailstats
    Use of uninitialized value in string eq at /usr/local/lib/perl5/5.8.8/x86_64-linux/lib.pm line 30.
    Empty compile time value given to use lib at /usr/share/munin/plugins/exim_mailstats line 74
    Use of uninitialized value in -e at /usr/local/lib/perl5/5.8.8/x86_64-linux/lib.pm line 37.
    Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/5.8.8/x86_64-linux/lib.pm line 97.
    Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/5.8.8/x86_64-linux/lib.pm line 98.
    Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/5.8.8/x86_64-linux/lib.pm line 99.
    Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/5.8.8/x86_64-linux/lib.pm line 100.
    Use of uninitialized value in hash element at /usr/local/lib/perl5/5.8.8/x86_64-linux/lib.pm line 60.
    Use of uninitialized value in require at /usr/share/munin/plugins/exim_mailstats line 75.
    Use of uninitialized value in require at /usr/local/lib/perl5/site_perl/5.8.8/Munin/Plugin.pm line 69.
    Use of uninitialized value in require at /usr/local/lib/perl5/site_perl/5.8.8/Munin/Common/Defaults.pm line 9.
    Use of uninitialized value in require at /usr/local/lib/perl5/5.8.8/Exporter.pm line 17.
    Use of uninitialized value in require at /usr/local/lib/perl5/site_perl/5.8.8/Munin/Common/Defaults.pm line 10.
    Use of uninitialized value in require at /usr/local/lib/perl5/5.8.8/File/Basename.pm line 44.
    Use of uninitialized value in open at /usr/local/lib/perl5/site_perl/5.8.8/Munin/Plugin.pm line 303.
    received.value U
    completed.value U
    rejected.value U
    Use of uninitialized value in -l at /usr/local/lib/perl5/site_perl/5.8.8/Munin/Plugin.pm line 273.
    Use of uninitialized value in -l at /usr/local/lib/perl5/site_perl/5.8.8/Munin/Plugin.pm line 273.
    Use of uninitialized value in -l at /usr/local/lib/perl5/site_perl/5.8.8/Munin/Plugin.pm line 273.
    Use of uninitialized value in open at /usr/local/lib/perl5/site_perl/5.8.8/Munin/Plugin.pm line 277.
    Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.8.8/Munin/Plugin.pm line 277.
    exim_mailstats: Could not open statefile '' for writing: No such file or directory
    Have tried reinstalling Munin from WHM but no luck. Any ideas?
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    Would you be able to follow the steps in this discussion and let us know the results?

    View topic - Problem with exim_mailstats on FreeBSD :: For Linux & Unix Server Administrators and Developers :: BlueQuartz.US

    It has the same error when trying to run the command in root:

    Code:
    Empty compile time value given to use lib at /usr/share/munin/plugins/exim_mailstats line 74
    Next, it also mentions erroneous data being produced. As a question, what operating system are you using? Does it happen to be FreeBSD or is it CentOS?

    Thanks.
     
  10. LDHosting

    LDHosting Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    93
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    I have followed the thread and tried the debugging lines that are mentioned, the log file position seems to increase but the data values are strange (letters rather than numbers)

    Code:
    2011/02/18-01:10:03 [20215]     Pre: Exim log file position is 14639800, number of rejects is BO
    2011/02/18-01:10:03 [20215]     Post: Exim log file position is 14644693, number of rejects is BS
    
    2011/02/18-01:15:03 [21725]     Pre: Exim log file position is 14644693, number of rejects is BS
    2011/02/18-01:15:03 [21725]     Post: Exim log file position is 14650417, number of rejects is CC
    
    I've also tried removing the "use lib" line in /usr/share/munin/plugins/exim_mailstats but that doesn't seem to have made any difference.

    The OS is CentOS, actually this is happening on 2 different CentOS machines; one 32 bit and one 64 bit. The exim graphs on both machines were working fine up until the munin update last night.
     
  11. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    Would you be able to open up a ticket using WHM > Support Center > Contact cPanel or via the link in my signature for us to look into this further? The prior errors provided aren't common errors at all. I tried searching the desk for them and online and the link I provided in my last response was the only place that had any part of the error you were receiving.

    Once you've opened up a ticket, if you could post the ticket number here.

    Thanks!
     
  12. LDHosting

    LDHosting Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    93
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    I think I may have found the solution. I just found the following ticket and made the changes that are mentioned in it. Munin now seems to be generating the exim throughput graphs again and running "munin-run exim_mailstats" returns a numeric value as expected.

    #985 (exim_mailstats plugin does weird string arithmetic after initializing) - Munin - Trac

    Maybe this can be changed for a future update? Hopefully this will help anyone else that might be experiencing this anyway.

    Thanks for the help, Tristan!
     
    #12 LDHosting, Feb 17, 2011
    Last edited: Feb 17, 2011
  13. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
    It turns out my problem was the same as his!

    Code:
    root@one [/]# cat /etc/logrotate.conf
    # see "man logrotate" for details
    # rotate log files weekly
    weekly
    
    # keep 4 weeks worth of backlogs
    rotate 4
    
    # create new (empty) log files after rotating old ones
    create
    
    # uncomment this if you want your log files compressed
    # compress
    
    # RPM packages drop log rotation information into this directory
    include /etc/logrotate.d
    
    # no packages own wtmp -- we'll rotate them here
    /var/log/wtmp {
        monthly
        minsize 1M
        create 0664 root utmp
        rotate 1
    }
    
    # system-specific logs may be also be configured here.
    root@one [/]# munin-run exim_mailstats
    received.value U
    completed.value U
    rejected.value U
    
     
  14. Arvy

    Arvy Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    92
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Twitter:
    [Cases 47292, 47314] Munin update - stopped update Exim Mail Throughput graph

    Hello,

    after the munin update in last day, the "Exim Mail Throughput" stopped work.

    Not only in one server, but in all my servers. This graph is very important for me to control spam and mail usage.

    untitled.GIF
    exim_mailstats-day.png

    Can you help me, please?

    thank you
    Arvy
     
  15. LDHosting

    LDHosting Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    93
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    re: [Cases 47292, 47314] Munin update - stopped update Exim Mail Throughput graph

    I had exactly the same problem, but managed to find a solution from a Munin bug report which I posted here

    http://forums.cpanel.net/f5/sweet-munin-update-192311.html#post789311

    If you have root SSH access, the steps that I took were:

    Backup the existing file (just in case)
    Code:
    cp /usr/share/munin/plugins/exim_mailstats /usr/share/munin/plugins/exim_mailstats.bak
    Edit the file with your favourite editor (vi, nano, pico etc)
    Code:
    vi /usr/share/munin/plugins/exim_mailstats
    Change line 109 from
    Code:
    if ($rotated) {
    TO
    Code:
    if ($rotated || $received eq 'U') {
    and save the file

    remove the existing state file
    Code:
     rm /var/lib/munin/plugin-state/exim_mailstats-127.0.0.1
    Restart Munin
    Code:
    /etc/init.d/munin-node restart
    After 10 minutes or so, you should see the points plotted on the throughput graph again.

    Hopefully cPanel will have a more elegant solution soon, but this did the job for me. :)
     
  16. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
    re: [Cases 47292, 47314] Munin update - stopped update Exim Mail Throughput graph

    Blast! I missed the remove state file.
     
  17. Arvy

    Arvy Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    92
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Twitter:
    re: [Cases 47292, 47314] Munin update - stopped update Exim Mail Throughput graph

    Hi LDHosting!

    Thank you very much, did the job for me too, you saved my day! Tks!

    Arvy
     
  18. InterServed

    InterServed Well-Known Member

    Joined:
    Jul 10, 2007
    Messages:
    255
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    DataCenter Provider
    re: [Cases 47292, 47314] Munin update - stopped update Exim Mail Throughput graph

    There also seem to be some permission issues as i found the following logs:
    Code:
    root@nlsrv1 [~]# tail -f /var/log/munin/munin-node.log
    2011/02/18-23:10:04 [14958] Error output from mailman:
    2011/02/18-23:10:04 [14958]     Can't open /var/lib/munin/plugin-state/munin-mailman-log.state for writing: Permission denied at /etc/munin/plugins/mailman line 105.
    2011/02/18-23:10:04 [14958] Service 'mailman' exited with status 13/0.
    2011/02/18-23:10:05 [14958] Error output from munin_stats:
    2011/02/18-23:10:05 [14958]     munin_stats: Could not open statefile '/var/lib/munin/plugin-state/munin_stats-127.0.0.1' for writing: Permission denied
    2011/02/18-23:10:05 [14958] Service 'munin_stats' exited with status 13/0.
    2011/02/18-23:10:07 [14958] Error output from yum:
    2011/02/18-23:10:07 [14958]     Can't open /var/lib/munin/plugin-state/yum.state for reading: No such file or directory
    2011/02/18-23:10:07 [14958]     Please read 'munindoc yum' to understand why if the file does not exist.
    2011/02/18-23:10:07 [14958] Service 'yum' exited with status 2/0.
     
  19. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Re: [Cases 47292, 47314] Munin update - stopped update Exim Mail Throughput graph

    I've updated this thread with the two cases we have opened about Munin 1.4.5-1.7. Case 47292 is about the exim_mailstats issue, while Case 47314 appears to possibly relate to your issue, InterServed. That case is about the WHM plugin for Munin having a typo in the directory path in the /etc/munin/munin.conf file:

    Code:
    dbdir dbdir /var/lib/munin
    The correct line would be:

    Code:
    dbdir /var/lib/munin
    Can you check if your /etc/munin/munin.conf file has the wrong path? If it does, please try the following commands to see if this fixes the issue (taken from the proposed temporary workaround steps in case 47314):

    Code:
    /etc/init.d/crond stop
    /etc/init.d/munin-node stop
    /bin/cp -ipv /etc/munin/munin.conf /etc/munin/munin.conf.original
    perl -pi -e 's/^dbdir dbdir \//dbdir \//g' /etc/munin/munin.conf
    /bin/cp -ipv /etc/munin/munin.conf /etc/munin/munin.conf.patched
    find ~munin/dbdir\ /var/lib/munin -maxdepth 1 -mindepth 1 -exec /bin/mv -iv '{}' /var/lib/munin \;
    /etc/init.d/crond start
    /etc/init.d/munin-node start
    Thanks.
     
  20. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Re: [Cases 47292, 47314] Munin update - stopped update Exim Mail Throughput graph

    The above reported issues should now be resolved in 1.4.5-1.8 version of the munin plugin.

    You can run
    Code:
    /usr/local/cpanel/whostmgr/bin/whostmgr2 --updateaddons
    to install the new version or just wait for tonight's update.
     

Share This Page