forked from evolix/ansible-roles
dovecot: Update munin plugin & configure it
This commit is contained in:
parent
45835d3349
commit
995cb6d9a2
2
dovecot/files/munin_config
Normal file
2
dovecot/files/munin_config
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[dovecot]
|
||||||
|
group adm
|
|
@ -8,6 +8,7 @@
|
||||||
# Contributions by:
|
# Contributions by:
|
||||||
# - Stephane Enten <tuf@delyth.net>
|
# - Stephane Enten <tuf@delyth.net>
|
||||||
# - Steve Schnepp <steve.schnepp@pwkf.org>
|
# - Steve Schnepp <steve.schnepp@pwkf.org>
|
||||||
|
# - pcy <pcy@ulyssis.org> (make 'Connected Users' DERIVE, check existence of logfile in autoconf)
|
||||||
#
|
#
|
||||||
# Parameters understood:
|
# Parameters understood:
|
||||||
#
|
#
|
||||||
|
@ -34,13 +35,13 @@ LOGFILE=${logfile:-/var/log/mail.log}
|
||||||
######################
|
######################
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
echo yes
|
[ -f "$LOGFILE" ] && echo yes || echo "no (logfile $LOGFILE not found)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
echo 'graph_title Dovecot Logins'
|
echo 'graph_title Dovecot Logins'
|
||||||
echo 'graph_category Mail'
|
echo 'graph_category mail'
|
||||||
echo 'graph_args --base 1000 -l 0'
|
echo 'graph_args --base 1000 -l 0'
|
||||||
echo 'graph_vlabel Login Counters'
|
echo 'graph_vlabel Login Counters'
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ if [ "$1" = "config" ]; then
|
||||||
done
|
done
|
||||||
|
|
||||||
echo 'connected.label Connected Users'
|
echo 'connected.label Connected Users'
|
||||||
|
echo "connected.type DERIVE"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -14,8 +14,10 @@
|
||||||
dest: /etc/munin/plugins/dovecot
|
dest: /etc/munin/plugins/dovecot
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
# TODO : add in /etc/munin/plugin-conf.d/munin-node
|
- name: Install munin config
|
||||||
# [dovecot]
|
copy:
|
||||||
# group adm
|
src: munin_config
|
||||||
|
dest: /etc/munin/plugin-conf.d/dovecot
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
when: munin_node_plugins_config.stat.exists
|
when: munin_node_plugins_config.stat.exists
|
||||||
|
|
Loading…
Reference in a new issue