Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions data/event_categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export const categories = {
description: `DNS client library`
},

doveadm: {
category: 'root',
description: `[[link,doveadm]] commands`
},

fs: {
category: 'root',
description: `FS library`
Expand Down
35 changes: 35 additions & 0 deletions data/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,41 @@ Connection to proxy failed, but reconnect will be attempted.
event.`
},

/* doveadm */

doveadm_command_finished: {
root: 'doveadm',
added: {
events_doveadm_command_finished_added: false,
},
fields: {
command: `Name of the doveadm command that was run. Not set if no command could be resolved.`,
exit_code: `Exit code of the command. See [[link,doveadm_error_codes]].`,
user: `
Username the command was run for, if known.

Set for [[link,doveadm_http_api]] requests (from the command's \`user\`
parameter) and for doveadm server connections. Not set when doveadm is run
from the command line.`,
agent: `Value of the \`User-Agent\` header. Only set for [[link,doveadm_http_api]] requests, and only if the client sent the header.`,
local_ip: `Local IP address the client connected to. Not set when doveadm is run from the command line.`,
local_port: `Local port the client connected to. Not set when doveadm is run from the command line.`,
remote_ip: `Remote IP address of the client. Not set when doveadm is run from the command line.`,
remote_port: `Remote port of the client. Not set when doveadm is run from the command line.`,
origin: `Origin of the command: \`cli\`, \`http\` or \`tcp\`, depending on how the command was issued.`,
},
text: `
A doveadm command has finished running.

Emitted for all three ways a command can be run: from the command line, over
the doveadm server protocol, and via the [[link,doveadm_http_api]].
Comment thread
sirainen marked this conversation as resolved.

For doveadm server connections the event also inherits the fields of the
connection the command was run for; for the HTTP API this additionally
includes the request's [[event,http_server_request_started]] fields, e.g.
\`method\`, \`target\` and \`request_id\`.`
},

}

/* 'Global Inherits': All events inherit these fields. */
Expand Down
1 change: 1 addition & 0 deletions data/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export const updates = {
events_auth_server_userdb_userdb_driver_added: '2.4.0',
events_auth_server_userdb_userdb_name_removed: '2.4.0',
events_dns_worker_request_finished_cached_added: '2.4.0',
events_doveadm_command_finished_added: '2.4.6',
events_imap_id_received_added: '2.4.0',
events_imap_id_received_internal_added: '2.4.3',
events_invalid_credentials_added: '2.4.5',
Expand Down
2 changes: 2 additions & 0 deletions docs/installation/upgrade/2.4-to-2.4.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,5 @@ INBOX namespace.
### v2.4.5 to v2.4.6

<!-- @include: include/2.4.6-auth-empty-password.inc -->

<!-- @include: include/2.4.6-doveadm-logging.inc -->
21 changes: 21 additions & 0 deletions docs/installation/upgrade/include/2.4.6-doveadm-logging.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#### Doveadm Logging Changes

`doveadm-server` no longer writes the Apache-style access log line for each
[[link,doveadm_http_api]] request. The same information is now available from
events: [[event,doveadm_command_finished]] for the command, the user and the
exit code, and [[event,http_server_request_finished]] for the HTTP status and
the transferred byte counts. Both are debug level events, so use
[[link,event_export]] to record them. Note that the format differs from the
old log line.

[[event,doveadm_command_finished]] is emitted for command line and
doveadm server protocol invocations as well, not just for the HTTP API.

Some [[link,doveadm_http_api]] log lines also changed level:

| Log line | Old Level | New Level |
| -------- | --------- | --------- |
| `Executing command`, `Executing command as '<user>'` | info | debug |
| `Error writing output in command <cmd>: <error>` | info | error |
| `read(<stream>) failed: <error>` | info | error |
| `error writing output: <error>` | info | error |