mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Initial version
This commit is contained in:
parent
b1ce664ec7
commit
635d12847f
42
plugins/other/qmailconn
Executable file
42
plugins/other/qmailconn
Executable 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]"
|
Loading…
Reference in New Issue
Block a user