summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2011-10-12 15:47:17 -0400
committerMicah Anderson <micah@riseup.net>2011-10-12 15:47:17 -0400
commit995024443bf3cefce51aeb23996a97e8809f8873 (patch)
treeb0fd94575c55a283c8e36156d5e75b059d48454e /files
parent9b10a1e8e73863e428601e21c94b3ef664d1eaa7 (diff)
change munin graph to be reasonable for dovecot2
the previous way of doing graphs did some calculations that were way off when logrotation happened
Diffstat (limited to 'files')
-rw-r--r--files/munin/dovecot9
1 files changed, 2 insertions, 7 deletions
diff --git a/files/munin/dovecot b/files/munin/dovecot
index 64ac93f..86feb4b 100644
--- a/files/munin/dovecot
+++ b/files/munin/dovecot
@@ -80,14 +80,9 @@ echo -n
######################
# Connected Users
######################
-DISCONNECTS=$(egrep 'dovecot.*Disconnected' $LOGFILE | sort | wc -l)
-CONNECTS=$(egrep 'dovecot.*Login' $LOGFILE | sort | wc -l)
-DISCON=$($EXPR_BIN $CONNECTS - $DISCONNECTS)
-if [ $DISCON -lt 0 ]; then
- DISCON=0
-fi
+CONNECTS=$(doveadm -f flow who -1 |wc -l)
/bin/echo -en "connected.value "
-echo $DISCON
+echo $CONNECTS
echo -n
######################
# TLS Logins