forked from evolix/ansible-roles
dovecot: fix plugin dovecot1
This commit is contained in:
parent
e089796c4c
commit
f5d5e84caf
|
@ -82,6 +82,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
|||
* webapps/nextcloud: fix missing gid
|
||||
* nginx: fix mistake between "check_mode: no" and "when: not ansible_check_mode" (fail in check mode)
|
||||
* nginx: add "when: not ansible_check_mode" in various tasks to prevent fail in check mode
|
||||
* dovecot: fix plugin dovecot1
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
|
||||
log2mail_alert_email: Null
|
||||
|
||||
dovecot_vmail_uid: 5000
|
||||
dovecot_vmail_gid: 5000
|
||||
|
|
24
dovecot/files/munin_plugin_dovecot1
Normal file → Executable file
24
dovecot/files/munin_plugin_dovecot1
Normal file → Executable file
|
@ -53,15 +53,17 @@ if ( $ARGV[0] and $ARGV[0] eq "autoconf" ) {
|
|||
exit 0;
|
||||
}
|
||||
|
||||
if (-f "$logfile.0") {
|
||||
$rotlogfile = $logfile . ".0";
|
||||
} elsif (-f "$logfile.1") {
|
||||
$rotlogfile = $logfile . ".1";
|
||||
} elsif (-f "$logfile.01") {
|
||||
$rotlogfile = $logfile . ".01";
|
||||
} else {
|
||||
$rotlogfile = $logfile . ".0";
|
||||
}
|
||||
# Disable rotated log inpection because name is not deterministic across systems
|
||||
# and data loss is may 5 min
|
||||
#if (-f "$logfile.0") {
|
||||
# $rotlogfile = $logfile . ".0";
|
||||
#} elsif (-f "$logfile.1") {
|
||||
# $rotlogfile = $logfile . ".1";
|
||||
#} elsif (-f "$logfile.01") {
|
||||
# $rotlogfile = $logfile . ".01";
|
||||
#} else {
|
||||
# $rotlogfile = $logfile . ".0";
|
||||
#}
|
||||
|
||||
if ( $ARGV[0] and $ARGV[0] eq "config" ) {
|
||||
print "multigraph dovecot_connections\n";
|
||||
|
@ -179,7 +181,9 @@ if (!defined $pos) {
|
|||
|
||||
if ($startsize < $pos) {
|
||||
# Log rotated
|
||||
parseDovecotfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
|
||||
# Disable rotated log inpection because name is not deterministic across systems
|
||||
# and data loss is may 5 min
|
||||
#parseDovecotfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
|
||||
$pos = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
tags:
|
||||
- dovecot
|
||||
|
||||
- name: deploy evolix config
|
||||
- name: deploy evolix config for Dovecot
|
||||
ansible.builtin.template:
|
||||
src: z-evolinux-defaults.conf.j2
|
||||
dest: /etc/dovecot/conf.d/z-evolinux-defaults.conf
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
- name: Copy Munin config
|
||||
ansible.builtin.copy:
|
||||
src: z-evolinux-dovecot.conf
|
||||
src: munin_plugins.conf
|
||||
dest: /etc/munin/plugin-conf.d/zzz-dovecot
|
||||
mode: '0644'
|
||||
notify: restart munin-node
|
||||
|
|
Loading…
Reference in a new issue