Re: Monitoring Queues and Alerting

From: (no name) (no email)
Date: Tue Feb 24 2004 - 20:11:33 EST


On Wed, 25 Feb 2004, Timo Proescholdt wrote:

> if you want to be alterted every time the postfix queue extends a certain
> number of messages i suggest the following cronjob.
>
> mailq | tail -1 | perl -ne '/(\d+) Requests/ ; print "ALTERT\n" if $1>300 ; ' | mailx -s "postfix queue" postmaster
>

This is too crude to be useful. Not all messages in the queue are created
equal.

> if you want to examine a certain queue only, something like this might help.
>
> find /var/spool/postfix/active -type f | wc -l | perl -ne 'print "ALTERT\n" if $_ > 300' | mailx...
>

This is more reasonable, but one might want to set thresholds on the
population of deferred queue as way with more weight to recent messages.
The output of "qshape" (soon coming to a Postfix near you) is a good
source of numbers for a script that enforces suitable limits. The script
needs to keep state somewhere so as not to send repeated alarms about the
same problem more frequently than say once every two hours.

-- 
	Viktor.







Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD