vbezgachev / maxctrl_exporter

MaxScale metrics exporter for Prometheus
Apache License 2.0
12 stars 12 forks source link

counter decreasing #12

Open Lathanderjk opened 2 years ago

Lathanderjk commented 2 years ago

Hi, Counter reporting total_session increasing/decreasing over time, as far as i know counters can only increasing. Value is identical to current session.

1. scrap
# HELP maxctrl_service_total_sessions Total amount of sessions
# TYPE maxctrl_service_total_sessions counter
maxctrl_service_total_sessions{name="Splitter-Service",router="readwritesplit"} 26

2. scrap
# HELP maxctrl_service_total_sessions Total amount of sessions
# TYPE maxctrl_service_total_sessions counter
maxctrl_service_total_sessions{name="Splitter-Service",router="readwritesplit"} 14

3. scrap
# HELP maxctrl_service_total_sessions Total amount of sessions
# TYPE maxctrl_service_total_sessions counter
maxctrl_service_total_sessions{name="Splitter-Service",router="readwritesplit"} 19

There is no restart/reload of maxscale or maxctrl exporter between scraps. maxctrl_exporter latest git snap and maxscale 2.5

ktugan commented 2 years ago

In this case it does not make much sense per my understanding. If we add an ever increasing number for number of sessions then we need to normalize by seconds which, again, as I understand it is just making things complicated.

The data is also not that high frequency to make sense.

If you still want to implement it, feel free to add a new field with sum for this and we can see if we can get it merged.