Munin Exim Error has started to occur

jdstallings

Well-Known Member
Jul 27, 2003
60
1
158
USA
cPanel Access Level
Root Administrator
Exim reporting has stopped working on Munin. I noticed this started on the 17th of June. Here are the logs showing the error that is occuring.

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
2006/06/17-13:30:02 CONNECT TCP Peer: "127.0.0.1:33041" Local: "127.0.0.1:4949"
2006/06/17-13:30:04 Plugin "mailman" exited with status 768. ----
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
2006/06/17-13:35:01 CONNECT TCP Peer: "127.0.0.1:33123" Local: "127.0.0.1:4949"
2006/06/17-13:35:04 Plugin "mailman" exited with status 768. ----
mysqladmin: connect to server at 'localhost' failed

Any help would be great! I was not able to find anything on the website for MUNIN.

Thanks in advance!!!
 

panayot

Well-Known Member
Nov 18, 2004
127
0
166
For the plugins that do not work, go to /var/lib/munin/plugin-state/ and empty each non-working plugin state file.

Code:
cat /dev/null > appropriate_file
you may need to do after that:

Code:
service munin-node restart
This fixed the Exim stats for me. Now I also get

Code:
Plugin "mailman" exited with status 768
If I find out how to fix this I will post here
 

panayot

Well-Known Member
Nov 18, 2004
127
0
166
Well, to fix mailman, here is what I did:

edit

Code:
/usr/share/munin/plugins/mailman
At the beginning of the file find

Code:
else
{
    $rotlogfile = $logfile . ".0";
}
change to

Code:
else
{
    $rotlogfile = $logfile; # . ".0";
}
Done.


Now I would really use some advice on what is the use of statistics like

Code:
Inode usage (in %)
VMstat
Interrupts & context switches
Individual interrupts
File table usage
Inode table usage
If some of these are not likely to be used, I guess disabling them will lower the load that munin creates on server (the load is equal to a busy website on my servers. but still I believe the rewards from having the graphs are much greater)
 

jdstallings

Well-Known Member
Jul 27, 2003
60
1
158
USA
cPanel Access Level
Root Administrator
Mailman

LOL... DUH... guess you just need to know where all the files are! It was not working cause it could not find the log file.. I removed the code and BING, I now have the file in /var/lib/munin/plugin-state. Just waiting to see if I see anything now.

THanks!!

Jim
 

jdstallings

Well-Known Member
Jul 27, 2003
60
1
158
USA
cPanel Access Level
Root Administrator
Access denied

Started getting these errors after a cpanel upgrade.. Joys...

2006/06/22-18:15:01 CONNECT TCP Peer: "127.0.0.1:55145" Local: "127.0.0.1:4949"
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

Anyone have any clues?
 

panayot

Well-Known Member
Nov 18, 2004
127
0
166
Uninstall munin, remove /var/lib/munin/, remove /var/log/munin, remove /usr/share/munin, install munin again, edit the mailman file again as described above.
 

FvdM

Member
Feb 7, 2004
9
0
151
I also had problems like this. First the exim_mailstats plugin worked perfectly fine and then suddenly for no reason it didn't. After reviewing and testing every part of the script I found out the compression during logratotion was the problem. This causes the rotated log files to end with .gz. Log files can't be parsed when they are archived, so the plugin won't try to find those. I fixed it by stopping the compression when logrotate runs:

First fix the logrotation:

Code:
pico /etc/logrotate.d/exim
In the editor you should see something like this:

Code:
/var/log/exim_mainlog {
    create 0640 mailnull mail
    compress
    postrotate
    /usr/bin/killall -HUP exim
    endscript
}
/var/log/exim_paniclog {
    missingok
    create 0640 mailnull mail
    compress
    postrotate
    /usr/bin/killall -HUP exim
    endscript
}
/var/log/exim_rejectlog {
    create 0640 mailnull mail
    compress
    postrotate
    /usr/bin/killall -HUP exim
    endscript
}
The exim_mailstats plugin only uses /var/log/exim_mainlog, so you don't need to edit the other two.
Comment out or remove the line that says 'compress'.
Save and exit.

Unpack the logfiles:

Code:
gunzip /var/log/exim_mainlog*.gz
Now it should work again :)
You dont need to restart anything, the stats will be updated if munin-node is running.

Note: if you have a lot of mailtraffic the exim_mainlog may grow large. The compression of the rotated logs reduced the diskspace, this won't happen anymore as compression has been disabled!
 

jdstallings

Well-Known Member
Jul 27, 2003
60
1
158
USA
cPanel Access Level
Root Administrator
Exim_Maillog

I also noticed that it appears it does not handle rotation of the logs real well. I normally rotate my logs every week at the same time, and minun stops working at that time for Exim. If I do a "service minun-node restart" after the log rotation, it picks up again.

I also need to go to /var/lib/munin/plugin-state/ and empty the exim non-working plugin state file.

Hmmmm.... I wonder if not compressing JUST the .1 allows it to roll automatically to newest? I will have to try playing with that.

Jim