node_exporter - change collection frequency/interval

24 views
Skip to first unread message

Hugo Cartigny

unread,
Dec 4, 2020, 7:19:27 AM12/4/20
to Prometheus Users
Hi everyone, this is my first post here :)

How is it possible to change the default collection frequency/interval in node_exporter?
I don't even know what it is by default.
The Github repo is reaaaally not mentioning this at all, which is very annoying.

How is the interval defined by default? What controls it? I really don't understand.

Thanks in advance for your answers :)

b.ca...@pobox.com

unread,
Dec 4, 2020, 7:35:11 AM12/4/20
to Prometheus Users
> How is it possible to change the default collection frequency/interval in node_exporter?

There isn't one.  node_exporter only collects when scraped (make a http request to it).  If you don't scrape it, it doesn't collect anything.

If you're scraping it from prometheus, then it's controlled by scrape_interval in the scrape_config (job definition).  If not set there, then it falls back to the global scrape_interval, and if that's not set either, it defaults to 1 minute.


Hugo Cartigny

unread,
Dec 4, 2020, 7:55:26 AM12/4/20
to Prometheus Users
Thank you very much!

Julien Pivotto

unread,
Dec 4, 2020, 11:02:14 AM12/4/20
to Hugo Cartigny, Prometheus Users
On 04 Dec 04:55, Hugo Cartigny wrote:
> Thank you very much!

https://github.com/prometheus/node_exporter#filtering-enabled-collectors

you can define multiple jobs and use http params:

- job_name: node
scrape_interval: 15s
params:
collect[]:
- arp
- bonding
- conntrack
- cpu
- entropy
- hwmon
- infiniband
- loadavg
- meminfo
- job_name: node_systemd
scrape_interval: 1m
params:
collect[]:
- systemd
> --
> 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/51615a91-e8b6-4550-bf39-0b7a8b06c407n%40googlegroups.com.


--
Julien Pivotto
@roidelapluie

Julien Pivotto

unread,
Dec 4, 2020, 2:56:45 PM12/4/20
to Hugo Cartigny, Prometheus Users
Sorry, it seems that I was not even answering your question.. please ignore my mail :)
Reply all
Reply to author
Forward
0 new messages