Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / mailman / mailman-queue-check @ 17f78427

Historique | Voir | Annoter | Télécharger (1,12 ko)

1
#!/bin/bash
2
#
3
# Plugin to monitor mailman queue
4
#
5
# Parameters understood:
6
#
7
#       config   (required)
8
#
9
# Author: Ricardo F. <rikr@esdebian.org>
10
#
11
#
12
#%# family=manual
13
#%# capabilities=
14
#
15

    
16

    
17

    
18
if [ "$1" = "config" ]; then
19
  echo "graph_title Mailman Queue"
20
  echo "graph_category mailinglist"
21
  echo "graph_args --base 1000 -l 0"
22
  echo "archive.label Archive"
23
  echo "archive.draw LINE2"
24
  echo "bounces.label Bounces"
25
  echo "bounces.draw LINE2"
26
  echo "commands.label Commands"
27
  echo "commands.draw LINE2"
28
  echo "in.label In"
29
  echo "in.draw LINE2"
30
  echo "news.label News"
31
  echo "news.draw LINE2"
32
  echo "out.label Out"
33
  echo "out.draw LINE2"
34
  echo "retry.label Retry"
35
  echo "retry.draw LINE2"
36
  exit 0
37
fi
38

    
39

    
40
dir_mailman='/var/lib/mailman/qfiles'
41
result="archive bounces commands in news out retry"
42
j=0
43

    
44
for i in $result
45
do
46
        array[$j]=`find "$dir_mailman/$i" -type f | wc -l`
47
        j=`expr $j + 1`
48
done
49

    
50

    
51
echo "archive.value ${array[0]}"
52
echo "bounces.value ${array[1]}"
53
echo "commands.value ${array[2]}"
54
echo "in.value ${array[3]}"
55
echo "news.value ${array[4]}"
56
echo "out.value ${array[5]}"
57
echo "retry.value ${array[6]}"
58
exit 0
59

    
60