promtool, tests, missing data

16 views
Skip to first unread message

robpie

unread,
Oct 16, 2020, 8:28:29 AM10/16/20
to Prometheus Users
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

David Leadbeater

unread,
Oct 16, 2020, 12:41:00 PM10/16/20
to robpie, Prometheus Users
You can use “_” to mean missing data. There’s also the option of “stale”.

(This isn’t well documented right now, see e.g. 

David

--
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/67c677ab-e71a-4a5c-8e54-ef7e7315c525n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages