samples_per_second

34 views
Skip to first unread message

Shivali Chauhan

unread,
Mar 3, 2020, 1:55:53 AM3/3/20
to Prometheus Users
Hi Team,

Do you have any idea what is the samples_per_second rate per host.
for node exporter, how many sample ingested per second per second for node exporter.

Regards,
Shivali Chauhan

Brian Candler

unread,
Mar 3, 2020, 3:51:49 AM3/3/20
to Prometheus Users
It is controlled by the prometheus server: it's whatever scrape_interval you set on the job which scrapes node_exporter.

You can do a query to find out: e.g.

count_by_time(up[5m])

will show the number of scrapes or scrape attempts in the last 5 minutes.

yasong xu

unread,
Mar 20, 2020, 4:41:15 AM3/20/20
to Prometheus Users

Error executing query: invalid parameter 'query': parse error at char 14: unknown function with name "count_by_time"

throw error, am I misunderstanding?


在 2020年3月3日星期二 UTC+8下午4:51:49,Brian Candler写道:

Julius Volz

unread,
Mar 20, 2020, 5:07:05 AM3/20/20
to Shivali Chauhan, Prometheus Users
You can find the number of samples for one target (e.g. one node exporter process) in multiple different ways:

a) Count the number of time series known for one target: count({instance="<node exporter instance name>"})
b) Query the synthetic metric that recorded the samples-per-scrape for each target: scrape_samples_scraped{instance="<node exporter instance name>"}

You can then calculate the samples per second for this target:

samples per second = samples per scrape / scrape interval in seconds

--
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/CAJzG2E8ssbe8OTF421M%2B15Gzj2Ryc3xP-bdAg3AM9YP1dbM1RA%40mail.gmail.com.

Brian Candler

unread,
Mar 20, 2020, 7:44:48 AM3/20/20
to Prometheus Users
Sorry, it's count_over_time.

count_over_time(up[5m])

will show the number of attempted scrapes over 5 minutes (regardless of whether they were successful or not)

There's also a subquery variation:

count_over_time((up == 1)[5m:])

Reply all
Reply to author
Forward
0 new messages