Number of timeseries stored in DB?

16 views
Skip to first unread message

Steve

unread,
May 12, 2020, 11:25:41 AM5/12/20
to Prometheus Users
Hi
prometheus_tsdb_head_series provides the total number of active timeseries currently stored in memory.
Now I am searching for the metric that provides the total number of timeseries that are stored in the database (local storage) but I cannot find it.
I see prometheus_tsdb_storage_blocks_bytes which I think provides storage consumption but nothing about total number of timeseries.
I think it makes sense to know such number unless I am missing something.
Your help is greatly appreciated!

-Steve

Julius Volz

unread,
May 13, 2020, 5:03:03 AM5/13/20
to Steve, Prometheus Users
There's currently no way of retrieving this unfortunately. Just thinking about this, doing this would entail retrieving all series identities from all blocks, and then adding them to a deduped set (some series might be unique to a block, others might be long-lived and span all blocks), before counting the size of the set. This could get really expensive because over all time you might have billions of unique series, and you'd need to temporarily track all of them for that calculation.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/622ba80a-e198-48da-9740-998feba1ff67%40googlegroups.com.


--
Julius Volz
PromLabs - promlabs.com
Reply all
Reply to author
Forward
0 new messages