View previous topic :: View next topic |
Author |
Message |
c00l.wave Apprentice
Joined: 24 Aug 2003 Posts: 268
|
Posted: Mon Jan 01, 2007 2:07 pm Post subject: mailgraph doesn't work any more? |
|
|
Happy New Year to all of you!
I use mailgraph on 2 hosts to monitor postfix. For some reason it suddenly stopped working: Host 1 seems to have failed since yesterday at about 9 am, host 2 issued a huge number of broken threads since midnight (year change), some running very long (infinitely?) and messing resources, some just ending up at the rm-command (probably a race condition). I start mailgraph using crontab:
Code: |
* * * * * root cd /var/lib/mailgraph && cat /var/log/mail/* > log.log && mailgraph -l log.log -t metalog --ignore-localhost -c >/dev/null 2>&1 && rm log.log
|
(yes, that's minutely and right now I find I'm using root... going to change that immediately... )
Performing these commands manually I end up with mailgraph running "infinitely" on host 2. Host 1 (much faster CPU) simply logs zeros to rrdtool and then quits. (MTAs are running fine but mailgraph doesn't log anything)
Anyone knows something about that problem? _________________ nohup nice -n -20 cp /dev/urandom /dev/null & |
|
Back to top |
|
|
steveb Advocate
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Mon Jan 01, 2007 3:13 pm Post subject: |
|
|
Why do you run mailgraph from crontab? I am runing mailgrph on serval boxes and none of them has a problem. But I use the /etc/init.d/mailgrph script to update the graphics. |
|
Back to top |
|
|
c00l.wave Apprentice
Joined: 24 Aug 2003 Posts: 268
|
Posted: Mon Jan 01, 2007 5:15 pm Post subject: |
|
|
I use metalog, so my logfiles rotate and I need to concat them each time mailgraph gets called. At least I didn't read anything about mailgraph monitoring log rotation or something like that, so there probably would be some missing data. Furthermore I couldn't get it running as a different user using start-stop-daemon (funny I ran the cronjob as root too; I must have been very tired when setting this all up).
Anyway, it worked perfectly for nearly 2 months and sadly it starts to mess now. I found a notice about data loss after year change on mailgraph's web page but no information on how to fix this. Furthermore I can't imagine this to be the problem on host 1 which refuses to log since about 15 hours before year change, neither does this explain why host 2 started to spawn that many zombies. What do I run statistics for if I have to reset them each year? Guess I'm going to write some log analyzer myself or switch to something else... _________________ nohup nice -n -20 cp /dev/urandom /dev/null & |
|
Back to top |
|
|
steveb Advocate
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Tue Jan 02, 2007 1:34 am Post subject: |
|
|
Mailgraph does work even with logrotating. Do you think mailgraph will always parse the complete log? No way! It only parses the difference since the last run. |
|
Back to top |
|
|
|