[Dovecot] interesting stats pattern
Timo Sirainen
tss at iki.fi
Tue May 29 15:21:25 EEST 2012
On 29.5.2012, at 13.23, Cor Bosman wrote:
> Hey all, im experimenting with dovecot stats service, and graphing the result. My initial results are kind of interesting. Check out this graph showing connected sessions and users:
>
> http://grab.by/dReu
How do you get the list? Are you periodically just getting list of sessions/users with doveadm stats dump?
> Anyone have any idea what could cause such a pattern? Maybe dovecot does some cleaning up of idle sessions at specific intervals? Or maybe our loadbalancers do, or the imapdirectors.
doveadm stats dump by default dumps a lot of historic data as well. If you want to see only the currently connected sessions/users, add "connected" parameter.
Note that I'm not entirely sure what would be the best API for getting the stats. I'm also thinking that for best behavior the stats process should simply be dumping the data to some permanent database, and you'd do the lookups from there. Otherwise data is lost when Dovecot restarts. The dumping to db could already be done with a "doveadm stats dump" cronjob that runs e.g. once a minute.
And/or perhaps stats process should be saving its state permanently to /var/lib/dovecot/ and loading it at startup. Still, a permanent DB would probably be better for some purposes.
More information about the dovecot
mailing list