From 0f66c9100d2c24f0264e5ad0ec14775ee40e11c1 Mon Sep 17 00:00:00 2001 From: pavelbotsman Date: Fri, 28 Dec 2018 12:34:13 +0300 Subject: [PATCH] [#263] add grafana template model endpoints --- .../templates/grafana-dashboard.json.tmpl | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/legion/legion/templates/grafana-dashboard.json.tmpl b/legion/legion/templates/grafana-dashboard.json.tmpl index 71a7c391b..651edcaf8 100644 --- a/legion/legion/templates/grafana-dashboard.json.tmpl +++ b/legion/legion/templates/grafana-dashboard.json.tmpl @@ -72,7 +72,7 @@ "targets": [ { "refId": "A", - "target": "highestMax(hitcount(stats.legion.model.{{MODEL_ID}}.$version.request.count, '1m'), 1)", + "target": "highestMax(hitcount(stats.legion.model.{{MODEL_ID}}.$endpoint.$version.request.count, '1m'), 1)", "textEditor": false } ], @@ -146,7 +146,7 @@ "targets": [ { "refId": "A", - "target": "highestMax(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.upper, 1)" + "target": "highestMax(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.upper, 1)" } ], "thresholds": "", @@ -213,7 +213,7 @@ "targets": [ { "refId": "B", - "target": "alias(hitcount(stats.legion.model.{{MODEL_ID}}.$version.request.count, '1s'), 'Queries / second')", + "target": "alias(hitcount(stats.legion.model.{{MODEL_ID}}.$endpoint.$version.request.count, '1s'), 'Queries / second')", "textEditor": true } ], @@ -303,27 +303,27 @@ "targets": [ { "refId": "A", - "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.upper_50, '50%')", + "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.upper_50, '50%')", "textEditor": false }, { "refId": "B", - "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.upper_90, '90%')", + "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.upper_90, '90%')", "textEditor": false }, { "refId": "C", - "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.upper_95, '95%')", + "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.upper_95, '95%')", "textEditor": false }, { "refId": "D", - "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.upper_99, '99%')", + "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.upper_99, '99%')", "textEditor": false }, { "refId": "E", - "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.upper, '100%')", + "target": "alias(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.upper, '100%')", "textEditor": false } ], @@ -437,37 +437,37 @@ "targets": [ { "refId": "A", - "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.histogram.bin_5, stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.count), '<=5ms')", + "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.histogram.bin_5, stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.count), '<=5ms')", "textEditor": true }, { "refId": "B", - "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.histogram.bin_10, stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.count), '>5 ms & <=10ms')", + "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.histogram.bin_10, stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.count), '>5 ms & <=10ms')", "textEditor": true }, { "refId": "C", - "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.histogram.bin_50, stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.count), '>10 ms & <=50ms')", + "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.histogram.bin_50, stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.count), '>10 ms & <=50ms')", "textEditor": true }, { "refId": "D", - "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.histogram.bin_100, stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.count), '>50 ms & <=100ms')", + "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.histogram.bin_100, stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.count), '>50 ms & <=100ms')", "textEditor": true }, { "refId": "E", - "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.histogram.bin_200, stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.count), '>100 ms & <=200ms')", + "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.histogram.bin_200, stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.count), '>100 ms & <=200ms')", "textEditor": true }, { "refId": "F", - "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.histogram.bin_400, stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.count), '>200 ms & <=400ms')", + "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.histogram.bin_400, stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.count), '>200 ms & <=400ms')", "textEditor": true }, { "refId": "G", - "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.histogram.bin_inf, stats.timers.legion.model.{{MODEL_ID}}.$version.request.time.count), '>400 ms')", + "target": "alias(asPercent(stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.histogram.bin_inf, stats.timers.legion.model.{{MODEL_ID}}.$endpoint.$version.request.time.count), '>400 ms')", "textEditor": true } ],