stats events for use with prometheus

Aki Tuomi aki.tuomi at open-xchange.com
Fri Oct 8 16:45:56 EEST 2021



On 8 October 2021 13.08.11 UTC, Marc <Marc at f1-outsourcing.eu> wrote:
>> >
>> > I also do not see where this client_connection_finished is described.
>> >
>> >
>> 
>> Thanks for pointing it out. It was indeed a documentation error as there
>> is no such event. The page is now updated.
>
>I did not even know, I just picked the first one from the example to search for
>
>It should be on this page, because I do not see it there?
>https://doc.dovecot.org/admin_manual/list_of_events/#list-of-events
>
>I wonder even if this is correct, because from the event name I would assume this metric is calculated when a client disconnects. When I use the example, I have 0 connections. When I change it to client_connection_connected I have 2 connections, which seems to better represent the current situation. 
>
>metric client_connections {
>  #filter = event=client_connection_connected
>  filter = event=client_connection_finnished
>}
>
>But this seems to be an always increasing counter. I wonder now if dovecot is even having a metric that shows the current client connections. Or should one combine the two metrices client_connection_connected - client_connection_finnished to get this value? It is not really clear from this openmetrics page[1]
>
>I think it would be nice to have this example be something useful and long. It is easier to remove some metrics from the example, than searching for events fields etc creating your own.
>
>
>[1]
>https://doc.dovecot.org/configuration_manual/stats/openmetrics/
>

Point is to use some external tool for that. Dovecot provides counters. Prometheus etc are good UI tools for this, and we have a simple cli tool too, see https://github.com/dovecot/tools/blob/master/watch-stats.py

Aki


More information about the dovecot mailing list