@ -1,12 +1,12 @@
load 5m
http_requests{job="api-server", instance="0", group="production"} 0+10x10
http_requests{job="api-server", instance="1", group="production"} 0+20x10
http_requests{job="api-server", instance="0", group="canary"} 0+30x10
http_requests{job="api-server", instance="1", group="canary"} 0+40x10
http_requests{job="app-server", instance="0", group="production"} 0+50x10
http_requests{job="app-server", instance="1", group="production"} 0+60x10
http_requests{job="app-server", instance="0", group="canary"} 0+70x10
http_requests{job="app-server", instance="1", group="canary"} 0+80x10
http_requests_total {job="api-server", instance="0", group="production"} 0+10x10
http_requests_total {job="api-server", instance="1", group="production"} 0+20x10
http_requests_total {job="api-server", instance="0", group="canary"} 0+30x10
http_requests_total {job="api-server", instance="1", group="canary"} 0+40x10
http_requests_total {job="app-server", instance="0", group="production"} 0+50x10
http_requests_total {job="app-server", instance="1", group="production"} 0+60x10
http_requests_total {job="app-server", instance="0", group="canary"} 0+70x10
http_requests_total {job="app-server", instance="1", group="canary"} 0+80x10
http_requests_histogram{job="app-server", instance="1", group="production"} {{schema:1 sum:15 count:10 buckets:[3 2 5 7 9]}}x11
load 5m
@ -15,21 +15,21 @@ load 5m
vector_matching_b{l="x"} 0+4x25
eval instant at 50m SUM(http_requests) BY (job) - COUNT(http_requests) BY (job)
eval instant at 50m SUM(http_requests_total ) BY (job) - COUNT(http_requests_total ) BY (job)
{job="api-server"} 996
{job="app-server"} 2596
eval instant at 50m 2 - SUM(http_requests) BY (job)
eval instant at 50m 2 - SUM(http_requests_total ) BY (job)
{job="api-server"} -998
{job="app-server"} -2598
eval instant at 50m -http_requests{job="api-server",instance="0",group="production"}
eval instant at 50m -http_requests_total {job="api-server",instance="0",group="production"}
{job="api-server",instance="0",group="production"} -100
eval instant at 50m +http_requests{job="api-server",instance="0",group="production"}
http_requests{job="api-server",instance="0",group="production"} 100
eval instant at 50m +http_requests_total {job="api-server",instance="0",group="production"}
http_requests_total {job="api-server",instance="0",group="production"} 100
eval instant at 50m - - - SUM(http_requests) BY (job)
eval instant at 50m - - - SUM(http_requests_total ) BY (job)
{job="api-server"} -1000
{job="app-server"} -2600
@ -42,83 +42,83 @@ eval instant at 50m -2^---1*3
eval instant at 50m 2/-2^---1*3+2
-10
eval instant at 50m -10^3 * - SUM(http_requests) BY (job) ^ -1
eval instant at 50m -10^3 * - SUM(http_requests_total ) BY (job) ^ -1
{job="api-server"} 1
{job="app-server"} 0.38461538461538464
eval instant at 50m 1000 / SUM(http_requests) BY (job)
eval instant at 50m 1000 / SUM(http_requests_total ) BY (job)
{job="api-server"} 1
{job="app-server"} 0.38461538461538464
eval instant at 50m SUM(http_requests) BY (job) - 2
eval instant at 50m SUM(http_requests_total ) BY (job) - 2
{job="api-server"} 998
{job="app-server"} 2598
eval instant at 50m SUM(http_requests) BY (job) % 3
eval instant at 50m SUM(http_requests_total ) BY (job) % 3
{job="api-server"} 1
{job="app-server"} 2
eval instant at 50m SUM(http_requests) BY (job) % 0.3
eval instant at 50m SUM(http_requests_total ) BY (job) % 0.3
{job="api-server"} 0.1
{job="app-server"} 0.2
eval instant at 50m SUM(http_requests) BY (job) ^ 2
eval instant at 50m SUM(http_requests_total ) BY (job) ^ 2
{job="api-server"} 1000000
{job="app-server"} 6760000
eval instant at 50m SUM(http_requests) BY (job) % 3 ^ 2
eval instant at 50m SUM(http_requests_total ) BY (job) % 3 ^ 2
{job="api-server"} 1
{job="app-server"} 8
eval instant at 50m SUM(http_requests) BY (job) % 2 ^ (3 ^ 2)
eval instant at 50m SUM(http_requests_total ) BY (job) % 2 ^ (3 ^ 2)
{job="api-server"} 488
{job="app-server"} 40
eval instant at 50m SUM(http_requests) BY (job) % 2 ^ 3 ^ 2
eval instant at 50m SUM(http_requests_total ) BY (job) % 2 ^ 3 ^ 2
{job="api-server"} 488
{job="app-server"} 40
eval instant at 50m SUM(http_requests) BY (job) % 2 ^ 3 ^ 2 ^ 2
eval instant at 50m SUM(http_requests_total ) BY (job) % 2 ^ 3 ^ 2 ^ 2
{job="api-server"} 1000
{job="app-server"} 2600
eval instant at 50m COUNT(http_requests) BY (job) ^ COUNT(http_requests) BY (job)
eval instant at 50m COUNT(http_requests_total ) BY (job) ^ COUNT(http_requests_total ) BY (job)
{job="api-server"} 256
{job="app-server"} 256
eval instant at 50m SUM(http_requests) BY (job) / 0
eval instant at 50m SUM(http_requests_total ) BY (job) / 0
{job="api-server"} +Inf
{job="app-server"} +Inf
eval instant at 50m http_requests{group="canary", instance="0", job="api-server"} / 0
eval instant at 50m http_requests_total {group="canary", instance="0", job="api-server"} / 0
{group="canary", instance="0", job="api-server"} +Inf
eval instant at 50m -1 * http_requests{group="canary", instance="0", job="api-server"} / 0
eval instant at 50m -1 * http_requests_total {group="canary", instance="0", job="api-server"} / 0
{group="canary", instance="0", job="api-server"} -Inf
eval instant at 50m 0 * http_requests{group="canary", instance="0", job="api-server"} / 0
eval instant at 50m 0 * http_requests_total {group="canary", instance="0", job="api-server"} / 0
{group="canary", instance="0", job="api-server"} NaN
eval instant at 50m 0 * http_requests{group="canary", instance="0", job="api-server"} % 0
eval instant at 50m 0 * http_requests_total {group="canary", instance="0", job="api-server"} % 0
{group="canary", instance="0", job="api-server"} NaN
eval instant at 50m SUM(http_requests) BY (job) + SUM(http_requests) BY (job)
eval instant at 50m SUM(http_requests_total ) BY (job) + SUM(http_requests_total ) BY (job)
{job="api-server"} 2000
{job="app-server"} 5200
eval instant at 50m (SUM((http_requests)) BY (job)) + SUM(http_requests) BY (job)
eval instant at 50m (SUM((http_requests_total )) BY (job)) + SUM(http_requests_total ) BY (job)
{job="api-server"} 2000
{job="app-server"} 5200
eval instant at 50m http_requests{job="api-server", group="canary"}
http_requests{group="canary", instance="0", job="api-server"} 300
http_requests{group="canary", instance="1", job="api-server"} 400
eval instant at 50m http_requests_total {job="api-server", group="canary"}
http_requests_total {group="canary", instance="0", job="api-server"} 300
http_requests_total {group="canary", instance="1", job="api-server"} 400
eval instant at 50m http_requests{job="api-server", group="canary"} + rate(http_requests{job="api-server"}[10m]) * 5 * 60
eval instant at 50m http_requests_total {job="api-server", group="canary"} + rate(http_requests_total {job="api-server"}[10m]) * 5 * 60
{group="canary", instance="0", job="api-server"} 330
{group="canary", instance="1", job="api-server"} 440
eval instant at 50m rate(http_requests[25m]) * 25 * 60
eval instant at 50m rate(http_requests_total [25m]) * 25 * 60
{group="canary", instance="0", job="api-server"} 150
{group="canary", instance="0", job="app-server"} 350
{group="canary", instance="1", job="api-server"} 200
@ -128,7 +128,7 @@ eval instant at 50m rate(http_requests[25m]) * 25 * 60
{group="production", instance="1", job="api-server"} 100
{group="production", instance="1", job="app-server"} 300
eval instant at 50m (rate((http_requests[25m])) * 25) * 60
eval instant at 50m (rate((http_requests_total [25m])) * 25) * 60
{group="canary", instance="0", job="api-server"} 150
{group="canary", instance="0", job="app-server"} 350
{group="canary", instance="1", job="api-server"} 200
@ -139,53 +139,53 @@ eval instant at 50m (rate((http_requests[25m])) * 25) * 60
{group="production", instance="1", job="app-server"} 300
eval instant at 50m http_requests{group="canary"} and http_requests{instance="0"}
http_requests{group="canary", instance="0", job="api-server"} 300
http_requests{group="canary", instance="0", job="app-server"} 700
eval instant at 50m http_requests_total {group="canary"} and http_requests_total {instance="0"}
http_requests_total {group="canary", instance="0", job="api-server"} 300
http_requests_total {group="canary", instance="0", job="app-server"} 700
eval instant at 50m (http_requests{group="canary"} + 1) and http_requests{instance="0"}
eval instant at 50m (http_requests_total {group="canary"} + 1) and http_requests_total {instance="0"}
{group="canary", instance="0", job="api-server"} 301
{group="canary", instance="0", job="app-server"} 701
eval instant at 50m (http_requests{group="canary"} + 1) and on(instance, job) http_requests{instance="0", group="production"}
eval instant at 50m (http_requests_total {group="canary"} + 1) and on(instance, job) http_requests_total {instance="0", group="production"}
{group="canary", instance="0", job="api-server"} 301
{group="canary", instance="0", job="app-server"} 701
eval instant at 50m (http_requests{group="canary"} + 1) and on(instance) http_requests{instance="0", group="production"}
eval instant at 50m (http_requests_total {group="canary"} + 1) and on(instance) http_requests_total {instance="0", group="production"}
{group="canary", instance="0", job="api-server"} 301
{group="canary", instance="0", job="app-server"} 701
eval instant at 50m (http_requests{group="canary"} + 1) and ignoring(group) http_requests{instance="0", group="production"}
eval instant at 50m (http_requests_total {group="canary"} + 1) and ignoring(group) http_requests_total {instance="0", group="production"}
{group="canary", instance="0", job="api-server"} 301
{group="canary", instance="0", job="app-server"} 701
eval instant at 50m (http_requests{group="canary"} + 1) and ignoring(group, job) http_requests{instance="0", group="production"}
eval instant at 50m (http_requests_total {group="canary"} + 1) and ignoring(group, job) http_requests_total {instance="0", group="production"}
{group="canary", instance="0", job="api-server"} 301
{group="canary", instance="0", job="app-server"} 701
eval instant at 50m http_requests{group="canary"} or http_requests{group="production"}
http_requests{group="canary", instance="0", job="api-server"} 300
http_requests{group="canary", instance="0", job="app-server"} 700
http_requests{group="canary", instance="1", job="api-server"} 400
http_requests{group="canary", instance="1", job="app-server"} 800
http_requests{group="production", instance="0", job="api-server"} 100
http_requests{group="production", instance="0", job="app-server"} 500
http_requests{group="production", instance="1", job="api-server"} 200
http_requests{group="production", instance="1", job="app-server"} 600
eval instant at 50m http_requests_total {group="canary"} or http_requests_total {group="production"}
http_requests_total {group="canary", instance="0", job="api-server"} 300
http_requests_total {group="canary", instance="0", job="app-server"} 700
http_requests_total {group="canary", instance="1", job="api-server"} 400
http_requests_total {group="canary", instance="1", job="app-server"} 800
http_requests_total {group="production", instance="0", job="api-server"} 100
http_requests_total {group="production", instance="0", job="app-server"} 500
http_requests_total {group="production", instance="1", job="api-server"} 200
http_requests_total {group="production", instance="1", job="app-server"} 600
# On overlap the rhs samples must be dropped.
eval instant at 50m (http_requests{group="canary"} + 1) or http_requests{instance="1"}
eval instant at 50m (http_requests_total {group="canary"} + 1) or http_requests_total {instance="1"}
{group="canary", instance="0", job="api-server"} 301
{group="canary", instance="0", job="app-server"} 701
{group="canary", instance="1", job="api-server"} 401
{group="canary", instance="1", job="app-server"} 801
http_requests{group="production", instance="1", job="api-server"} 200
http_requests{group="production", instance="1", job="app-server"} 600
http_requests_total {group="production", instance="1", job="api-server"} 200
http_requests_total {group="production", instance="1", job="app-server"} 600
# Matching only on instance excludes everything that has instance=0/1 but includes
# entries without the instance label.
eval instant at 50m (http_requests{group="canary"} + 1) or on(instance) (http_requests or cpu_count or vector_matching_a)
eval instant at 50m (http_requests_total {group="canary"} + 1) or on(instance) (http_requests_total or cpu_count or vector_matching_a)
{group="canary", instance="0", job="api-server"} 301
{group="canary", instance="0", job="app-server"} 701
{group="canary", instance="1", job="api-server"} 401
@ -193,7 +193,7 @@ eval instant at 50m (http_requests{group="canary"} + 1) or on(instance) (http_re
vector_matching_a{l="x"} 10
vector_matching_a{l="y"} 20
eval instant at 50m (http_requests{group="canary"} + 1) or ignoring(l, group, job) (http_requests or cpu_count or vector_matching_a)
eval instant at 50m (http_requests_total {group="canary"} + 1) or ignoring(l, group, job) (http_requests_total or cpu_count or vector_matching_a)
{group="canary", instance="0", job="api-server"} 301
{group="canary", instance="0", job="app-server"} 701
{group="canary", instance="1", job="api-server"} 401
@ -201,81 +201,81 @@ eval instant at 50m (http_requests{group="canary"} + 1) or ignoring(l, group, jo
vector_matching_a{l="x"} 10
vector_matching_a{l="y"} 20
eval instant at 50m http_requests{group="canary"} unless http_requests{instance="0"}
http_requests{group="canary", instance="1", job="api-server"} 400
http_requests{group="canary", instance="1", job="app-server"} 800
eval instant at 50m http_requests_total {group="canary"} unless http_requests_total {instance="0"}
http_requests_total {group="canary", instance="1", job="api-server"} 400
http_requests_total {group="canary", instance="1", job="app-server"} 800
eval instant at 50m http_requests{group="canary"} unless on(job) http_requests{instance="0"}
eval instant at 50m http_requests_total {group="canary"} unless on(job) http_requests_total {instance="0"}
eval instant at 50m http_requests{group="canary"} unless on(job, instance) http_requests{instance="0"}
http_requests{group="canary", instance="1", job="api-server"} 400
http_requests{group="canary", instance="1", job="app-server"} 800
eval instant at 50m http_requests_total {group="canary"} unless on(job, instance) http_requests_total {instance="0"}
http_requests_total {group="canary", instance="1", job="api-server"} 400
http_requests_total {group="canary", instance="1", job="app-server"} 800
eval instant at 50m http_requests{group="canary"} / on(instance,job) http_requests{group="production"}
eval instant at 50m http_requests_total {group="canary"} / on(instance,job) http_requests_total {group="production"}
{instance="0", job="api-server"} 3
{instance="0", job="app-server"} 1.4
{instance="1", job="api-server"} 2
{instance="1", job="app-server"} 1.3333333333333333
eval instant at 50m http_requests{group="canary"} unless ignoring(group, instance) http_requests{instance="0"}
eval instant at 50m http_requests_total {group="canary"} unless ignoring(group, instance) http_requests_total {instance="0"}
eval instant at 50m http_requests{group="canary"} unless ignoring(group) http_requests{instance="0"}
http_requests{group="canary", instance="1", job="api-server"} 400
http_requests{group="canary", instance="1", job="app-server"} 800
eval instant at 50m http_requests_total {group="canary"} unless ignoring(group) http_requests_total {instance="0"}
http_requests_total {group="canary", instance="1", job="api-server"} 400
http_requests_total {group="canary", instance="1", job="app-server"} 800
eval instant at 50m http_requests{group="canary"} / ignoring(group) http_requests{group="production"}
eval instant at 50m http_requests_total {group="canary"} / ignoring(group) http_requests_total {group="production"}
{instance="0", job="api-server"} 3
{instance="0", job="app-server"} 1.4
{instance="1", job="api-server"} 2
{instance="1", job="app-server"} 1.3333333333333333
# https://github.com/prometheus/prometheus/issues/1489
eval instant at 50m http_requests AND ON (dummy) vector(1)
http_requests{group="canary", instance="0", job="api-server"} 300
http_requests{group="canary", instance="0", job="app-server"} 700
http_requests{group="canary", instance="1", job="api-server"} 400
http_requests{group="canary", instance="1", job="app-server"} 800
http_requests{group="production", instance="0", job="api-server"} 100
http_requests{group="production", instance="0", job="app-server"} 500
http_requests{group="production", instance="1", job="api-server"} 200
http_requests{group="production", instance="1", job="app-server"} 600
eval instant at 50m http_requests AND IGNORING (group, instance, job) vector(1)
http_requests{group="canary", instance="0", job="api-server"} 300
http_requests{group="canary", instance="0", job="app-server"} 700
http_requests{group="canary", instance="1", job="api-server"} 400
http_requests{group="canary", instance="1", job="app-server"} 800
http_requests{group="production", instance="0", job="api-server"} 100
http_requests{group="production", instance="0", job="app-server"} 500
http_requests{group="production", instance="1", job="api-server"} 200
http_requests{group="production", instance="1", job="app-server"} 600
eval instant at 50m http_requests_total AND ON (dummy) vector(1)
http_requests_total {group="canary", instance="0", job="api-server"} 300
http_requests_total {group="canary", instance="0", job="app-server"} 700
http_requests_total {group="canary", instance="1", job="api-server"} 400
http_requests_total {group="canary", instance="1", job="app-server"} 800
http_requests_total {group="production", instance="0", job="api-server"} 100
http_requests_total {group="production", instance="0", job="app-server"} 500
http_requests_total {group="production", instance="1", job="api-server"} 200
http_requests_total {group="production", instance="1", job="app-server"} 600
eval instant at 50m http_requests_total AND IGNORING (group, instance, job) vector(1)
http_requests_total {group="canary", instance="0", job="api-server"} 300
http_requests_total {group="canary", instance="0", job="app-server"} 700
http_requests_total {group="canary", instance="1", job="api-server"} 400
http_requests_total {group="canary", instance="1", job="app-server"} 800
http_requests_total {group="production", instance="0", job="api-server"} 100
http_requests_total {group="production", instance="0", job="app-server"} 500
http_requests_total {group="production", instance="1", job="api-server"} 200
http_requests_total {group="production", instance="1", job="app-server"} 600
# Comparisons.
eval instant at 50m SUM(http_requests) BY (job) > 1000
eval instant at 50m SUM(http_requests_total ) BY (job) > 1000
{job="app-server"} 2600
eval instant at 50m 1000 < SUM(http_requests) BY (job)
eval instant at 50m 1000 < SUM(http_requests_total ) BY (job)
{job="app-server"} 2600
eval instant at 50m SUM(http_requests) BY (job) <= 1000
eval instant at 50m SUM(http_requests_total ) BY (job) <= 1000
{job="api-server"} 1000
eval instant at 50m SUM(http_requests) BY (job) != 1000
eval instant at 50m SUM(http_requests_total ) BY (job) != 1000
{job="app-server"} 2600
eval instant at 50m SUM(http_requests) BY (job) == 1000
eval instant at 50m SUM(http_requests_total ) BY (job) == 1000
{job="api-server"} 1000
eval instant at 50m SUM(http_requests) BY (job) == bool 1000
eval instant at 50m SUM(http_requests_total ) BY (job) == bool 1000
{job="api-server"} 1
{job="app-server"} 0
eval instant at 50m SUM(http_requests) BY (job) == bool SUM(http_requests) BY (job)
eval instant at 50m SUM(http_requests_total ) BY (job) == bool SUM(http_requests_total ) BY (job)
{job="api-server"} 1
{job="app-server"} 1
eval instant at 50m SUM(http_requests) BY (job) != bool SUM(http_requests) BY (job)
eval instant at 50m SUM(http_requests_total ) BY (job) != bool SUM(http_requests_total ) BY (job)
{job="api-server"} 0
{job="app-server"} 0
@ -285,12 +285,12 @@ eval instant at 50m 0 == bool 1
eval instant at 50m 1 == bool 1
1
eval instant at 50m http_requests{job="api-server", instance="0", group="production"} == bool 100
eval instant at 50m http_requests_total {job="api-server", instance="0", group="production"} == bool 100
{job="api-server", instance="0", group="production"} 1
# The histogram is ignored here so the result doesn't change but it has an info annotation now.
eval_info instant at 5m {job="app-server"} == 80
http_requests{group="canary", instance="1", job="app-server"} 80
http_requests_total {group="canary", instance="1", job="app-server"} 80
eval_info instant at 5m http_requests_histogram != 80
@ -673,7 +673,7 @@ eval_info range from 0 to 24m step 6m left_histograms == 0
eval_info range from 0 to 24m step 6m left_histograms != 3
# No results.
eval range from 0 to 24m step 6m left_histograms != 0
eval_info range from 0 to 24m step 6m left_histograms != 0
# No results.
eval_info range from 0 to 24m step 6m left_histograms > 3
@ -682,7 +682,7 @@ eval_info range from 0 to 24m step 6m left_histograms > 3
eval_info range from 0 to 24m step 6m left_histograms > 0
# No results.
eval range from 0 to 24m step 6m left_histograms >= 3
eval_info range from 0 to 24m step 6m left_histograms >= 3
# No results.
eval_info range from 0 to 24m step 6m left_histograms >= 0
@ -697,7 +697,7 @@ eval_info range from 0 to 24m step 6m left_histograms < 0
eval_info range from 0 to 24m step 6m left_histograms <= 3
# No results.
eval range from 0 to 24m step 6m left_histograms <= 0
eval_info range from 0 to 24m step 6m left_histograms <= 0
# No results.
eval_info range from 0 to 24m step 6m left_histograms == bool 3
@ -770,40 +770,40 @@ eval range from 0 to 60m step 6m NaN == left_floats
eval range from 0 to 60m step 6m NaN == bool left_floats
{} 0 0 _ _ 0 _ 0 0 0 0 0
eval range from 0 to 24m step 6m 3 == left_histograms
eval_info range from 0 to 24m step 6m 3 == left_histograms
# No results.
eval range from 0 to 24m step 6m 0 == left_histograms
eval_info range from 0 to 24m step 6m 0 == left_histograms
# No results.
eval range from 0 to 24m step 6m 3 != left_histograms
eval_info range from 0 to 24m step 6m 3 != left_histograms
# No results.
eval range from 0 to 24m step 6m 0 != left_histograms
eval_info range from 0 to 24m step 6m 0 != left_histograms
# No results.
eval range from 0 to 24m step 6m 3 < left_histograms
eval_info range from 0 to 24m step 6m 3 < left_histograms
# No results.
eval range from 0 to 24m step 6m 0 < left_histograms
eval_info range from 0 to 24m step 6m 0 < left_histograms
# No results.
eval range from 0 to 24m step 6m 3 < left_histograms
eval_info range from 0 to 24m step 6m 3 < left_histograms
# No results.
eval range from 0 to 24m step 6m 0 < left_histograms
eval_info range from 0 to 24m step 6m 0 < left_histograms
# No results.
eval range from 0 to 24m step 6m 3 > left_histograms
eval_info range from 0 to 24m step 6m 3 > left_histograms
# No results.
eval range from 0 to 24m step 6m 0 > left_histograms
eval_info range from 0 to 24m step 6m 0 > left_histograms
# No results.
eval range from 0 to 24m step 6m 3 >= left_histograms
eval_info range from 0 to 24m step 6m 3 >= left_histograms
# No results.
eval range from 0 to 24m step 6m 0 >= left_histograms
eval_info range from 0 to 24m step 6m 0 >= left_histograms
# No results.
clear