RE: [Nagios-users] Monitore Postfix queue

2006-05-16 Thread Steve Shipway
> I've write a small script do monitore postfix queue using > postqueue to count the number of emails on my queue: > > postqueue -p | tail -1 | cut -d " " -f 5 > > The problem: Sometimes, my queue have more than 20.000 > emails, and I can't count this number of emails in less then > 1 minute :

Re: [Nagios-users] Monitore Postfix queue

2006-05-16 Thread Luc I. Suryo
fyi: i used a perl script that couple people created sometime ago (Subhendu Ghosh/Carlos Canau/Benjamin Schmid) if you want too i can email it to you... -ls > > >Most likely a permission error.. try this: > ># su - postfix -s /bin/sh > ># /path/to/check_mailq -v -w 500 -c 800 -M postfix > >

Re: [Nagios-users] Monitore Postfix queue

2006-05-16 Thread Tiago Cruz
Dhawal Doshy wrote: Most likely a permission error.. try this: # su - postfix -s /bin/sh # /path/to/check_mailq -v -w 500 -c 800 -M postfix Not is permission... I'm running as root (as postfix don't works too) :( Again, check_mailq uses "use lib "nagios/plugins";", you might need to change

[Nagios-users] Monitore Postfix queue

2006-05-16 Thread Tiago Cruz
Hello guys, I've write a small script do monitore postfix queue using postqueue to count the number of emails on my queue: postqueue -p | tail -1 | cut -d " " -f 5 The problem: Sometimes, my queue have more than 20.000 emails, and I can't count this number of emails in less then 1 minute :-)

Re: [Nagios-users] Monitore Postfix queue

2006-05-16 Thread Dhawal Doshy
Tiago Cruz wrote: Hello list! Matthias, The mailq binary don't work for me, and I don't know why :( # /.../bin-1.4.2/libexec/check_mailq -v -w 500 -c 800 -M postfix Couldn't match output Most likely a permission error.. try this: # su - postfix -s /bin/sh # /path/to/check_mailq -v -w 500 -c

Re: [Nagios-users] Monitore Postfix queue

2006-05-16 Thread Tiago Cruz
Hello list! Matthias, The mailq binary don't work for me, and I don't know why :( # /.../bin-1.4.2/libexec/check_mailq -v -w 500 -c 800 -M postfix Couldn't match output John, I'll try do some like this, but is not perfect :) ls -l /var/spool/postfix/deferred/* | grep '-' | wc -l Morten, Than

Re: [Nagios-users] Monitore Postfix queue

2006-05-16 Thread Matthias Eble
On Tue, 2006-05-16 at 10:08 -0300, Tiago Cruz wrote: Hello guys, I've write a small script do monitore postfix queue using postqueue to count the number of emails on my queue: postqueue -p | tail -1 | cut -d " " -f 5 The problem: Sometimes, my queue have more than 20.000 emails, and I can't

Re: [Nagios-users] Monitore Postfix queue

2006-05-16 Thread morten
"munin" has a script for this called "postfix_mailqueue" You could always get that and make a wrapper for it ... Then maybe run it on the postfix server using net-snmps exec function so you can query it from your nagiosserver via check_snmpp :) On Tue, 2006-05-16 at 10:08 -0300, Tiago Cruz wrote: