> On Sun, Mar 04, 2007 at 10:57:32AM -0800, MrC wrote:
> > 
> > > Does anyone know of a good method to monitor the postfix 
> queue and 
> > > send an alert if it exceeds a certain number of messages?  We've 
> > > been getting a backup and I'm trying to "tweak" the max_servers 
> > > setting.  If it's at 10 I often get a backup, 20 works, but 
> > > sometimes starts pushing the "memory"
> > > limits of the server.  I don't have time to sit and watch 
> it all day 
> > > :) - and it would be nice to have an alert sent to me if it's 
> > > getting backed up. Then I could set it at 12 or 15 and 
> just let it 
> > > run for awhile without having to remember to go "look" all of the 
> > > time!
> > > 
> > > Any ideas appreciated.
> > > 
> > > Thanks.
> > > 
> > > Danita
> > 
> > POSTFIX_SRC/auxiliary/qshape/qshape.pl
> > 
> > The souce has internal documentation.
> 
> A bit complicated if you look at the original question..
> 
> Simple script in crontab would solve it:
> 
> -------------------------------------------------------------
> #!/bin/bash
> QSIZE="`postqueue -p | tail -1 | awk '{print $5}'`"
> if [ "0$QSIZE" > 50 ]; then
>   echo "Postfix queue size $QSIZE!" | mail [EMAIL PROTECTED] fi
> -------------------------------------------------------------
> 
> Cheers,
> Henrik

Sorry, I was thinking ahead.  The simple crontab will only capture
essentially instantaneous snapshots, but not show the real picture over time
of what's happening.  If the cronjob fires during a sudden, but brief surge,
the alert triggers.  This probably is not desired.  Perhaps its only a
single domain that causes issues.

I was thinking having more information over time would provide a better
understanding of underlying problems.

If the solution is somewhere between 10 and 20 max_servers, a simple binary
trial-and-error will converge on the answer very quickly.

Just different ways of thinking,
MrC


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to