Projet

Général

Profil

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

root / plugins / mail / mailman-queue-check @ 59ecf3f1

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

1 d0e9c552 Ricardo F
#!/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_args --base 1000 -l 0"
21
  echo "archive.label Archive"
22
  echo "archive.draw LINE2"
23
  echo "bounces.label Bounces"
24
  echo "bounces.draw LINE2"
25
  echo "commands.label Commands"
26
  echo "commands.draw LINE2"
27
  echo "in.label In"
28
  echo "in.draw LINE2"
29
  echo "news.label News"
30
  echo "news.draw LINE2"
31
  echo "out.label Out"
32
  echo "out.draw LINE2"
33
  echo "retry.label Retry"
34
  echo "retry.draw LINE2"
35
  exit 0
36
fi
37
38
39
dir_mailman='/var/lib/mailman/qfiles'
40
result="archive bounces commands in news out retry"
41
j=0
42
43 7c8a6a84 Ricardo F
for i in $result
44 d0e9c552 Ricardo F
do
45
        array[$j]=`find "$dir_mailman/$i" -type f | wc -l`
46
        j=`expr $j + 1`
47
done
48
49
50
echo "archive.value ${array[0]}"
51
echo "bounces.value ${array[1]}"
52
echo "commands.value ${array[2]}"
53
echo "in.value ${array[3]}"
54
echo "news.value ${array[4]}"
55
echo "out.value ${array[5]}"
56
echo "retry.value ${array[6]}"
57
exit 0
58