You can use “_” to mean missing data. There’s also the option of “stale”.

(This isn’t well documented right now, see e.g.
https://github.com/prometheus/prometheus/issues/7887)

David

On Fri, 16 Oct 2020 at 13:28, robpie <[email protected]> wrote:

> Hi there,
>
> I wondering is it possible to simulate missing data in series defined in
> promtool tests.
> Lets consider following test:
>
> evaluation_interval: 1m
> tests:
>     - interval: 1m
>       input_series:
>           - series: 'metric{}'
>             values: 0 4 0 10 2
>
>       promql_expr_test:
>           - expr: increase(metric[4m])
>             eval_time: 4m
>             exp_samples:
>                 - labels: 'metric{}'
>                   value: 12
>
> I would like to test scenario where second 0 in given value set is
> missing(let's say Prometheus couldn't scrap it for some reason). Is it
> possible?
>
> Regards,
> r
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/67c677ab-e71a-4a5c-8e54-ef7e7315c525n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/67c677ab-e71a-4a5c-8e54-ef7e7315c525n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAP9KPhBhNRTVqjghj-rg2%3DFfhf1%3DSqvg3B9vnkh9RusuE-t3Qg%40mail.gmail.com.

Reply via email to