What to do for metrics that are not updated as often as the node_exporter is called?

26 views
Skip to first unread message

copocaneta

unread,
Jul 7, 2020, 3:20:44 PM7/7/20
to Prometheus Users
This user at github asked this question that was not answered:

judos commented on Mar 29
Can anyone explain why the node exporter does not support timestamps for custom metrics? So what else should I do for metrics that are not updated as often as the node_exporter is called ?

I share the same question, can anyone else help here? 

What to do for metrics that are not updated as often as the node_exporter is called?

Thanks in advance.

Stuart Clark

unread,
Jul 7, 2020, 3:24:27 PM7/7/20
to promethe...@googlegroups.com

You can't use timestamps in that case anyway as you'd end up with duplicate metric errors when scraping.

You just set the metrics via the textfile collector. It doesn't matter how frequently the node exporter is scraped.

If you want to know the time a certain less frequent process happened use a gauge where the value is a unix timestamp.


Julien Pivotto

unread,
Jul 7, 2020, 5:22:58 PM7/7/20
to Stuart Clark, promethe...@googlegroups.com
Note that the node_exporter also exports the timestamp of the files.

On 07 Jul 20:24, Stuart Clark wrote:
> On 07/07/2020 20:20, copocaneta wrote:
> > This user at github asked this question <https://github.com/prometheus/node_exporter/issues/1284#issuecomment-605718841>
> --
> 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/fa59b93e-d576-9a3a-a061-366d7633531c%40Jahingo.com.

--
Julien Pivotto
@roidelapluie
Reply all
Reply to author
Forward
0 new messages