Count Samples per Metrics

2,475 views
Skip to first unread message

anderso...@gmail.com

unread,
Aug 30, 2018, 7:08:56 PM8/30/18
to Prometheus Users
So far, we have a promql query that shows the total amount of time series per metric (count by (__name__)({__name__=~".+"})) and also per target(scrape_samples_scraped). We also can take the total amount of chunk samples (prometheus_tsdb_compaction_chunk_samples_count).

I have a system that stores metrics into tsdb with different frequencies. This means that time series and number of samples are not proportional.

Is there any way of getting the total amount of samples of each metric?

Thanks!

Brian Brazil

unread,
Aug 31, 2018, 1:30:46 AM8/31/18
to anderso...@gmail.com, Prometheus Users
You can use count_over_time for this. 

Note that having multiple scrape intervals within one Prometheus is not recommended for the sake of sanity.

--
Reply all
Reply to author
Forward
0 new messages