stats events for use with prometheus
I am struggling a bit with getting some basic metrics into prometheus. Is there some sample metrics file that has most common metrics configured?
[@ conf.d]# cat 05-metrics.conf
# https://doc.dovecot.org/admin_manual/event_design/#event-design
metric imap_command { filter = event=imap_command_finished group_by = cmd_name tagged_reply_state }
On 07/10/2021 20:27, Marc wrote:
I am struggling a bit with getting some basic metrics into prometheus. Is there some sample metrics file that has most common metrics configured?
This page has sample configurations and the corresponding exports:
https://doc.dovecot.org/configuration_manual/stats/openmetrics/
I am struggling a bit with getting some basic metrics into prometheus.
Is there some sample metrics file that has most common metrics configured?
This page has sample configurations and the corresponding exports:
https://doc.dovecot.org/configuration_manual/stats/openmetrics/
Yes thanks I have these, but if I see this list[1] and what configurations options exists, it could be little longer example. I also do not see where this client_connection_finished is described.
[1] https://doc.dovecot.org/admin_manual/list_of_events/#list-of-events
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/
On 8 October 2021 13.08.11 UTC, Marc Marc@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
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
Yes I have been using a grafana prometheus dashboard with some 'third party' exporter for dovecot. But I prefer to use your metrics, because I can define exactly the metrics that I want, and do not dump 70% data, that I am not using any way (as with so many exporters). Do you have a more 'production' ready dovecot metrics config and grafana dashboard?
So are some more extensive metrics configuration examples available with grafana dashboards? Maybe even a seperate set specific to debugging?
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
Yes I have been using a grafana prometheus dashboard with some 'third party' exporter for dovecot. But I prefer to use your metrics, because I can define exactly the metrics that I want, and do not dump 70% data, that I am not using any way (as with so many exporters). Do you have a more 'production' ready dovecot metrics config and grafana dashboard?
participants (3)
-
Aki Tuomi
-
Marc
-
Siavash Tavakoli