Changes
Page history
document how "value" works in promtool unit tests
authored
Dec 12, 2024
by
anarcat
Hide whitespace changes
Inline
Side-by-side
service/prometheus.md
View page @
35198e37
...
...
@@ -1372,7 +1372,15 @@ tests:
# Set of fixtures for the tests below
input_series
:
-
series
:
'
node_reboot_required{alias="NetworkHealthNodeRelay",instance="akka.0x90.dk:9100",job="relay",team="network"}'
# that's "one" for 60 samples, or 60 minutes
# this means "one sample set to the value 60" or, as a Python
# list: [1, 1, 1, 1, ..., 1] or [1 for _ in range(60)]
#
# in general, the notation here is 'a+bxn' which turns into
# the list [a, a+b, a+(2*b), ..., a+(n*b)], or as a list
# comprehention [a+i*b for i in range(n)]. b defaults to zero,
# so axn is equivalent to [a for i in range(n)]
#
# see https://prometheus.io/docs/prometheus/latest/configuration/unit_testing_rules/#series
values
:
'
1x60'
alert_rule_test
:
...
...
...
...