> The assumptions I've made are basically three:
> - Prometheus does that "faking" of sample times, and thus these are
>   always on point with exactly the scrape interval between each.
>   This in turn should mean, that if I have e.g. a scrape interval of
>   10s, and I do up[20s], then regardless of when this is done, I get
>   at least 2 samples, and in some rare cases (when the evaluation
>   happens exactly on a scrape time), 3 samples.
>   Never more, never less.
>   Which for `up` I think should be true, as Prometheus itself
>   generates it, right, and not the exporter that is scraped.
> - The evaluation interval is sufficiently less than the scrape
>   interval, so that it's guaranteed that none of the `up`-samples are
>   being missed.

I don't believe this assumption about up{} is correct. My understanding
is that up{} is not merely an indication that Prometheus has connected
to the target exporter, but an indication that it has successfully
scraped said exporter. Prometheus can only know this after all samples
from the scrape target have been received and ingested and there are no
unexpected errors, which means that just like other metrics from the
scrape, up{} can only be visible after the scrape has finished (and
Prometheus knows whether it succeeded or not).

How long scrapes take is variable and can be up to almost their timeout
interval. You may wish to check 'scrape_duration_seconds'. Our metrics
suggest that this can go right up to the timeout (possibly in the case
of failed scrapes).

        - cks

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/2784936.1712256052%40apps0.cs.toronto.edu.

Reply via email to