What is Rules "Evaluation Time" and "Last Evaluation"? Do I need to invest time into query tuning?

24 views
Skip to first unread message

Evelyn Pereira Souza

unread,
Jan 6, 2021, 9:46:10 AM1/6/21
to Prometheus Users
Hi

What is Rules "Evaluation Time" and "Last Evaluation"?

Dashboard: https://example.org/prom/new/rules

Most is some value like "0.xxxms" which seems fast

But this
node_systemd_unit_state{instance=~".+yyy.+",name=~"bbb.+",state="failed"}
== 1 is 3.635ms

and

probe_ssl_earliest_cert_expiry{module=~".+-mmm-.+example.org.+|.+-ppp-.+example.net.+"}
- time() < 86400 * 30 is 16.605ms

Do I need to invest time into query tuning?

best regards

Evelyn
OpenPGP_0x61776FA8E38403FB.asc
OpenPGP_signature

Matthias Rampke

unread,
Jan 6, 2021, 9:59:37 AM1/6/21
to Evelyn Pereira Souza, Prometheus Users
No, these are still very very fast. You only need to worry when it gets into the range of several seconds.

Prometheus evaluates rules on a timer (typically every 10s to 1m, depending on your configuration), the "last evaluation time" is how long ago that last happened. If a rule group is still evaluating when the time comes to start again, an evaluation is skipped, this is when you need to worry.

Some rules evaluate in under a millisecond if they have no or only in-memory data to look at (few time series, short time intervals). But 16ms is still plenty fine, especially for recording rules.

/MR

--
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/392631c3-66fd-a684-0807-987d050fccda%40disroot.org.
Reply all
Reply to author
Forward
0 new messages