diff --git a/tests/consolidateBy/test.toml b/tests/consolidateBy/test.toml index 36ba9680..81f7a16d 100644 --- a/tests/consolidateBy/test.toml +++ b/tests/consolidateBy/test.toml @@ -23,25 +23,26 @@ template = "graphite-clickhouse.conf.tpl" [[test.input]] name = "request_success_total.counter;app=test;project=Test;environment=TEST" -points = [{value = 1.0, time = "rnow-10"}] +points = [{value = 3.0, time = "1000"}, {value = 0.0, time = "1010"}, {value = 1.0, time = "1020"}, {value = 2.0, time = "1030"}] [[test.input]] name = "request_success_total.counter;app=test;project=Test;environment=TEST;t=q" -points = [{value = 1.0, time = "rnow-10"}] +points = [{value = 3.0, time = "1000"}, {value = 0.0, time = "1010"}, {value = 1.0, time = "1020"}, {value = 2.0, time = "1030"}] [[test.input]] name = "test;env=prod" -points = [{value = 1.0, time = "rnow-10"}] +points = [{value = 3.0, time = "1000"}, {value = 0.0, time = "1010"}, {value = 1.0, time = "1020"}, {value = 2.0, time = "1030"}] [[test.input]] name = "test;env=dr" -points = [{value = 1.0, time = "rnow-10"}] +points = [{value = 3.0, time = "1000"}, {value = 0.0, time = "1010"}, {value = 1.0, time = "1020"}, {value = 2.0, time = "1030"}] # consolidateBy('max') [[test.render_checks]] -from = "rnow-10" -until = "rnow+1" +from = "1000" +until = "1030" +max_data_points = 2 timeout = "1h" targets = [ "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')", @@ -54,29 +55,30 @@ filtering_functions = [ name = "request_success_total.counter;app=test;environment=TEST;project=Test" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "max" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [3.0, 2.0] [[test.render_checks.result]] name = "request_success_total.counter;app=test;environment=TEST;project=Test;t=q" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "max" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [3.0, 2.0] # consolidateBy('min') [[test.render_checks]] -from = "rnow-10" -until = "rnow+1" +from = "1000" +until = "1030" +max_data_points = 2 timeout = "1h" targets = [ "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')", @@ -89,29 +91,31 @@ filtering_functions = [ name = "request_success_total.counter;app=test;environment=TEST;project=Test" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "min" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [0.0, 1.0] [[test.render_checks.result]] name = "request_success_total.counter;app=test;environment=TEST;project=Test;t=q" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "min" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [0.0, 1.0] + # consolidateBy('sum') [[test.render_checks]] -from = "rnow-10" -until = "rnow+1" +from = "1000" +until = "1030" +max_data_points = 2 timeout = "1h" targets = [ "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')", @@ -124,29 +128,30 @@ filtering_functions = [ name = "request_success_total.counter;app=test;environment=TEST;project=Test" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "sum" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [3.0, 3.0] [[test.render_checks.result]] name = "request_success_total.counter;app=test;environment=TEST;project=Test;t=q" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "sum" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [3.0, 3.0] # consolidateBy('avg') [[test.render_checks]] -from = "rnow-10" -until = "rnow+1" +from = "1000" +until = "1030" +max_data_points = 2 timeout = "1h" targets = [ "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')", @@ -159,29 +164,30 @@ filtering_functions = [ name = "request_success_total.counter;app=test;environment=TEST;project=Test" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "avg" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [1.5, 1.5] [[test.render_checks.result]] name = "request_success_total.counter;app=test;environment=TEST;project=Test;t=q" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "avg" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [1.5, 1.5] # consolidateBy('average') [[test.render_checks]] -from = "rnow-10" -until = "rnow+1" +from = "1000" +until = "1030" +max_data_points = 2 timeout = "1h" targets = [ "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')", @@ -194,29 +200,30 @@ filtering_functions = [ name = "request_success_total.counter;app=test;environment=TEST;project=Test" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "avg" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [1.5, 1.5] [[test.render_checks.result]] name = "request_success_total.counter;app=test;environment=TEST;project=Test;t=q" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "avg" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [1.5, 1.5] # consolidateBy('last') [[test.render_checks]] -from = "rnow-10" -until = "rnow+1" +from = "1000" +until = "1030" +max_data_points = 2 timeout = "1h" targets = [ "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')", @@ -229,29 +236,30 @@ filtering_functions = [ name = "request_success_total.counter;app=test;environment=TEST;project=Test" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "last" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [0.0, 2.0] [[test.render_checks.result]] name = "request_success_total.counter;app=test;environment=TEST;project=Test;t=q" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "last" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [0.0, 2.0] # consolidateBy('first') [[test.render_checks]] -from = "rnow-10" -until = "rnow+1" +from = "1000" +until = "1030" +max_data_points = 2 timeout = "1h" targets = [ "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')", @@ -264,29 +272,29 @@ filtering_functions = [ name = "request_success_total.counter;app=test;environment=TEST;project=Test" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "first" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [3.0, 1.0] [[test.render_checks.result]] name = "request_success_total.counter;app=test;environment=TEST;project=Test;t=q" path = "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')" consolidation = "first" -start = "rnow-10" -stop = "rnow+10" -step = 10 -req_start = "rnow-10" -req_stop = "rnow+10" -values = [1.0, nan] +start = "1000" +stop = "1040" +step = 20 +req_start = "1000" +req_stop = "1040" +values = [3.0, 1.0] # consolidateBy('invalid') [[test.render_checks]] -from = "rnow-10" -until = "rnow+1" +from = "1000" +until = "1030" timeout = "1h" targets = [ "seriesByTag('name=request_success_total.counter', 'app=test', 'project=Test', 'environment=TEST')",