Search K
Appearance
Appearance
Note: This is pre-release documentation.
Please access https://doc.dovecotpro.com/latest/ for documentation on released versions.
This page lists recommended metrics that allow inspecting dovecot's behavior in the most general situations. More specialized situations might require further refinements or additional statistics. For an overview of how to gather statistics see Statistics. A list of all available events and their fields can be found here.
The following examples use the custom log-export
exporter.
event_exporter log-export {
format = json
format_args = time-rfc3339
transport = log
}
@metric_defaults = proxy
contains:
auth_successes
auth_request_finished
.auth_failures
auth_request_finished
. It may be useful to export these events into log:metric auth_failures {
exporter = log-export
}
login_aborted
login_aborted
.proxy_session_established
proxy_session_established
.@metric_defaults = backend
contains:
auth_successes
auth_request_finished
.auth_failures
auth_request_finished
. These are not usually expected to happen in backends. It may be useful to export these events into log:metric auth_failures {
exporter = log-export
}
@metric_defaults = backend
contains:
imap_commands
imap_command_finished
.mail_deliveries
mail_delivery_finished
.mail_submissions
smtp_submit_finished
.mail_user_session_finished
mail_user_session_finished
.@metric_defaults = backend
contains:
mail_read
http_request_finished
.mail_write
http_request_finished
.mail_delete
http_request_finished
.fts_read
http_request_finished
.fts_write
http_request_finished
.fts_delete
fts_write
. See http_request_finished
.indexer_worker_indexing_finished
indexer_worker_indexing_finished
.@metric_defaults = backend
contains:
metacache_user_refresh_finished_refreshed_changed
metacache_user_refresh_finished
.metacache_user_refresh_finished_refreshed_unchanged
metacache_user_refresh_finished
.metacache_mailbox_refresh_finished_refreshed_changed
metacache_mailbox_refresh_finished
.metacache_mailbox_refresh_finished_refreshed_unchanged
metacache_mailbox_refresh_finished
.metacache_user_bundle_upload_finished
metacache_user_bundle_upload_finished
.metacache_mailbox_bundle_upload_finished
metacache_user_bundle_upload_finished
.metacache_user_clean_finished
min_priority
. If you see these metrics grow much higher than usual, metacache may be too small. See metacache_user_clean_finished
.obox_mailbox_rescan_finished
obox_mailbox_rescan_finished
.obox_mailbox_rebuild_finished
obox_mailbox_rebuild_finished
.@metric_defaults = backend
contains:
cluster_user_batch_move_finished
cluster_user_batch_move_finished
.cluster_user_move_finished
cluster_user_move_finished
.cluster_user_move_failed
cluster_user_move_finished
.metric imap_commands {
filter = event=imap_command_finished
group_by tagged_reply_state {
}
group_by cmd_name {
}
}
metric imap_commands_slow {
# In some installations there may be too many slow commands to be worth logging these
exporter = log-export
filter = event=imap_command_finished AND (NOT cmd_name=IDLE) AND duration > 1min
}
metric lmtp_commands {
filter = event=smtp_server_command_finished AND protocol=lmtp
group_by cmd_name {
}
}
metric push_notifications {
filter = event=push_notification_finished
}
metric sieve_actions {
filter = event=sieve_action_finished
group_by action_name {
}
}
metric smtp_commands {
filter = event=smtp_server_command_finished AND protocol=smtp
group_by cmd_name {
}
}
metric unknown_commands {
exporter = log-export
filter = (event=imap_command_finished OR event=smtp_server_command_finished) AND cmd_name=unknown
}
See also:
imap_command_finished
,push_notification_finished
,sieve_action_finished
,smtp_server_command_finished
,smtp_server_command_finished
andINFO
The following events are usually logged as errors/warnings in any case, thus the log-export will likely cause duplicate logging. However, they may be easier to parse and may provide additional details.
metric fs_dictmap_dict_write_uncertain {
filter = event=fs_dictmap_dict_write_uncertain AND (NOT cleanup=failed)
exporter = log-export
}
metric fs_dictmap_dict_write_uncertain_failed {
filter = event=fs_dictmap_dict_write_uncertain AND cleanup=failed
exporter = log-export
}
metric fs_dictmap_object_lost {
filter = event=fs_dictmap_object_lost
exporter = log-export
# Note: file_type=fts is only in v2.3.15+
group_by file_type {
}
}
metric fs_dictmap_max_bucket_changed_iter {
filter = event=fs_dictmap_max_bucket_changed AND reason=iter
exporter = log-export
}
metric fts_dovecot_too_many_triplets {
# v2.3.15+
filter = event=fts_dovecot_too_many_triplets
exporter = log-export
}
metric mail_cache_new_field_indexed {
# Helps to find out if mail clients start fetching a new header
filter = event=mail_cache_decision_changed AND reason=add
# If growth is detected, export the events to find out what header is added:
#exporter = log-export
}
metric metacache_pull_finished {
exporter = log-export
filter = event=metacache_pull_finished and error=""
group_by type {
}
}
metric metacache_pull_finished_failure {
exporter = log-export
filter = event=metacache_pull_finished and not error=""
group_by type {
}
}
See also: