Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me
Don't miss your chance to attend the 2014 Nagios World conference!

Don't miss your chance to attend the 2014 Nagios World Conference, Oct 13-16th. Informative Sessions, Networking, Food and Cocktails! Visit go.nagios.com/conference/ for more information or to register.


check_postqueue.sh

Bookmark and Share

Rating
6 votes
Favoured:
2
Current Version
1.0.2
Last Release Date
2010-04-16
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
Owner
License
GPL
Hits
80932
Files:
FileDescription
check_postqueue.shcheck_postqueue.sh
The script returns the length of Postfix queue by parsing output of postqueue.
Features:
- check length of Postfix queue
- specify limits for WARNING and CRITICAL
- specify address to count
- exclude something from taking it into account

Example usage: ./check_postqueue.sh -w 50 -c 100 -f '!MAILER-DAEMON'
Reviews (4)
byluinav, February 15, 2013
Hi all,

This plugin works perfectly. Why not including the perf data posted in the previous reviews?

Regards,
Luismi
Change the last rows to this to get queue statistics:


queue=`getQueue`

LABEL="| mail_queue=$queue;$warning;$critical;0;"

if [ "$queue" -ge "$critical" ]; then
echo "CRITICAL - $queue $LABEL"
exit 2
elif [ "$queue" -ge "$warning" ]; then
echo "WARNING - $queue $LABEL"
exit 1
else
echo "OK - $queue $LABEL"
exit 0
fi
byitp_leeuwg, July 21, 2012
1 of 1 people found this review helpful
Hi,

here is my diff for graphing... Maybe the package can be updated?

112,113d111
ret=1
119c119,120
stat="OK"
> ret=0
120a122,125
>
> echo "POSTQUEUE $stat - Number of queued messages: $queue |queue_size=$queue;$warning;$critical;0"
>
> exit $ret
byk2s, March 3, 2011
0 of 1 people found this review helpful
My modification of check_postqueue.sh adds:
* possible to pass config_dir to postqueue
* queue size output usable for graphs
Owner's reply

Can we see these modifications?