Re: How to continuously gather statistics?

2019-05-17 Thread Aki Tuomi via dovecot

On 17.5.2019 13.46, Roel van Duijnhoven via dovecot wrote:
> Hello,
>
> I recently upgraded to the latest version of Dovecot, and want to use
> the newly introduced logging / event system. I want to fetch the
> statistics every couple of seconds, and push those to our logging
> platform. Metrics such as: number of IMAP commands, average time they
> took, etc.
>
> However the metrics as reported by Dovecot continously increment. So I
> see two solutions:
>
>   * Our solution could keep track of the previous values. But that
> could also break if the statistics are reset for some reason (e.g.
> threshold reached).
>   * My second thought was to use "stats -r". That /should/ clear the
> statistics directly after fetching them. And thus, give a better
> picture. However I am not sure if this gives me actual useful results.
>
> Or is there maybe a better approach to fetch statistics that I overlooked?
>
> Thanks a lot.
>
> Best,
> Roel van Duijnhoven


For the new metrics, we are working on exporting features, which are not
yet finished.

For old stats you can use carbon protocol.

Aki



How to continuously gather statistics?

2019-05-17 Thread Roel van Duijnhoven via dovecot
Hello,

I recently upgraded to the latest version of Dovecot, and want to use the
newly introduced logging / event system. I want to fetch the statistics
every couple of seconds, and push those to our logging platform. Metrics
such as: number of IMAP commands, average time they took, etc.

However the metrics as reported by Dovecot continously increment. So I see
two solutions:

   - Our solution could keep track of the previous values. But that could
   also break if the statistics are reset for some reason (e.g. threshold
   reached).
   - My second thought was to use "stats -r". That *should* clear the
   statistics directly after fetching them. And thus, give a better picture.
   However I am not sure if this gives me actual useful results.

Or is there maybe a better approach to fetch statistics that I overlooked?

Thanks a lot.

Best,
Roel van Duijnhoven