Proper way to enable statistics on Dovecot 2.3.20?
Hi.
I'm using Dovecot on OpenBSD OS. "dovecot --version" reports: 2.3.20 (80a5ac675d) and this is my configuration file: https://termbin.com/m4to
How to properly set the statistics for the version I use? I have both "service stats" and "service old-stats" and it seems I'm not really getting any statistics. Where's my mistake? Thanks in advance. ("doveadm oldstats top" command gives an empty page with columns.)
Thanks.
And if possible, how to disable statistics completely and safely? Without the "0" trick, that leads getting;
"Jul 12 02:20:55 mail dovecot: auth: Error: net_connect_unix(/var/dovecot/stats-writer) failed: No such file or directory Jul 12 02:20:55 mail dovecot: auth: Error: stats: open(old-stats-user) failed: No such file or directory"
On 12/07/2023 02:53 EEST rixati6186--- via dovecot dovecot@dovecot.org wrote:
And if possible, how to disable statistics completely and safely? Without the "0" trick, that leads getting;
"Jul 12 02:20:55 mail dovecot: auth: Error: net_connect_unix(/var/dovecot/stats-writer) failed: No such file or directory Jul 12 02:20:55 mail dovecot: auth: Error: stats: open(old-stats-user) failed: No such file or directory"
Hi!
you cannot disable the new stats, they are integral to how Dovecot works. If you disable access to the socket, you get the errors as you saw.
See https://doc.dovecot.org/configuration_manual/old_stats/, but keep in mind that all the settings should be prefixed with old_.
Also 2.4 will not have old_stats at all, so it is probably better to start using new metrics instead.
Aki
Thank you very much Mr. Aki for your quick and prompt reply! Got it.
Is my configuration properly aligned for new metrics? Is "service stats" block (which I assume it's new one) enough to enable new metrics?
Kindest Regards. Konstantin
On 12/07/2023 09:33 EEST rixati6186--- via dovecot dovecot@dovecot.org wrote:
Thank you very much Mr. Aki for your quick and prompt reply! Got it.
Is my configuration properly aligned for new metrics? Is "service stats" block (which I assume it's new one) enough to enable new metrics?
Kindest Regards. Konstantin
having
service stats { }
does absolutely nothing useful.
service stats { unix_listener stats-writer { mode = 0666 } }
allows all processes to write stats.
To actually get some statistics, you need configure one or more metrics, see
https://doc.dovecot.org/configuration_manual/stats/
and you might also be interested in
https://doc.dovecot.org/configuration_manual/stats/openmetrics/
Aki
Got it! Thanks so much, once again.
But imagine a very low-end VPS running just for few e-mail accounts, in order to keep the system resources free -at least a bit-, and if no stats needed for the admin/users, what configuration/block would you suggest? Otherwise, do I need to use both unix_listener stats-writer and unix_listener stats-reader?
On 12/07/2023 11:18 EEST rixati6186--- via dovecot dovecot@dovecot.org wrote:
Got it! Thanks so much, once again.
But imagine a very low-end VPS running just for few e-mail accounts, in order to keep the system resources free -at least a bit-, and if no stats needed for the admin/users, what configuration/block would you suggest? Otherwise, do I need to use both unix_listener stats-writer and unix_listener stats-reader?
Those are there by default, the config block just opens the default a bit. Stats will not really consume that much resources, in the end. Even on your low-end VM.
Aki
participants (2)
-
Aki Tuomi
-
rixati6186@iturchia.com