Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mailgraph doesn't work any more?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
c00l.wave
Apprentice
Apprentice


Joined: 24 Aug 2003
Posts: 268

PostPosted: Mon Jan 01, 2007 2:07 pm    Post subject: mailgraph doesn't work any more? Reply with quote

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... :oops: )

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
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Mon Jan 01, 2007 3:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
c00l.wave
Apprentice
Apprentice


Joined: 24 Aug 2003
Posts: 268

PostPosted: Mon Jan 01, 2007 5:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Tue Jan 02, 2007 1:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum