plugin-spamassassin: spamassassin

File spamassassin, 1.0 kB (added by david@cryptix.de, 6 years ago)

Plugin to count the SpamAssassin troughput

Line 
1 #!/bin/sh
2 #
3 # Plugin to count the SpamAssassin troughput
4 #
5 # Contributed by David Obando - 16.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 SpamAssassin amount'
22         echo 'graph_args --base 1000 -l 0 '
23         echo 'graph_vlabel  SpamAssassin amount'
24         echo 'graph_order spam ham'
25         echo 'graph_category Mail'
26         echo 'ham.label ham'
27         echo 'ham.type DERIVE'
28         echo 'ham.min 0'
29         echo 'ham.draw LINE2'
30         echo 'spam.label spam'
31         echo 'spam.type DERIVE'
32         echo 'spam.min 0'
33         echo 'spam.draw AREA'
34         exit 0
35 fi
36
37
38
39 grep "spamd" /var/log/syslog >> /tmp/$$
40
41 echo -n "spam.value " && grep "identified spam" /tmp/$$ | wc -l
42 echo -n "ham.value " && grep "clean message" /tmp/$$ | wc -l
43
44 rm /tmp/$$
45