From a46358a2f15f47293813a189050423bd71d3ff0d Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Thu, 28 Sep 2023 10:39:50 -0700 Subject: [PATCH] fix(#90): incorrect cht replication dashboard apdex calculations (#91) --- .../CHT/cht_partnerships_replication.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index 6e811e7..c78c377 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -67,11 +67,11 @@ }, { "color": "rgba(237, 129, 40, 0.89)", - "value": 70 + "value": 80 }, { "color": "#299c46", - "value": 90 + "value": 98 } ] }, @@ -110,7 +110,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "(\n ( \n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n + (\n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"180\",route=~\".*/get-ids\",code=~\"^2..$\"})\n - sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n ) / 2\n ) / sum(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\",code=~\"^2..$\"})\n) * 100", + "expr": "(\n ( \n sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"180\",code=~\"^2..$\"}[$__range]))\n + (\n sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"360\",code=~\"^2..$\"}[$__range]))\n - sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"180\",code=~\"^2..$\"}[$__range]))\n ) / 2\n ) / sum(delta(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\"}[$__range]))\n) * 100", "legendFormat": "score", "range": true, "refId": "A" @@ -288,7 +288,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "(\n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\"}\n\t)\n)*100", + "expr": "(\n\t(\n\t\tsum(\n\t\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0)\n\t\t)\n\t\t+ sum(\n\t\t\tcht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",ge=\"3600\",code=~\"^2..$\"} OR on() vector(0)\n\t\t)\n\t) / \n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\"}\n\t)\n)*100", "legendFormat": "error %", "range": true, "refId": "A" @@ -354,7 +354,7 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "(\n ( \n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"180\",code=~\"^2..$\"})\n + (\n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"360\",code=~\"^2..$\"})\n - sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",le=\"180\",code=~\"^2..$\"})\n ) / 2\n ) / sum(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^2..$\"})\n) * 100", + "expr": "(\n ( \n sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"180\",code=~\"^2..$\"}[$__range]))\n + (\n sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"360\",code=~\"^2..$\"}[$__range]))\n - sum(delta(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\",route=~\".*/get-ids\",le=\"180\",code=~\"^2..$\"}[$__range]))\n ) / 2\n ) / sum(delta(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\"}[$__range]))\n) * 100", "legendFormat": "score", "range": true, "refId": "A" @@ -572,7 +572,7 @@ "value": "2m" }, { - "selected": true, + "selected": false, "text": "10m", "value": "10m" }, @@ -582,7 +582,7 @@ "value": "30m" }, { - "selected": false, + "selected": true, "text": "1h", "value": "1h" }, @@ -626,7 +626,7 @@ ] }, "time": { - "from": "now-3h", + "from": "now-1d", "to": "now" }, "timepicker": { @@ -646,6 +646,6 @@ "timezone": "", "title": "CHT Replication", "uid": "d4f05050-804e-4ea4-9642-4d088cc39a1b", - "version": 5, + "version": 6, "weekStart": "" } \ No newline at end of file