1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 10:28:36 +00:00

- have some dirs

This commit is contained in:
Steve Schnepp 2012-02-13 18:24:46 +01:00
parent 0b089ea777
commit 08346aac58
687 changed files with 0 additions and 0 deletions

42
plugins/mail/qmailconn Executable file
View file

@ -0,0 +1,42 @@
#!/bin/sh
#
# Plugin to show amount of smtp-connections per hour
#
# Contributed by Håkon Nessjøen <lunatic@cpan.org>
#
# Magic markers - optional - used by installation scripts and
# munin-config:
#
#%# family=manual
#%# capabilities=autoconf
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title Qmail SMTP connections'
echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel connections/hour'
echo 'graph_category Mail'
echo 'graph_order rbl accepted total'
echo 'rbl.label RBL rejected connections'
echo 'rbl.min 0'
echo 'rbl.draw AREA'
echo 'accepted.label Accepted connections'
echo 'accepted.min 0'
echo 'accepted.draw STACK'
echo 'total.label Total connections'
echo 'total.min 0'
echo 'total.draw LINE1'
exit 0
fi
rbl=`cat /var/log/qmail/smtpd/@* /var/log/qmail/smtpd/current | grep -c rblsmtp`
accepted=`cat /var/log/qmail/smtpd/@* /var/log/qmail/smtpd/current | grep -c 'tcpserver: ok'`
echo -n "rbl.value " && ( echo $rbl || echo U )
echo -n "accepted.value " && ( echo $accepted || echo U )
echo "total.value $[$rbl + $accepted]"