mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
mail/postfix_stats: convert to unix line endings
This commit is contained in:
parent
17c0715a26
commit
fe76476933
1 changed files with 52 additions and 52 deletions
|
@ -1,52 +1,52 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Plugin to show Postfix statistics - needs pflogsumm
|
# Plugin to show Postfix statistics - needs pflogsumm
|
||||||
#
|
#
|
||||||
# Contributed by David Obando (david@cryptix.de) - 16.04.2007
|
# Contributed by David Obando (david@cryptix.de) - 16.04.2007
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Magic markers - optional - used by installation scripts and
|
# Magic markers - optional - used by installation scripts and
|
||||||
# munin-config:
|
# munin-config:
|
||||||
#
|
#
|
||||||
#%# family=manual
|
#%# family=manual
|
||||||
#%# capabilities=autoconf
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
#set -xv
|
#set -xv
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
config)
|
config)
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
system.type COUNTER
|
system.type COUNTER
|
||||||
graph_title Postfix statistics
|
graph_title Postfix statistics
|
||||||
graph_vlabel Postfix statistics
|
graph_vlabel Postfix statistics
|
||||||
graph_category Mail
|
graph_category Mail
|
||||||
graph_total Total
|
graph_total Total
|
||||||
received.label received
|
received.label received
|
||||||
delivered.label delivered
|
delivered.label delivered
|
||||||
forwarded.label forwarded
|
forwarded.label forwarded
|
||||||
deferred.label deferred
|
deferred.label deferred
|
||||||
bounced.label bounced
|
bounced.label bounced
|
||||||
rejected.label rejected
|
rejected.label rejected
|
||||||
held.label held
|
held.label held
|
||||||
discarded.label discarded
|
discarded.label discarded
|
||||||
EOF
|
EOF
|
||||||
exit 0;;
|
exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
TMP=`mktemp /tmp/tmp.XXXXXXXX`
|
TMP=`mktemp /tmp/tmp.XXXXXXXX`
|
||||||
pflogsumm.pl --smtpd_stats -d today /var/log/syslog /var/log/syslog.0 | head -n 15 > $TMP
|
pflogsumm.pl --smtpd_stats -d today /var/log/syslog /var/log/syslog.0 | head -n 15 > $TMP
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
received.value `grep 'received' $TMP | awk '{print $1}'`
|
received.value `grep 'received' $TMP | awk '{print $1}'`
|
||||||
delivered.value `grep 'delivered' $TMP | awk '{print $1}'`
|
delivered.value `grep 'delivered' $TMP | awk '{print $1}'`
|
||||||
forwarded.value `grep 'forwarded' $TMP | awk '{print $1}'`
|
forwarded.value `grep 'forwarded' $TMP | awk '{print $1}'`
|
||||||
deferred.value `grep 'deferred' $TMP | awk '{print $1}'`
|
deferred.value `grep 'deferred' $TMP | awk '{print $1}'`
|
||||||
bounced.value `grep 'bounced' $TMP | awk '{print $1}'`
|
bounced.value `grep 'bounced' $TMP | awk '{print $1}'`
|
||||||
rejected.value `grep 'rejected' $TMP | awk '{print $1}'`
|
rejected.value `grep 'rejected' $TMP | awk '{print $1}'`
|
||||||
held.value `grep 'held' $TMP | awk '{print $1}'`
|
held.value `grep 'held' $TMP | awk '{print $1}'`
|
||||||
discarded.value `grep 'discarded' $TMP | awk '{print $1}'`
|
discarded.value `grep 'discarded' $TMP | awk '{print $1}'`
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
rm $TMP
|
rm $TMP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue