Hi,
I've got a question about collecting ephemeral metrics.
As far as I know, Prometheus stores scraped samples in in-memory chunks and persists them only when they become full.
And a chunk stores samples belonging to a single time series.
So, let's say a time series is sampled only once. A chunk will be made for that sample. Will the chunk remain forever in the memory?
If incomplete chunks remain in memory forever, Prometheus server will end up with throttling scrape when the max chunk number is exceeded by 10%.
More realistic scenario is as follows:
A docker container runs only when a request arrives. When it has processed the request, the docker container stops.
In the meantime, the docker container exports application-specific metrics, which have a label of docker container id.
Now, because total number of docker containers is limited, the number of active time series in an instant is upper-bounded (let's say the number is far below 1M)
However, the total cardinality will grow indefinitely, as the new docker container will have different container id.
Am I misunderstanding something? Or is Prometheus simply not a right solution for ephemeral time series?
Oops, thanks for quick answer.
Does 'written out' mean that the chunk will be persisted AND removed from memory?
If it's only persisted and still counted as in-memory chunks, Prometheus will throttle scraping.
Actually, I've tested this scenario after I got your answer. I let Prometheus scrape only once, and then turn down the target so that no more samples are gathered.
Even after 1 and half hour, the number of chunks in the memory (prometheus_local_storage_memory_chunks) does not seem to decrease.
Is there a config paramter to change that 1 hour?
2016년 5월 11일 수요일 오전 11시 59분 4초 UTC+9, Brian Brazil 님의 말:On 11 May 2016 at 03:42, JAE HOON KO <roen...@gmail.com> wrote:Hi,
I've got a question about collecting ephemeral metrics.
As far as I know, Prometheus stores scraped samples in in-memory chunks and persists them only when they become full.
And a chunk stores samples belonging to a single time series.
So, let's say a time series is sampled only once. A chunk will be made for that sample. Will the chunk remain forever in the memory?It'll be written out after an hour of no new data.If incomplete chunks remain in memory forever, Prometheus server will end up with throttling scrape when the max chunk number is exceeded by 10%.
More realistic scenario is as follows:
A docker container runs only when a request arrives. When it has processed the request, the docker container stops.
In the meantime, the docker container exports application-specific metrics, which have a label of docker container id.
Now, because total number of docker containers is limited, the number of active time series in an instant is upper-bounded (let's say the number is far below 1M)
However, the total cardinality will grow indefinitely, as the new docker container will have different container id.
Am I misunderstanding something? Or is Prometheus simply not a right solution for ephemeral time series?You're not looking for time series here, you're looking for an event logging solution such as the ELK stack.--Brian Brazil
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
Wow, thanks.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.