Open
Description
When requesting metrics in Grafana with a sum function, data after some days seems quite inflated.
- When the same data is requested another day, the result of the query can be quite inflated. See screenshots where earlier the data seems normal but when requested another day it is suddenly inflated.
- The problematic results seem to be caused by the resolution of the data, since resoltuin 1h gives inflated data, whereas raw and 5m give the actual data.
- When the metric in question has few data points, the result graph seems to always be correct, but when there's a lot of data in a metric, the resulting graph shows this problem
- When the sum is removed, the resulting timeseries, summed up by hand, give the expected value. With all resolutions, also for 1h.
You can see on the screenshots provided. Same timeframe, but suddenly the data starts to inflate multiple times over.
The query executed:
sum by (datname,usename) (cnpg_backends_total{namespace="$namespace",release="$release",pod=~"${cluster}-.*",usename!="cnpg_pooler_pgbouncer",datname!="postgres",usename!="postgres"})
It seems to resemble what happens in #922 but this should be fixed years ago.