From e0c44bf04fe5ed96009214b25674060e444b6acb Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 20 Jan 2026 19:11:53 +0100 Subject: [PATCH] Reapply "cmdeploy/dovecot/dovecot.conf.j2: tweak idle/hibernate metrics" This reverts commit 0aa0324c81530a0149e07fa4e1b78289410fbc85. --- cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 b/cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 index f81b9c23..f9002953 100644 --- a/cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 +++ b/cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 @@ -326,11 +326,20 @@ metric imap_idle_duration { group_by = duration:exponential:5:11:10 } +metric imap_idle_commands { + filter = event=imap_command_finished AND cmd_name=IDLE + group_by = tagged_reply_state +} + +metric imap_idle_failed { + filter = event=imap_command_finished AND cmd_name=IDLE AND tagged_reply_state!=OK +} + # Hibernation Metrics (requires imap_hibernate_timeout to be set) metric imap_hibernated { filter = event=imap_client_hibernated # error field present = failure - group_by = mailbox + # group_by = mailbox } metric imap_hibernated_failed { @@ -340,7 +349,18 @@ metric imap_hibernated_failed { metric imap_unhibernated { filter = event=imap_client_unhibernated fields = hibernation_usecs +# group_by = reason +} + +metric imap_unhibernated_reason { + filter = event=imap_client_unhibernated group_by = reason + fields = hibernation_usecs +} + +metric imap_unhibernated_reason_sleep { + filter = event=imap_client_unhibernated + group_by = reason hibernation_usecs:exponential:4:8:10 } metric imap_unhibernated_failed {