#!/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 <