Re: [prometheus-developers] time() function...

2024-03-02 Thread Julius Volz
No, that expression would give you the number of seconds since the start of the last scrape of a target (or recording rule evaluation), relative to the query evaluation timestamp. For example, if you had a scrape interval of 15s, that value would move somewhere roughly between 0s - 15s. See:

[prometheus-developers] time() function...

2024-02-29 Thread Vishwanath
As per Prometheus documentation - time(0 function doesn;t give current time, but the time at which expression is evaluated (below) time() returns the number of seconds since January 1, 1970 UTC. Note that this does not actually return the current time, but the time at which the expression is to