From 47f443a12c3664505bdc12723977bb1fc1452902 Mon Sep 17 00:00:00 2001 From: David Obando Date: Fri, 20 Apr 2007 10:23:24 +0200 Subject: [PATCH] Initial version --- plugins/other/postfix_stats | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 plugins/other/postfix_stats diff --git a/plugins/other/postfix_stats b/plugins/other/postfix_stats new file mode 100755 index 00000000..64f2bace --- /dev/null +++ b/plugins/other/postfix_stats @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Plugin to show Postfix statistics - needs pflogsumm +# +# Contributed by David Obando (david@cryptix.de) - 16.04.2007 +# +# +# Magic markers - optional - used by installation scripts and +# munin-config: +# +#%# family=manual +#%# capabilities=autoconf + +#set -xv + +case $1 in + config) + cat <<'EOF' +system.type COUNTER +graph_title Postfix statistics +graph_vlabel Postfix statistics +graph_category Mail +graph_total Total +received.label received +delivered.label delivered +forwarded.label forwarded +deferred.label deferred +bounced.label bounced +rejected.label rejected +held.label held +discarded.label discarded +EOF + exit 0;; +esac + + +TMP=`mktemp /tmp/tmp.XXXXXXXX` +pflogsumm.pl --smtpd_stats -d today /var/log/syslog /var/log/syslog.0 | head -n 15 > $TMP + +cat <