plugins-qmailqueue: qmailqueue

File qmailqueue, 1.0 kB (added by anonymous, 6 years ago)

Plugin to show the amount of mails in the qmail queue

Line 
1 #!/bin/sh
2 #
3 # Plugin to show the amount of mails in the qmail queue
4 #
5 # Contributed by David Obando (david@cryptix.de) - 23.11.2005
6 #
7 #
8 # Magic markers - optional - used by installation scripts and
9 # munin-config:
10 #
11 #%# family=manual
12 #%# capabilities=autoconf
13
14 if [ "$1" = "autoconf" ]; then
15         echo yes
16         exit 0
17 fi
18
19 if [ "$1" = "config" ]; then
20
21         echo 'graph_title Qmail queue'
22         echo 'graph_args --base 1000 -l 0 '
23         echo 'graph_vlabel Qmail queue'
24         echo 'graph_category Mail'
25         echo 'graph_order queue1 queue2'
26         echo 'queue1.label Mails in Queue'
27         echo 'queue1.min 0'
28         echo 'queue1.draw AREA'
29         echo 'queue2.label Mails not yet preprocessed'
30         echo 'queue2.min 0'
31         echo 'queue2.draw LINE2'
32         exit 0
33 fi
34
35 echo -n "queue1.value " && qmail-qstat |grep -v proc |awk '{print $NF}'
36 echo -n "queue2.value " && qmail-qstat |grep proc |awk '{print $NF}'
37
38
39
40
41 #messages in queue: 674
42 #messages in queue but not yet preprocessed: 0
43