Hi,
I’ve noticed an unexpected thing since we just recently deployed and started using Thanos with our existing Prometheus environment (my question here is more Prometheus though - not Thanos).
Regarding when TSDB blocks are created by Prometheus…
They seem to miss the last hour from the WAL. We don’t notice this when using the Prometheus datasource (I guess it’s combining blocks and WAL data) but with the Thanos datasource it is noticeable.
Incidentally, we have the recommended storage.tsdb.min-block-duration=2h and storage.tsdb.max-block-duration=2h in our Prometheus config since deploying Thanos.
But what I see in the Prometheus file system (this is just after 10AM BST this morning):
- A block has been created at 10 AM BST - showing at 09:00 UTC in the file system - all OK so far
- But if I look at the
meta.jsonfile, it shows this:- “minTime”: 1776060000042,
- “maxTime”: 1776067200000,
- Which is from 6 AM GMT/UTC (7 AM BST) to 8 AM GMT/UTC (9 AM BST)
- And if I look in the
walfolder just after the block is created, I see a further 1 hour of files (covering, I guess, from 9 AM BST up to current 10 AM BST)
So what I’m curious about is why, when a block is created at 10AM BST would it only contain the 2 hours from 7AM BST to 9AM BST and leave an hour in the wal folder?
Our Prometheus version is 2.53.0, which admittedly is a little behind the latest.
I’m not sure if this might be a daylight-saving issue. I only noticed it since we changed from GMT to BST in the UK.
Has anyone experienced this before? Or does this look like a common thing with TSDB blocks being written?
Thanks,
G


