Projet

Général

Profil

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

root / plugins / qmail / queuestats @ 17f78427

Historique | Voir | Annoter | Télécharger (537 octets)

1
#!/bin/sh
2
#
3
# Plugin to count the qmail queue
4
#
5
# Magic markers - optional - used by installation scripts and
6
# munin-config:
7
#
8
#%# family=manual
9
#%# capabilities=autoconf
10

    
11
if [ "$1" = "autoconf" ]; then
12
	echo "yes"
13
        exit 0
14
fi
15

    
16
if [ "$1" = "config" ]; then
17

    
18
	cat <<EOT
19
graph_title Qmail queue stats
20
graph_args --base 1000 -l 0
21
graph_vlabel mails in queue
22
graph_category mail
23
queue.label queue
24
queue.type GAUGE
25
queue.min 0
26
EOT
27
        exit 0
28
fi
29

    
30
echo -n "queue.value " && /usr/bin/find $queue/mess/ -type f -print | /usr/bin/wc -l