From ad84b1d50a91fcd1f263b509b2f375b706147d66 Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Tue, 18 Jul 2023 01:48:47 -0700 Subject: [PATCH 01/17] Dashboard with replication metrics for partners --- .../CHT/cht_partnerships_replication.json | 739 ++++++++++++++++++ 1 file changed, 739 insertions(+) create mode 100644 grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json new file mode 100644 index 0000000..a618c54 --- /dev/null +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -0,0 +1,739 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Monitor metrics for CHT replication health", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 12230, + "graphTooltip": 0, + "id": 5, + "links": [], + "liveNow": false, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 64, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^[23]..$\"}) ", + "legendFormat": "Success", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0))", + "hide": false, + "instant": false, + "legendFormat": "Error", + "range": true, + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Replication Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:178", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:179", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "description": "Target replication performance under 3min.\nTolerated replication performance under 6min.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#C4162A", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "#299c46", + "value": 90 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 6, + "x": 12, + "y": 0 + }, + "id": 51, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "(\n ( \n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n + (\n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",route=~\".*/get-ids\",code=~\"^2..$\"})\n - sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n ) / 2\n ) / sum(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^2..$\"})\n) * 100", + "legendFormat": "score", + "range": true, + "refId": "A" + } + ], + "title": "Replication Apdex", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 5 + }, + { + "color": "#C4162A", + "value": 10 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 63, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "(\n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}\n\t)\n)*100", + "legendFormat": "error %", + "range": true, + "refId": "A" + } + ], + "title": "Error", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 2 + }, + "hiddenSeries": false, + "id": 73, + "legend": { + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "(\n ( \n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",code=~\"^2..$\"})\n + (\n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"360\",code=~\"^2..$\"})\n - sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",code=~\"^2..$\"})\n ) / 2\n ) / sum(http_request_duration_seconds_count{instance=~\"$instance\",code=~\"^2..$\"})\n) * 100", + "legendFormat": "score", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Replication Apdex", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:624", + "format": "short", + "logBase": 1, + "max": "100", + "show": true + }, + { + "$$hashKey": "object:625", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 6 + }, + "hiddenSeries": false, + "id": 32, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}[$interval])) by (route)", + "legendFormat": "{{route}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Replications Per Seconds", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:573", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:574", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 11 + }, + "hiddenSeries": false, + "id": 18, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.5, sum by(le) (rate(http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", + "legendFormat": "50th Percentile", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.90, sum by(le) (rate(http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", + "hide": false, + "instant": false, + "legendFormat": "90th Percentile", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "histogram_quantile(1.00, sum by(le) (rate(http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", + "hide": false, + "instant": false, + "legendFormat": "Max", + "range": true, + "refId": "C" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Replication Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:748", + "format": "s", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:749", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "refresh": "5s", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "definition": "query_result(up{job=~\"cht\"})", + "hide": 0, + "includeAll": false, + "label": "CHT Instance", + "multi": false, + "name": "cht_instance", + "options": [], + "query": { + "query": "query_result(up{job=~\"cht\"})", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/.*instance=\"([^\"]+).*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "selected": false, + "text": "12h", + "value": "12h" + }, + "hide": 0, + "name": "interval", + "options": [ + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": true, + "text": "12h", + "value": "12h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + }, + { + "selected": false, + "text": "7d", + "value": "7d" + }, + { + "selected": false, + "text": "14d", + "value": "14d" + }, + { + "selected": false, + "text": "30d", + "value": "30d" + } + ], + "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "queryValue": "", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "CHT Replication Dashboard", + "uid": "d4f05050-804e-4ea4-9642-4d088cc39a1b", + "version": 4, + "weekStart": "" +} \ No newline at end of file From ae8cd1b962b604d49b793610db9dd7d655f61e4c Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Tue, 18 Jul 2023 01:52:54 -0700 Subject: [PATCH 02/17] Move apdex in left column --- .../CHT/cht_partnerships_replication.json | 188 +++++++++--------- 1 file changed, 94 insertions(+), 94 deletions(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index a618c54..8360395 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -15,7 +15,7 @@ } ] }, - "description": "Monitor metrics for CHT replication health", + "description": "Monitor metrics for replication health", "editable": true, "fiscalYearStartMonth": 0, "gnetId": 12230, @@ -24,6 +24,89 @@ "links": [], "liveNow": false, "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "description": "Target replication performance under 3min.\nTolerated replication performance under 6min.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#C4162A", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "#299c46", + "value": 90 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 51, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" + }, + "editorMode": "code", + "expr": "(\n ( \n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n + (\n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",route=~\".*/get-ids\",code=~\"^2..$\"})\n - sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n ) / 2\n ) / sum(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^2..$\"})\n) * 100", + "legendFormat": "score", + "range": true, + "refId": "A" + } + ], + "title": "Replication Apdex", + "type": "stat" + }, { "aliasColors": {}, "bars": false, @@ -44,7 +127,7 @@ "gridPos": { "h": 6, "w": 12, - "x": 0, + "x": 12, "y": 0 }, "hiddenSeries": false, @@ -135,89 +218,6 @@ "align": false } }, - { - "datasource": { - "type": "prometheus", - "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" - }, - "description": "Target replication performance under 3min.\nTolerated replication performance under 6min.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#C4162A", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 70 - }, - { - "color": "#299c46", - "value": 90 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 51, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" - }, - "editorMode": "code", - "expr": "(\n ( \n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n + (\n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",route=~\".*/get-ids\",code=~\"^2..$\"})\n - sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n ) / 2\n ) / sum(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^2..$\"})\n) * 100", - "legendFormat": "score", - "range": true, - "refId": "A" - } - ], - "title": "Replication Apdex", - "type": "stat" - }, { "datasource": { "type": "prometheus", @@ -262,9 +262,9 @@ }, "gridPos": { "h": 2, - "w": 6, - "x": 18, - "y": 0 + "w": 12, + "x": 0, + "y": 2 }, "id": 63, "links": [], @@ -318,10 +318,10 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 5, + "h": 9, "w": 12, - "x": 12, - "y": 2 + "x": 0, + "y": 4 }, "hiddenSeries": false, "id": 73, @@ -416,7 +416,7 @@ "gridPos": { "h": 5, "w": 12, - "x": 0, + "x": 12, "y": 6 }, "hiddenSeries": false, @@ -513,7 +513,7 @@ "gridPos": { "h": 9, "w": 12, - "x": 0, + "x": 12, "y": 11 }, "hiddenSeries": false, @@ -734,6 +734,6 @@ "timezone": "", "title": "CHT Replication Dashboard", "uid": "d4f05050-804e-4ea4-9642-4d088cc39a1b", - "version": 4, + "version": 6, "weekStart": "" } \ No newline at end of file From b9e15828ee2686d798488911330ec824a241cefa Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Tue, 18 Jul 2023 23:45:36 -0700 Subject: [PATCH 03/17] Rename dashboard (require 4.3) --- .../dashboards/CHT/cht_partnerships_replication.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index 8360395..ce32226 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -732,7 +732,7 @@ ] }, "timezone": "", - "title": "CHT Replication Dashboard", + "title": "CHT Replication Dashboard (Requires CHT Core 4.3)", "uid": "d4f05050-804e-4ea4-9642-4d088cc39a1b", "version": 6, "weekStart": "" From 3228e19a3eabef947d1900750197a83732773f0b Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Tue, 18 Jul 2023 23:46:01 -0700 Subject: [PATCH 04/17] New dashboard for API (Node.js/Express) --- .../dashboards/CHT/cht_admin_api_express.json | 2738 +++++++++++++++++ 1 file changed, 2738 insertions(+) create mode 100644 grafana/provisioning/dashboards/CHT/cht_admin_api_express.json diff --git a/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json b/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json new file mode 100644 index 0000000..91953db --- /dev/null +++ b/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json @@ -0,0 +1,2738 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Monitor metrics for CHT API node.js and express router status.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 12230, + "graphTooltip": 0, + "id": 7, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 100 + }, + { + "color": "#C4162A", + "value": 200 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 0 + }, + "id": 57, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$instance\"}[$interval]))", + "refId": "A" + } + ], + "title": "QPS", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 2, + "y": 0 + }, + "id": 53, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\"})", + "instant": false, + "refId": "A" + } + ], + "title": "Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 5 + }, + { + "color": "#C4162A", + "value": 10 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 6, + "y": 0 + }, + "id": 63, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "(\n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$instance\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$instance\"}\n\t)\n)*100", + "legendFormat": "error %", + "refId": "A" + } + ], + "title": "Error", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 8, + "y": 0 + }, + "id": 59, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(http_response_size_bytes_sum{instance=~\"$instance\"}) + sum(http_request_size_bytes_sum{instance=~\"$instance\"})", + "refId": "A" + } + ], + "title": "Transferred", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 12, + "y": 0 + }, + "id": 70, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(rate(http_response_size_bytes_sum{instance=~\"$instance\"}[$interval])) + sum(rate(http_request_size_bytes_sum{instance=~\"$instance\"}[$interval]))", + "refId": "A" + } + ], + "title": "Transfer Rate", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "#C4162A", + "value": 2 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 15, + "y": 0 + }, + "id": 61, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(changes(process_start_time_seconds{instance=~\"$instance\"}[$restarts_interval]))", + "refId": "A" + } + ], + "title": "Restarts in $restarts_interval", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 87, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Node.js Process", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 3 + }, + "hiddenSeries": false, + "id": 21, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_eventloop_lag_seconds{instance=~\"$instance\"}", + "hide": false, + "instant": false, + "legendFormat": "last", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_eventloop_lag_p99_seconds{instance=~\"$instance\"}", + "legendFormat": "p99", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_eventloop_lag_p50_seconds{instance=~\"$instance\"}", + "legendFormat": "p50", + "refId": "C" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Eventloop Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 8, + "y": 3 + }, + "hiddenSeries": false, + "id": 42, + "legend": { + "avg": true, + "current": false, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "rate(process_cpu_seconds_total{instance=~\"$instance\"}[$interval])", + "legendFormat": "cpu", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Rate of CPU Time Spent", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 3 + }, + "hiddenSeries": false, + "id": 82, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "process_virtual_memory_bytes{instance=~\"$instance\"}", + "legendFormat": "virtual memory", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "process_heap_bytes{instance=~\"$instance\"}", + "legendFormat": "heap memory", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Process Memory", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 77, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "expressjs_number_of_open_connections{instance=~\"$instance\"}", + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Number of Open Connections", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 8, + "y": 8 + }, + "hiddenSeries": false, + "id": 79, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "( process_open_fds{instance=~\"$instance\"} / process_max_fds{instance=~\"$instance\"})", + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Used File Descriptors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percentunit", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 8 + }, + "hiddenSeries": false, + "id": 66, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_active_handles_total{instance=~\"$instance\"}", + "legendFormat": "Active Handler", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_active_requests_total{instance=~\"$instance\"}", + "legendFormat": "Active Request", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Active Handlers/Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 40, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Node.js Garbage Collection", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 14 + }, + "hiddenSeries": false, + "id": 43, + "legend": { + "avg": true, + "current": false, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "rate(nodejs_gc_duration_seconds_sum{instance=~\"$instance\"}[$interval])", + "legendFormat": "{{kind}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Rate of Garbage Collection Duration", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 14 + }, + "hiddenSeries": false, + "id": 38, + "legend": { + "avg": true, + "current": false, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "rate(nodejs_gc_duration_seconds_count{instance=~\"$instance\"}[$interval])", + "legendFormat": "{{kind}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Rate of Garbage Collection", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 19 + }, + "hiddenSeries": false, + "id": 46, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_gc_duration_seconds_sum{instance=~\"$instance\"}", + "legendFormat": "{{kind}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Garbage Collection Duration", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 2, + "show": true + }, + { + "format": "s", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 19 + }, + "hiddenSeries": false, + "id": 45, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_gc_duration_seconds_count{instance=~\"$instance\"}", + "legendFormat": "{{kind}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Garbage Collection Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 2, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 24 + }, + "hiddenSeries": false, + "id": 34, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_heap_size_total_bytes{instance=~\"$instance\"}", + "legendFormat": "total", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_heap_size_used_bytes{instance=~\"$instance\"}", + "legendFormat": "used", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "process_resident_memory_bytes{instance=~\"$instance\"}", + "legendFormat": "resident", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_external_memory_bytes{instance=~\"$instance\"}", + "legendFormat": "external", + "refId": "D" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Heap Memory Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 24 + }, + "hiddenSeries": false, + "id": 36, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "nodejs_heap_space_size_used_bytes{instance=~\"$instance\"}", + "legendFormat": "{{space}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Heap Space Used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 26, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Express Route", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 30 + }, + "hiddenSeries": false, + "id": 32, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$instance\"}[$interval])) by (code)", + "legendFormat": "{{code}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Requests Per Seconds", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 30 + }, + "hiddenSeries": false, + "id": 18, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{instance=~\"$instance\"}[$interval])) by (code,le))", + "legendFormat": "{{code}}(95%)", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "histogram_quantile(1, sum(rate(http_request_duration_seconds_bucket{instance=~\"$instance\"}[$interval])) by (code,le))", + "legendFormat": "{{code}}(100%)", + "refId": "E" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Response Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 35 + }, + "hiddenSeries": false, + "id": 44, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\"}) by (code)", + "legendFormat": "{{code}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Code Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 38 + }, + "hiddenSeries": false, + "id": 30, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(http_response_size_bytes_sum{instance=~\"$instance\"}) by (route)", + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Response Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 2, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 40 + }, + "hiddenSeries": false, + "id": 64, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\"}) by (route)", + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Request Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 0, + "y": 46 + }, + "id": 95, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "s" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$instance\"}))", + "instant": true, + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "title": "Top 5 Request Duration", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 4, + "y": 46 + }, + "id": 89, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "s" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$instance\",code=~\"^[23]..$\"}))", + "instant": true, + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "title": "Top 5 Success Duration", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 8, + "y": 46 + }, + "id": 93, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "s" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$instance\",code=~\"^[45]..$\"}))", + "instant": true, + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "title": "Top 5 Error Duration", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 12, + "y": 46 + }, + "id": 96, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, sum by (route)(http_request_duration_seconds_count{instance=~\"$instance\"}))", + "instant": true, + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "title": "Top 5 Request Count", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 16, + "y": 46 + }, + "id": 91, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, http_request_duration_seconds_count{instance=~\"$instance\",code=~\"^[23]..$\"})", + "instant": true, + "legendFormat": "({{code}}) {{route}}", + "refId": "A" + } + ], + "title": "Top 5 Success Count", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 20, + "y": 46 + }, + "id": 92, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, http_request_duration_seconds_count{instance=~\"$instance\",code=~\"^[45]..$\"})", + "instant": true, + "legendFormat": "({{code}}) {{route}}", + "refId": "A" + } + ], + "title": "Top 5 Error Count", + "transform": "table", + "type": "table-old" + } + ], + "refresh": "5s", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "definition": "query_result(up{job=~\"cht\"})", + "hide": 0, + "includeAll": false, + "label": "CHT Instance", + "multi": false, + "name": "cht_instance", + "options": [], + "query": { + "query": "query_result(up{job=~\"cht\"})", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/.*instance=\"([^\"]+).*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "selected": false, + "text": "1m", + "value": "1m" + }, + "hide": 0, + "name": "interval", + "options": [ + { + "selected": true, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": false, + "text": "12h", + "value": "12h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + }, + { + "selected": false, + "text": "7d", + "value": "7d" + }, + { + "selected": false, + "text": "14d", + "value": "14d" + }, + { + "selected": false, + "text": "30d", + "value": "30d" + } + ], + "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "queryValue": "", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + }, + { + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "selected": false, + "text": "7d", + "value": "7d" + }, + "hide": 0, + "name": "restarts_interval", + "options": [ + { + "selected": false, + "text": "1d", + "value": "1d" + }, + { + "selected": true, + "text": "7d", + "value": "7d" + }, + { + "selected": false, + "text": "14d", + "value": "14d" + }, + { + "selected": false, + "text": "30d", + "value": "30d" + } + ], + "query": "1d,7d,14d,30d", + "queryValue": "", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "CHT API Dashboard (Requires CHT Core 4.3)", + "uid": "3J_78b6Zz", + "version": 1, + "weekStart": "" + } \ No newline at end of file From e4a399584ee094afb632fac31a786ad8dac9d751 Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Wed, 19 Jul 2023 11:32:13 -0700 Subject: [PATCH 05/17] Remove count of replications. Rename replication rate --- .../CHT/cht_partnerships_replication.json | 145 ++---------------- 1 file changed, 17 insertions(+), 128 deletions(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index ce32226..dd82f23 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -20,7 +20,7 @@ "fiscalYearStartMonth": 0, "gnetId": 12230, "graphTooltip": 0, - "id": 5, + "id": 6, "links": [], "liveNow": false, "panels": [ @@ -90,7 +90,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.1", + "pluginVersion": "9.5.1", "targets": [ { "datasource": { @@ -125,23 +125,21 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 6, + "h": 5, "w": 12, "x": 12, "y": 0 }, "hiddenSeries": false, - "id": 64, + "id": 32, "legend": { "alignAsTable": true, "avg": false, - "current": true, - "max": false, + "current": false, + "max": true, "min": false, "rightSide": true, "show": true, - "sort": "current", - "sortDesc": true, "total": false, "values": true }, @@ -152,7 +150,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.1", + "pluginVersion": "9.5.1", "pointradius": 2, "points": false, "renderer": "flot", @@ -167,28 +165,15 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^[23]..$\"}) ", - "legendFormat": "Success", + "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}[$interval])) by (route)", + "legendFormat": "{{route}}", "range": true, "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" - }, - "editorMode": "code", - "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0))", - "hide": false, - "instant": false, - "legendFormat": "Error", - "range": true, - "refId": "B" } ], "thresholds": [], "timeRegions": [], - "title": "Replication Count", + "title": "Replication Rate", "tooltip": { "shared": true, "sort": 0, @@ -202,13 +187,13 @@ }, "yaxes": [ { - "$$hashKey": "object:178", + "$$hashKey": "object:573", "format": "short", "logBase": 1, "show": true }, { - "$$hashKey": "object:179", + "$$hashKey": "object:574", "format": "short", "logBase": 1, "show": false @@ -283,7 +268,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.1", + "pluginVersion": "9.5.1", "targets": [ { "datasource": { @@ -342,7 +327,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.1", + "pluginVersion": "9.5.1", "pointradius": 2, "points": false, "renderer": "flot", @@ -396,102 +381,6 @@ "align": false } }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 6 - }, - "hiddenSeries": false, - "id": 32, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "10.0.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" - }, - "editorMode": "code", - "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}[$interval])) by (route)", - "legendFormat": "{{route}}", - "range": true, - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Replications Per Seconds", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:573", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:574", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, { "aliasColors": {}, "bars": false, @@ -514,7 +403,7 @@ "h": 9, "w": 12, "x": 12, - "y": 11 + "y": 5 }, "hiddenSeries": false, "id": 18, @@ -538,7 +427,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.1", + "pluginVersion": "9.5.1", "pointradius": 2, "points": false, "renderer": "flot", @@ -734,6 +623,6 @@ "timezone": "", "title": "CHT Replication Dashboard (Requires CHT Core 4.3)", "uid": "d4f05050-804e-4ea4-9642-4d088cc39a1b", - "version": 6, + "version": 7, "weekStart": "" } \ No newline at end of file From 950454bddfdde523bc6de27efb33cdaddb8b004e Mon Sep 17 00:00:00 2001 From: "kennsippell@gmail.com" Date: Fri, 21 Jul 2023 11:24:49 -0700 Subject: [PATCH 06/17] Replace $instance with $cht_instance --- .../dashboards/CHT/cht_admin_api_express.json | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json b/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json index 91953db..3c9c17f 100644 --- a/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json +++ b/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json @@ -96,7 +96,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$instance\"}[$interval]))", + "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$cht_instance\"}[$interval]))", "refId": "A" } ], @@ -172,7 +172,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\"})", + "expr": "sum(http_request_duration_seconds_count{instance=~\"$cht_instance\"})", "instant": false, "refId": "A" } @@ -252,7 +252,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "(\n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$instance\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$instance\"}\n\t)\n)*100", + "expr": "(\n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$cht_instance\"}\n\t)\n)*100", "legendFormat": "error %", "refId": "A" } @@ -328,7 +328,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "sum(http_response_size_bytes_sum{instance=~\"$instance\"}) + sum(http_request_size_bytes_sum{instance=~\"$instance\"})", + "expr": "sum(http_response_size_bytes_sum{instance=~\"$cht_instance\"}) + sum(http_request_size_bytes_sum{instance=~\"$cht_instance\"})", "refId": "A" } ], @@ -404,7 +404,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "sum(rate(http_response_size_bytes_sum{instance=~\"$instance\"}[$interval])) + sum(rate(http_request_size_bytes_sum{instance=~\"$instance\"}[$interval]))", + "expr": "sum(rate(http_response_size_bytes_sum{instance=~\"$cht_instance\"}[$interval])) + sum(rate(http_request_size_bytes_sum{instance=~\"$cht_instance\"}[$interval]))", "refId": "A" } ], @@ -483,7 +483,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "sum(changes(process_start_time_seconds{instance=~\"$instance\"}[$restarts_interval]))", + "expr": "sum(changes(process_start_time_seconds{instance=~\"$cht_instance\"}[$restarts_interval]))", "refId": "A" } ], @@ -573,7 +573,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_eventloop_lag_seconds{instance=~\"$instance\"}", + "expr": "nodejs_eventloop_lag_seconds{instance=~\"$cht_instance\"}", "hide": false, "instant": false, "legendFormat": "last", @@ -584,7 +584,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_eventloop_lag_p99_seconds{instance=~\"$instance\"}", + "expr": "nodejs_eventloop_lag_p99_seconds{instance=~\"$cht_instance\"}", "legendFormat": "p99", "refId": "B" }, @@ -593,7 +593,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_eventloop_lag_p50_seconds{instance=~\"$instance\"}", + "expr": "nodejs_eventloop_lag_p50_seconds{instance=~\"$cht_instance\"}", "legendFormat": "p50", "refId": "C" } @@ -683,7 +683,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "rate(process_cpu_seconds_total{instance=~\"$instance\"}[$interval])", + "expr": "rate(process_cpu_seconds_total{instance=~\"$cht_instance\"}[$interval])", "legendFormat": "cpu", "refId": "A" } @@ -773,7 +773,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "process_virtual_memory_bytes{instance=~\"$instance\"}", + "expr": "process_virtual_memory_bytes{instance=~\"$cht_instance\"}", "legendFormat": "virtual memory", "refId": "A" }, @@ -782,7 +782,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "process_heap_bytes{instance=~\"$instance\"}", + "expr": "process_heap_bytes{instance=~\"$cht_instance\"}", "legendFormat": "heap memory", "refId": "B" } @@ -872,7 +872,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "expressjs_number_of_open_connections{instance=~\"$instance\"}", + "expr": "expressjs_number_of_open_connections{instance=~\"$cht_instance\"}", "legendFormat": "{{instance}}", "refId": "A" } @@ -963,7 +963,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "( process_open_fds{instance=~\"$instance\"} / process_max_fds{instance=~\"$instance\"})", + "expr": "( process_open_fds{instance=~\"$cht_instance\"} / process_max_fds{instance=~\"$cht_instance\"})", "legendFormat": "{{instance}}", "refId": "A" } @@ -1053,7 +1053,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_active_handles_total{instance=~\"$instance\"}", + "expr": "nodejs_active_handles_total{instance=~\"$cht_instance\"}", "legendFormat": "Active Handler", "refId": "A" }, @@ -1062,7 +1062,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_active_requests_total{instance=~\"$instance\"}", + "expr": "nodejs_active_requests_total{instance=~\"$cht_instance\"}", "legendFormat": "Active Request", "refId": "B" } @@ -1178,7 +1178,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "rate(nodejs_gc_duration_seconds_sum{instance=~\"$instance\"}[$interval])", + "expr": "rate(nodejs_gc_duration_seconds_sum{instance=~\"$cht_instance\"}[$interval])", "legendFormat": "{{kind}}", "refId": "A" } @@ -1269,7 +1269,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "rate(nodejs_gc_duration_seconds_count{instance=~\"$instance\"}[$interval])", + "expr": "rate(nodejs_gc_duration_seconds_count{instance=~\"$cht_instance\"}[$interval])", "legendFormat": "{{kind}}", "refId": "A" } @@ -1360,7 +1360,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_gc_duration_seconds_sum{instance=~\"$instance\"}", + "expr": "nodejs_gc_duration_seconds_sum{instance=~\"$cht_instance\"}", "legendFormat": "{{kind}}", "refId": "A" } @@ -1452,7 +1452,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_gc_duration_seconds_count{instance=~\"$instance\"}", + "expr": "nodejs_gc_duration_seconds_count{instance=~\"$cht_instance\"}", "legendFormat": "{{kind}}", "refId": "A" } @@ -1543,7 +1543,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_heap_size_total_bytes{instance=~\"$instance\"}", + "expr": "nodejs_heap_size_total_bytes{instance=~\"$cht_instance\"}", "legendFormat": "total", "refId": "A" }, @@ -1552,7 +1552,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_heap_size_used_bytes{instance=~\"$instance\"}", + "expr": "nodejs_heap_size_used_bytes{instance=~\"$cht_instance\"}", "legendFormat": "used", "refId": "B" }, @@ -1561,7 +1561,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "process_resident_memory_bytes{instance=~\"$instance\"}", + "expr": "process_resident_memory_bytes{instance=~\"$cht_instance\"}", "legendFormat": "resident", "refId": "C" }, @@ -1570,7 +1570,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_external_memory_bytes{instance=~\"$instance\"}", + "expr": "nodejs_external_memory_bytes{instance=~\"$cht_instance\"}", "legendFormat": "external", "refId": "D" } @@ -1660,7 +1660,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "nodejs_heap_space_size_used_bytes{instance=~\"$instance\"}", + "expr": "nodejs_heap_space_size_used_bytes{instance=~\"$cht_instance\"}", "legendFormat": "{{space}}", "refId": "A" } @@ -1778,7 +1778,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$instance\"}[$interval])) by (code)", + "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$cht_instance\"}[$interval])) by (code)", "legendFormat": "{{code}}", "refId": "A" } @@ -1873,7 +1873,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{instance=~\"$instance\"}[$interval])) by (code,le))", + "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{instance=~\"$cht_instance\"}[$interval])) by (code,le))", "legendFormat": "{{code}}(95%)", "refId": "A" }, @@ -1882,7 +1882,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "histogram_quantile(1, sum(rate(http_request_duration_seconds_bucket{instance=~\"$instance\"}[$interval])) by (code,le))", + "expr": "histogram_quantile(1, sum(rate(http_request_duration_seconds_bucket{instance=~\"$cht_instance\"}[$interval])) by (code,le))", "legendFormat": "{{code}}(100%)", "refId": "E" } @@ -1976,7 +1976,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\"}) by (code)", + "expr": "sum(http_request_duration_seconds_count{instance=~\"$cht_instance\"}) by (code)", "legendFormat": "{{code}}", "refId": "A" } @@ -2070,7 +2070,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "sum(http_response_size_bytes_sum{instance=~\"$instance\"}) by (route)", + "expr": "sum(http_response_size_bytes_sum{instance=~\"$cht_instance\"}) by (route)", "legendFormat": "{{route}}", "refId": "A" } @@ -2164,7 +2164,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "sum(http_request_duration_seconds_count{instance=~\"$instance\"}) by (route)", + "expr": "sum(http_request_duration_seconds_count{instance=~\"$cht_instance\"}) by (route)", "legendFormat": "{{route}}", "refId": "A" } @@ -2252,7 +2252,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$instance\"}))", + "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$cht_instance\"}))", "instant": true, "legendFormat": "{{route}}", "refId": "A" @@ -2315,7 +2315,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$instance\",code=~\"^[23]..$\"}))", + "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$cht_instance\",code=~\"^[23]..$\"}))", "instant": true, "legendFormat": "{{route}}", "refId": "A" @@ -2378,7 +2378,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$instance\",code=~\"^[45]..$\"}))", + "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$cht_instance\",code=~\"^[45]..$\"}))", "instant": true, "legendFormat": "{{route}}", "refId": "A" @@ -2441,7 +2441,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "topk(5, sum by (route)(http_request_duration_seconds_count{instance=~\"$instance\"}))", + "expr": "topk(5, sum by (route)(http_request_duration_seconds_count{instance=~\"$cht_instance\"}))", "instant": true, "legendFormat": "{{route}}", "refId": "A" @@ -2504,7 +2504,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "topk(5, http_request_duration_seconds_count{instance=~\"$instance\",code=~\"^[23]..$\"})", + "expr": "topk(5, http_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^[23]..$\"})", "instant": true, "legendFormat": "({{code}}) {{route}}", "refId": "A" @@ -2567,7 +2567,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "topk(5, http_request_duration_seconds_count{instance=~\"$instance\",code=~\"^[45]..$\"})", + "expr": "topk(5, http_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^[45]..$\"})", "instant": true, "legendFormat": "({{code}}) {{route}}", "refId": "A" From 49ce30b9b79975c6d3747a8aeaf9f442205190e8 Mon Sep 17 00:00:00 2001 From: "kennsippell@gmail.com" Date: Fri, 11 Aug 2023 00:32:09 -0700 Subject: [PATCH 07/17] Code review feedback --- .../dashboards/CHT/cht_admin_api_express.json | 2738 ----------------- .../CHT/cht_coredev_api_express.json | 2711 ++++++++++++++++ .../CHT/cht_partnerships_replication.json | 14 +- 3 files changed, 2718 insertions(+), 2745 deletions(-) delete mode 100644 grafana/provisioning/dashboards/CHT/cht_admin_api_express.json create mode 100644 grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json diff --git a/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json b/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json deleted file mode 100644 index 3c9c17f..0000000 --- a/grafana/provisioning/dashboards/CHT/cht_admin_api_express.json +++ /dev/null @@ -1,2738 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "Monitor metrics for CHT API node.js and express router status.", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 12230, - "graphTooltip": 0, - "id": 7, - "links": [], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 100 - }, - { - "color": "#C4162A", - "value": 200 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 2, - "x": 0, - "y": 0 - }, - "id": 57, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$cht_instance\"}[$interval]))", - "refId": "A" - } - ], - "title": "QPS", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 2, - "y": 0 - }, - "id": 53, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "sum(http_request_duration_seconds_count{instance=~\"$cht_instance\"})", - "instant": false, - "refId": "A" - } - ], - "title": "Requests", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 5 - }, - { - "color": "#C4162A", - "value": 10 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 2, - "x": 6, - "y": 0 - }, - "id": 63, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "(\n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$cht_instance\"}\n\t)\n)*100", - "legendFormat": "error %", - "refId": "A" - } - ], - "title": "Error", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 8, - "y": 0 - }, - "id": 59, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "sum(http_response_size_bytes_sum{instance=~\"$cht_instance\"}) + sum(http_request_size_bytes_sum{instance=~\"$cht_instance\"})", - "refId": "A" - } - ], - "title": "Transferred", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 70, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "sum(rate(http_response_size_bytes_sum{instance=~\"$cht_instance\"}[$interval])) + sum(rate(http_request_size_bytes_sum{instance=~\"$cht_instance\"}[$interval]))", - "refId": "A" - } - ], - "title": "Transfer Rate", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 1 - }, - { - "color": "#C4162A", - "value": 2 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 15, - "y": 0 - }, - "id": 61, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "sum(changes(process_start_time_seconds{instance=~\"$cht_instance\"}[$restarts_interval]))", - "refId": "A" - } - ], - "title": "Restarts in $restarts_interval", - "type": "stat" - }, - { - "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 2 - }, - "id": 87, - "panels": [], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Node.js Process", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 8, - "x": 0, - "y": 3 - }, - "hiddenSeries": false, - "id": 21, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_eventloop_lag_seconds{instance=~\"$cht_instance\"}", - "hide": false, - "instant": false, - "legendFormat": "last", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_eventloop_lag_p99_seconds{instance=~\"$cht_instance\"}", - "legendFormat": "p99", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_eventloop_lag_p50_seconds{instance=~\"$cht_instance\"}", - "legendFormat": "p50", - "refId": "C" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Eventloop Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 8, - "x": 8, - "y": 3 - }, - "hiddenSeries": false, - "id": 42, - "legend": { - "avg": true, - "current": false, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(process_cpu_seconds_total{instance=~\"$cht_instance\"}[$interval])", - "legendFormat": "cpu", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Rate of CPU Time Spent", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 8, - "x": 16, - "y": 3 - }, - "hiddenSeries": false, - "id": 82, - "legend": { - "avg": false, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "process_virtual_memory_bytes{instance=~\"$cht_instance\"}", - "legendFormat": "virtual memory", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "process_heap_bytes{instance=~\"$cht_instance\"}", - "legendFormat": "heap memory", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Process Memory", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 8, - "x": 0, - "y": 8 - }, - "hiddenSeries": false, - "id": 77, - "legend": { - "avg": false, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "expressjs_number_of_open_connections{instance=~\"$cht_instance\"}", - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Number of Open Connections", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 8, - "x": 8, - "y": 8 - }, - "hiddenSeries": false, - "id": 79, - "legend": { - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "( process_open_fds{instance=~\"$cht_instance\"} / process_max_fds{instance=~\"$cht_instance\"})", - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Used File Descriptors", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 8, - "x": 16, - "y": 8 - }, - "hiddenSeries": false, - "id": 66, - "legend": { - "avg": false, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_active_handles_total{instance=~\"$cht_instance\"}", - "legendFormat": "Active Handler", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_active_requests_total{instance=~\"$cht_instance\"}", - "legendFormat": "Active Request", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Active Handlers/Requests", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 40, - "panels": [], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Node.js Garbage Collection", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 14 - }, - "hiddenSeries": false, - "id": 43, - "legend": { - "avg": true, - "current": false, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nodejs_gc_duration_seconds_sum{instance=~\"$cht_instance\"}[$interval])", - "legendFormat": "{{kind}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Rate of Garbage Collection Duration", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 14 - }, - "hiddenSeries": false, - "id": 38, - "legend": { - "avg": true, - "current": false, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nodejs_gc_duration_seconds_count{instance=~\"$cht_instance\"}[$interval])", - "legendFormat": "{{kind}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Rate of Garbage Collection", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 19 - }, - "hiddenSeries": false, - "id": 46, - "legend": { - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_gc_duration_seconds_sum{instance=~\"$cht_instance\"}", - "legendFormat": "{{kind}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Garbage Collection Duration", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "", - "logBase": 2, - "show": true - }, - { - "format": "s", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 19 - }, - "hiddenSeries": false, - "id": 45, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_gc_duration_seconds_count{instance=~\"$cht_instance\"}", - "legendFormat": "{{kind}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Garbage Collection Count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 2, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 24 - }, - "hiddenSeries": false, - "id": 34, - "legend": { - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_heap_size_total_bytes{instance=~\"$cht_instance\"}", - "legendFormat": "total", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_heap_size_used_bytes{instance=~\"$cht_instance\"}", - "legendFormat": "used", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "process_resident_memory_bytes{instance=~\"$cht_instance\"}", - "legendFormat": "resident", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_external_memory_bytes{instance=~\"$cht_instance\"}", - "legendFormat": "external", - "refId": "D" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Heap Memory Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 24 - }, - "hiddenSeries": false, - "id": 36, - "legend": { - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nodejs_heap_space_size_used_bytes{instance=~\"$cht_instance\"}", - "legendFormat": "{{space}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Heap Space Used", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 29 - }, - "id": 26, - "panels": [], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Express Route", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 30 - }, - "hiddenSeries": false, - "id": 32, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$cht_instance\"}[$interval])) by (code)", - "legendFormat": "{{code}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Requests Per Seconds", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 30 - }, - "hiddenSeries": false, - "id": 18, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{instance=~\"$cht_instance\"}[$interval])) by (code,le))", - "legendFormat": "{{code}}(95%)", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "histogram_quantile(1, sum(rate(http_request_duration_seconds_bucket{instance=~\"$cht_instance\"}[$interval])) by (code,le))", - "legendFormat": "{{code}}(100%)", - "refId": "E" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Response Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 35 - }, - "hiddenSeries": false, - "id": 44, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "sum(http_request_duration_seconds_count{instance=~\"$cht_instance\"}) by (code)", - "legendFormat": "{{code}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Code Count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 38 - }, - "hiddenSeries": false, - "id": 30, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "sum(http_response_size_bytes_sum{instance=~\"$cht_instance\"}) by (route)", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Response Size", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 2, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 40 - }, - "hiddenSeries": false, - "id": 64, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "sum(http_request_duration_seconds_count{instance=~\"$cht_instance\"}) by (route)", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Request Count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fontSize": "100%", - "gridPos": { - "h": 6, - "w": 4, - "x": 0, - "y": 46 - }, - "id": 95, - "scroll": true, - "showHeader": true, - "sort": { - "col": 1, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "s" - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$cht_instance\"}))", - "instant": true, - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "title": "Top 5 Request Duration", - "transform": "table", - "type": "table-old" - }, - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fontSize": "100%", - "gridPos": { - "h": 6, - "w": 4, - "x": 4, - "y": 46 - }, - "id": 89, - "scroll": true, - "showHeader": true, - "sort": { - "col": 1, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "s" - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$cht_instance\",code=~\"^[23]..$\"}))", - "instant": true, - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "title": "Top 5 Success Duration", - "transform": "table", - "type": "table-old" - }, - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fontSize": "100%", - "gridPos": { - "h": 6, - "w": 4, - "x": 8, - "y": 46 - }, - "id": 93, - "scroll": true, - "showHeader": true, - "sort": { - "col": 1, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "s" - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "topk(5, sum by (route)(http_request_duration_seconds_sum{instance=~\"$cht_instance\",code=~\"^[45]..$\"}))", - "instant": true, - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "title": "Top 5 Error Duration", - "transform": "table", - "type": "table-old" - }, - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fontSize": "100%", - "gridPos": { - "h": 6, - "w": 4, - "x": 12, - "y": 46 - }, - "id": 96, - "scroll": true, - "showHeader": true, - "sort": { - "col": 1, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "topk(5, sum by (route)(http_request_duration_seconds_count{instance=~\"$cht_instance\"}))", - "instant": true, - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "title": "Top 5 Request Count", - "transform": "table", - "type": "table-old" - }, - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fontSize": "100%", - "gridPos": { - "h": 6, - "w": 4, - "x": 16, - "y": 46 - }, - "id": 91, - "scroll": true, - "showHeader": true, - "sort": { - "col": 1, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "topk(5, http_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^[23]..$\"})", - "instant": true, - "legendFormat": "({{code}}) {{route}}", - "refId": "A" - } - ], - "title": "Top 5 Success Count", - "transform": "table", - "type": "table-old" - }, - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fontSize": "100%", - "gridPos": { - "h": 6, - "w": 4, - "x": 20, - "y": 46 - }, - "id": 92, - "scroll": true, - "showHeader": true, - "sort": { - "col": 1, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "topk(5, http_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^[45]..$\"})", - "instant": true, - "legendFormat": "({{code}}) {{route}}", - "refId": "A" - } - ], - "title": "Top 5 Error Count", - "transform": "table", - "type": "table-old" - } - ], - "refresh": "5s", - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "definition": "query_result(up{job=~\"cht\"})", - "hide": 0, - "includeAll": false, - "label": "CHT Instance", - "multi": false, - "name": "cht_instance", - "options": [], - "query": { - "query": "query_result(up{job=~\"cht\"})", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/.*instance=\"([^\"]+).*/", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "selected": false, - "text": "1m", - "value": "1m" - }, - "hide": 0, - "name": "interval", - "options": [ - { - "selected": true, - "text": "1m", - "value": "1m" - }, - { - "selected": false, - "text": "10m", - "value": "10m" - }, - { - "selected": false, - "text": "30m", - "value": "30m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "6h", - "value": "6h" - }, - { - "selected": false, - "text": "12h", - "value": "12h" - }, - { - "selected": false, - "text": "1d", - "value": "1d" - }, - { - "selected": false, - "text": "7d", - "value": "7d" - }, - { - "selected": false, - "text": "14d", - "value": "14d" - }, - { - "selected": false, - "text": "30d", - "value": "30d" - } - ], - "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", - "queryValue": "", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - }, - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "selected": false, - "text": "7d", - "value": "7d" - }, - "hide": 0, - "name": "restarts_interval", - "options": [ - { - "selected": false, - "text": "1d", - "value": "1d" - }, - { - "selected": true, - "text": "7d", - "value": "7d" - }, - { - "selected": false, - "text": "14d", - "value": "14d" - }, - { - "selected": false, - "text": "30d", - "value": "30d" - } - ], - "query": "1d,7d,14d,30d", - "queryValue": "", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - } - ] - }, - "time": { - "from": "now-3h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "CHT API Dashboard (Requires CHT Core 4.3)", - "uid": "3J_78b6Zz", - "version": 1, - "weekStart": "" - } \ No newline at end of file diff --git a/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json new file mode 100644 index 0000000..23b0b81 --- /dev/null +++ b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json @@ -0,0 +1,2711 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Monitor metrics for CHT API node.js and express router status.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 12230, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 100 + }, + { + "color": "#C4162A", + "value": 200 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 0, + "y": 0 + }, + "id": 57, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(rate(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\"}[$interval]))", + "refId": "A" + } + ], + "title": "QPS", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 2, + "y": 0 + }, + "id": 53, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\"})", + "instant": false, + "refId": "A" + } + ], + "title": "Requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 5 + }, + { + "color": "#C4162A", + "value": 10 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 6, + "y": 0 + }, + "id": 63, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "(\n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\"}\n\t)\n)*100", + "legendFormat": "error %", + "refId": "A" + } + ], + "title": "Error", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 8, + "y": 0 + }, + "id": 59, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(cht_api_http_response_size_bytes_sum{instance=~\"$cht_instance\"}) + sum(cht_api_http_request_size_bytes_sum{instance=~\"$cht_instance\"})", + "refId": "A" + } + ], + "title": "Transferred", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 12, + "y": 0 + }, + "id": 70, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(rate(cht_api_http_response_size_bytes_sum{instance=~\"$cht_instance\"}[$interval])) + sum(rate(cht_api_http_request_size_bytes_sum{instance=~\"$cht_instance\"}[$interval]))", + "refId": "A" + } + ], + "title": "Transfer Rate", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "#C4162A", + "value": 2 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 15, + "y": 0 + }, + "id": 61, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(changes(cht_api_process_start_time_seconds{instance=~\"$cht_instance\"}[7d]))", + "refId": "A" + } + ], + "title": "Restarts in 7d", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 87, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Node.js Process", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 3 + }, + "hiddenSeries": false, + "id": 21, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_eventloop_lag_seconds{instance=~\"$cht_instance\"}", + "hide": false, + "instant": false, + "legendFormat": "last", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_eventloop_lag_p99_seconds{instance=~\"$cht_instance\"}", + "legendFormat": "p99", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_eventloop_lag_p50_seconds{instance=~\"$cht_instance\"}", + "legendFormat": "p50", + "refId": "C" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Eventloop Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 8, + "y": 3 + }, + "hiddenSeries": false, + "id": 42, + "legend": { + "avg": true, + "current": false, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "rate(cht_api_process_cpu_seconds_total{instance=~\"$cht_instance\"}[$interval])", + "legendFormat": "cpu", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Rate of CPU Time Spent", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 3 + }, + "hiddenSeries": false, + "id": 82, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_process_virtual_memory_bytes{instance=~\"$cht_instance\"}", + "legendFormat": "virtual memory", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_process_heap_bytes{instance=~\"$cht_instance\"}", + "legendFormat": "heap memory", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Process Memory", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 77, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_expressjs_number_of_open_connections{instance=~\"$cht_instance\"}", + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Number of Open Connections", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 8, + "y": 8 + }, + "hiddenSeries": false, + "id": 79, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "( cht_api_process_open_fds{instance=~\"$cht_instance\"} / cht_api_process_max_fds{instance=~\"$cht_instance\"})", + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Used File Descriptors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percentunit", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 8 + }, + "hiddenSeries": false, + "id": 66, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_active_handles_total{instance=~\"$cht_instance\"}", + "legendFormat": "Active Handler", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_active_requests_total{instance=~\"$cht_instance\"}", + "legendFormat": "Active Request", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Active Handlers/Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 40, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Node.js Garbage Collection", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 14 + }, + "hiddenSeries": false, + "id": 43, + "legend": { + "avg": true, + "current": false, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "rate(cht_api_nodejs_gc_duration_seconds_sum{instance=~\"$cht_instance\"}[$interval])", + "legendFormat": "{{kind}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Rate of Garbage Collection Duration", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 14 + }, + "hiddenSeries": false, + "id": 38, + "legend": { + "avg": true, + "current": false, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "rate(cht_api_nodejs_gc_duration_seconds_count{instance=~\"$cht_instance\"}[$interval])", + "legendFormat": "{{kind}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Rate of Garbage Collection", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 19 + }, + "hiddenSeries": false, + "id": 46, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_gc_duration_seconds_sum{instance=~\"$cht_instance\"}", + "legendFormat": "{{kind}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Garbage Collection Duration", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 2, + "show": true + }, + { + "format": "s", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 19 + }, + "hiddenSeries": false, + "id": 45, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_gc_duration_seconds_count{instance=~\"$cht_instance\"}", + "legendFormat": "{{kind}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Garbage Collection Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 2, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 24 + }, + "hiddenSeries": false, + "id": 34, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_heap_size_total_bytes{instance=~\"$cht_instance\"}", + "legendFormat": "total", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_heap_size_used_bytes{instance=~\"$cht_instance\"}", + "legendFormat": "used", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_process_resident_memory_bytes{instance=~\"$cht_instance\"}", + "legendFormat": "resident", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_external_memory_bytes{instance=~\"$cht_instance\"}", + "legendFormat": "external", + "refId": "D" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Heap Memory Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 24 + }, + "hiddenSeries": false, + "id": 36, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "cht_api_nodejs_heap_space_size_used_bytes{instance=~\"$cht_instance\"}", + "legendFormat": "{{space}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Heap Space Used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 26, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "refId": "A" + } + ], + "title": "Express Route", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 30 + }, + "hiddenSeries": false, + "id": 32, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(rate(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\"}[$interval])) by (code)", + "legendFormat": "{{code}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Requests Per Seconds", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 30 + }, + "hiddenSeries": false, + "id": 18, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "histogram_quantile(0.95, sum(rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\"}[$interval])) by (code,le))", + "legendFormat": "{{code}}(95%)", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "histogram_quantile(1, sum(rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\"}[$interval])) by (code,le))", + "legendFormat": "{{code}}(100%)", + "refId": "E" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Response Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 35 + }, + "hiddenSeries": false, + "id": 44, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\"}) by (code)", + "legendFormat": "{{code}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Code Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 38 + }, + "hiddenSeries": false, + "id": 30, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(cht_api_http_response_size_bytes_sum{instance=~\"$cht_instance\"}) by (route)", + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Response Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 2, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 40 + }, + "hiddenSeries": false, + "id": 64, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.0.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "sum(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\"}) by (route)", + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Request Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 0, + "y": 46 + }, + "id": 95, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "s" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, sum by (route)(cht_api_http_request_duration_seconds_sum{instance=~\"$cht_instance\"}))", + "instant": true, + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "title": "Top 5 Request Duration", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 4, + "y": 46 + }, + "id": 89, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "s" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, sum by (route)(cht_api_http_request_duration_seconds_sum{instance=~\"$cht_instance\",code=~\"^[23]..$\"}))", + "instant": true, + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "title": "Top 5 Success Duration", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 8, + "y": 46 + }, + "id": 93, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "s" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, sum by (route)(cht_api_http_request_duration_seconds_sum{instance=~\"$cht_instance\",code=~\"^[45]..$\"}))", + "instant": true, + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "title": "Top 5 Error Duration", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 12, + "y": 46 + }, + "id": 96, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, sum by (route)(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\"}))", + "instant": true, + "legendFormat": "{{route}}", + "refId": "A" + } + ], + "title": "Top 5 Request Count", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 16, + "y": 46 + }, + "id": 91, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^[23]..$\"})", + "instant": true, + "legendFormat": "({{code}}) {{route}}", + "refId": "A" + } + ], + "title": "Top 5 Success Count", + "transform": "table", + "type": "table-old" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 4, + "x": 20, + "y": 46 + }, + "id": 92, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(5, cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",code=~\"^[45]..$\"})", + "instant": true, + "legendFormat": "({{code}}) {{route}}", + "refId": "A" + } + ], + "title": "Top 5 Error Count", + "transform": "table", + "type": "table-old" + } + ], + "refresh": "5s", + "schemaVersion": 38, + "style": "dark", + "tags": [ + "CHT 4.3+", + "CoreDev" + ], + "templating": { + "list": [ + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "definition": "query_result(up{job=~\"cht\"})", + "hide": 0, + "includeAll": false, + "label": "CHT Instance", + "multi": false, + "name": "cht_instance", + "options": [], + "query": { + "query": "query_result(up{job=~\"cht\"})", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/.*instance=\"([^\"]+).*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "selected": false, + "text": "1m", + "value": "1m" + }, + "hide": 0, + "name": "interval", + "options": [ + { + "selected": true, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": false, + "text": "12h", + "value": "12h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + }, + { + "selected": false, + "text": "7d", + "value": "7d" + }, + { + "selected": false, + "text": "14d", + "value": "14d" + }, + { + "selected": false, + "text": "30d", + "value": "30d" + } + ], + "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "queryValue": "", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "CHT API Server", + "uid": "3J_78b6Zz", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index dd82f23..3f19b4c 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -98,7 +98,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "(\n ( \n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n + (\n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",route=~\".*/get-ids\",code=~\"^2..$\"})\n - sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n ) / 2\n ) / sum(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^2..$\"})\n) * 100", + "expr": "(\n ( \n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n + (\n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",route=~\".*/get-ids\",code=~\"^2..$\"})\n - sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n ) / 2\n ) / sum(cht_api_http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^2..$\"})\n) * 100", "legendFormat": "score", "range": true, "refId": "A" @@ -165,7 +165,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "sum(rate(http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}[$interval])) by (route)", + "expr": "sum(rate(cht_api_http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}[$interval])) by (route)", "legendFormat": "{{route}}", "range": true, "refId": "A" @@ -276,7 +276,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "(\n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\thttp_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}\n\t)\n)*100", + "expr": "(\n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}\n\t)\n)*100", "legendFormat": "error %", "range": true, "refId": "A" @@ -342,7 +342,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "(\n ( \n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",code=~\"^2..$\"})\n + (\n sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"360\",code=~\"^2..$\"})\n - sum(http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",code=~\"^2..$\"})\n ) / 2\n ) / sum(http_request_duration_seconds_count{instance=~\"$instance\",code=~\"^2..$\"})\n) * 100", + "expr": "(\n ( \n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",code=~\"^2..$\"})\n + (\n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"360\",code=~\"^2..$\"})\n - sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",code=~\"^2..$\"})\n ) / 2\n ) / sum(cht_api_http_request_duration_seconds_count{instance=~\"$instance\",code=~\"^2..$\"})\n) * 100", "legendFormat": "score", "range": true, "refId": "A" @@ -442,7 +442,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "histogram_quantile(0.5, sum by(le) (rate(http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", + "expr": "histogram_quantile(0.5, sum by(le) (rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", "legendFormat": "50th Percentile", "range": true, "refId": "A" @@ -453,7 +453,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "histogram_quantile(0.90, sum by(le) (rate(http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", + "expr": "histogram_quantile(0.90, sum by(le) (rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", "hide": false, "instant": false, "legendFormat": "90th Percentile", @@ -466,7 +466,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "histogram_quantile(1.00, sum by(le) (rate(http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", + "expr": "histogram_quantile(1.00, sum by(le) (rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", "hide": false, "instant": false, "legendFormat": "Max", From 4a5d2d989f8a310b303af818ab4294ceb070afbc Mon Sep 17 00:00:00 2001 From: "kennsippell@gmail.com" Date: Fri, 11 Aug 2023 00:37:14 -0700 Subject: [PATCH 08/17] Rename and add tags --- .../CHT/cht_partnerships_replication.json | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index 3f19b4c..ef829b4 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -20,7 +20,6 @@ "fiscalYearStartMonth": 0, "gnetId": 12230, "graphTooltip": 0, - "id": 6, "links": [], "liveNow": false, "panels": [ @@ -90,7 +89,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.5.1", + "pluginVersion": "10.0.2", "targets": [ { "datasource": { @@ -150,7 +149,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.5.1", + "pluginVersion": "10.0.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -268,7 +267,7 @@ }, "textMode": "auto" }, - "pluginVersion": "9.5.1", + "pluginVersion": "10.0.2", "targets": [ { "datasource": { @@ -327,7 +326,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.5.1", + "pluginVersion": "10.0.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -427,7 +426,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.5.1", + "pluginVersion": "10.0.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -510,10 +509,21 @@ "refresh": "5s", "schemaVersion": 38, "style": "dark", - "tags": [], + "tags": [ + "CHT 4.3+" + ], "templating": { "list": [ { + "current": { + "selected": false, + "text": "fake-cht:8081", + "value": "fake-cht:8081" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "definition": "query_result(up{job=~\"cht\"})", "hide": 0, "includeAll": false, @@ -621,8 +631,8 @@ ] }, "timezone": "", - "title": "CHT Replication Dashboard (Requires CHT Core 4.3)", + "title": "CHT Replication Dashboard", "uid": "d4f05050-804e-4ea4-9642-4d088cc39a1b", - "version": 7, + "version": 4, "weekStart": "" } \ No newline at end of file From 6f155375adc2b76f76c40386ded9c21b4ffcd2e5 Mon Sep 17 00:00:00 2001 From: "kennsippell@gmail.com" Date: Fri, 11 Aug 2023 00:54:27 -0700 Subject: [PATCH 09/17] Remove CoreDev tag --- .../provisioning/dashboards/CHT/cht_coredev_api_express.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json index 23b0b81..6d179fb 100644 --- a/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json +++ b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json @@ -2581,8 +2581,7 @@ "schemaVersion": 38, "style": "dark", "tags": [ - "CHT 4.3+", - "CoreDev" + "CHT 4.3+" ], "templating": { "list": [ From 3a2f963eef2c3789c3d2e4a43575d8d2e7089bb1 Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Mon, 18 Sep 2023 12:38:57 -0700 Subject: [PATCH 10/17] Update grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json Co-authored-by: Joshua Kuestersteffen --- .../dashboards/CHT/cht_coredev_api_express.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json index 6d179fb..9f61801 100644 --- a/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json +++ b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json @@ -20,7 +20,20 @@ "fiscalYearStartMonth": 0, "gnetId": 12230, "graphTooltip": 0, - "links": [], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": false, + "title": "CHT API Server", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "liveNow": false, "panels": [ { From 168fe858456c90813e974fd532d3e9c6be4f9b7b Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Mon, 18 Sep 2023 12:49:13 -0700 Subject: [PATCH 11/17] Metric without prefix --- .../provisioning/dashboards/CHT/cht_coredev_api_express.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json index 9f61801..2c3426b 100644 --- a/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json +++ b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json @@ -884,7 +884,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "cht_api_expressjs_number_of_open_connections{instance=~\"$cht_instance\"}", + "expr": "expressjs_number_of_open_connections{instance=~\"$cht_instance\"}", "legendFormat": "{{instance}}", "refId": "A" } From 35977f0507dbbfd87a650d689c068df3299d1aa5 Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Mon, 18 Sep 2023 12:49:42 -0700 Subject: [PATCH 12/17] Update grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json Co-authored-by: Joshua Kuestersteffen --- .../dashboards/CHT/cht_partnerships_replication.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index ef829b4..b2df602 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -631,7 +631,7 @@ ] }, "timezone": "", - "title": "CHT Replication Dashboard", + "title": "CHT Replication", "uid": "d4f05050-804e-4ea4-9642-4d088cc39a1b", "version": 4, "weekStart": "" From ad1cd1e711bc33fb6d09396ab3e6f5f619ac107a Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Mon, 18 Sep 2023 12:52:26 -0700 Subject: [PATCH 13/17] Update grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json Co-authored-by: Joshua Kuestersteffen --- .../CHT/cht_partnerships_replication.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index b2df602..c3fb18f 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -20,7 +20,20 @@ "fiscalYearStartMonth": 0, "gnetId": 12230, "graphTooltip": 0, - "links": [], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": false, + "title": "CHT Replication", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "liveNow": false, "panels": [ { From d85f44fdec5e288302ea3db9daaaf14d0a72bb52 Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Mon, 18 Sep 2023 12:54:48 -0700 Subject: [PATCH 14/17] Replace $instance with $cht_instance --- .../CHT/cht_partnerships_replication.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index ef829b4..809c236 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -97,7 +97,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "(\n ( \n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n + (\n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",route=~\".*/get-ids\",code=~\"^2..$\"})\n - sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"90\",route=~\".*/get-ids\",code=~\"^2..$\"})\n ) / 2\n ) / sum(cht_api_http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^2..$\"})\n) * 100", + "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", "legendFormat": "score", "range": true, "refId": "A" @@ -164,7 +164,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "sum(rate(cht_api_http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}[$interval])) by (route)", + "expr": "sum(rate(cht_api_http_request_duration_seconds_count{instance=~\"$cht_instance\",route=~\".*/get-ids\"}[$interval])) by (route)", "legendFormat": "{{route}}", "range": true, "refId": "A" @@ -275,7 +275,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "(\n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\",code=~\"^[45]..$\"} OR on() vector(0)\n\t) / \n\tsum(\n\t\tcht_api_http_request_duration_seconds_count{instance=~\"$instance\",route=~\".*/get-ids\"}\n\t)\n)*100", + "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", "legendFormat": "error %", "range": true, "refId": "A" @@ -341,7 +341,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "(\n ( \n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",code=~\"^2..$\"})\n + (\n sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"360\",code=~\"^2..$\"})\n - sum(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\",le=\"180\",code=~\"^2..$\"})\n ) / 2\n ) / sum(cht_api_http_request_duration_seconds_count{instance=~\"$instance\",code=~\"^2..$\"})\n) * 100", + "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", "legendFormat": "score", "range": true, "refId": "A" @@ -441,7 +441,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "histogram_quantile(0.5, sum by(le) (rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", + "expr": "histogram_quantile(0.5, sum by(le) (rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\", route=~\".*/get-ids\"}[$interval])))", "legendFormat": "50th Percentile", "range": true, "refId": "A" @@ -452,7 +452,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "histogram_quantile(0.90, sum by(le) (rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", + "expr": "histogram_quantile(0.90, sum by(le) (rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\", route=~\".*/get-ids\"}[$interval])))", "hide": false, "instant": false, "legendFormat": "90th Percentile", @@ -465,7 +465,7 @@ "uid": "fa8f4e3c-53cf-499d-89dd-8d6eaca0a756" }, "editorMode": "code", - "expr": "histogram_quantile(1.00, sum by(le) (rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$instance\", route=~\".*/get-ids\"}[$interval])))", + "expr": "histogram_quantile(1.00, sum by(le) (rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\", route=~\".*/get-ids\"}[$interval])))", "hide": false, "instant": false, "legendFormat": "Max", From 55de8e44402066a12e560d31957db88a40ff2437 Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Mon, 18 Sep 2023 14:13:02 -0700 Subject: [PATCH 15/17] Add replication data to fake-cht --- development/fake-cht/package.json | 2 +- development/fake-cht/src/index.js | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/development/fake-cht/package.json b/development/fake-cht/package.json index 7913220..037fa7b 100644 --- a/development/fake-cht/package.json +++ b/development/fake-cht/package.json @@ -2,7 +2,7 @@ "name": "fake-cht", "version": "1.0.0", "scripts": { - "start": "node src/index.js" + "start": "node --experimental-fetch src/index.js" }, "dependencies": { "express": "^4.18.2", diff --git a/development/fake-cht/src/index.js b/development/fake-cht/src/index.js index 0259d66..f46f67d 100644 --- a/development/fake-cht/src/index.js +++ b/development/fake-cht/src/index.js @@ -116,9 +116,34 @@ try { app.use(prometheusMiddleware({ metricsPath: '/api/v1/express-metrics', metricsPrefix: 'cht_api', + // based on one-month analysed period of production traffic + durationBuckets: [ + 0.004, 0.007, 0.013, 0.025, 0.05, + 0.1, 0.25, 0.5, 1, 2, + 3, 5, 7.5, 10, 25, + 45, 90, 180, 360, 600, + 1200, 1800, 3600 + ], })); +app.get('/*/get-ids', (req, res) => { + const timeout = getRandomInt(0, 5000); + setTimeout(() => { + if (timeout > 4000) { + res + .status(504) + .send({ message: 'Timeout' }); + return; + } + res.json({ id: new Date().getTime() }); + }, timeout); +}); + app.get('/api/v2/monitoring', (req, res) => { + // generate requests to other endpoints + fetch('http://fake-cht:8081/api/v1/initial-replication/get-ids'); + fetch('http://fake-cht:8081/api/v1/replication/get-ids'); + const metrics = { version: getVersion(), couchdb: getAllCouchDbs(lastResponse.couchdb), From 735760e235e6bdda87558608cb98ef8d6d7146a0 Mon Sep 17 00:00:00 2001 From: Kenn Sippell Date: Tue, 19 Sep 2023 00:38:11 -0700 Subject: [PATCH 16/17] Interval adjustments + Response Latency rework --- development/fake-cht/src/index.js | 12 +++++-- .../CHT/cht_coredev_api_express.json | 31 +++++++------------ .../CHT/cht_partnerships_replication.json | 8 ++--- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/development/fake-cht/src/index.js b/development/fake-cht/src/index.js index f46f67d..ebd550d 100644 --- a/development/fake-cht/src/index.js +++ b/development/fake-cht/src/index.js @@ -126,7 +126,12 @@ app.use(prometheusMiddleware({ ], })); -app.get('/*/get-ids', (req, res) => { +const replicationRoutes = [ + '/api/v1/replication/get-ids', + '/api/v1/initial-replication/get-ids' +]; + +app.get(replicationRoutes, (req, res) => { const timeout = getRandomInt(0, 5000); setTimeout(() => { if (timeout > 4000) { @@ -141,8 +146,9 @@ app.get('/*/get-ids', (req, res) => { app.get('/api/v2/monitoring', (req, res) => { // generate requests to other endpoints - fetch('http://fake-cht:8081/api/v1/initial-replication/get-ids'); - fetch('http://fake-cht:8081/api/v1/replication/get-ids'); + replicationRoutes.forEach(replicationRoute => { + fetch(`http://fake-cht:8081${replicationRoute}`); + }); const metrics = { version: getVersion(), diff --git a/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json index 2c3426b..81e8b59 100644 --- a/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json +++ b/grafana/provisioning/dashboards/CHT/cht_coredev_api_express.json @@ -1885,23 +1885,14 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "expr": "histogram_quantile(0.95, sum(rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\"}[$interval])) by (code,le))", - "legendFormat": "{{code}}(95%)", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "histogram_quantile(1, sum(rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\"}[$interval])) by (code,le))", - "legendFormat": "{{code}}(100%)", - "refId": "E" + "expr": "histogram_quantile(0.90, sum(rate(cht_api_http_request_duration_seconds_bucket{instance=~\"$cht_instance\"}[$interval])) by (le,route))", + "legendFormat": "{{route}}", + "refId": "B" } ], "thresholds": [], "timeRegions": [], - "title": "Response Latency", + "title": "Response Latency (90th Percentile)", "tooltip": { "shared": true, "sort": 0, @@ -2632,19 +2623,19 @@ "auto_min": "10s", "current": { "selected": false, - "text": "1m", - "value": "1m" + "text": "10m", + "value": "10m" }, "hide": 0, "name": "interval", "options": [ { - "selected": true, - "text": "1m", - "value": "1m" + "selected": false, + "text": "2m", + "value": "2m" }, { - "selected": false, + "selected": true, "text": "10m", "value": "10m" }, @@ -2689,7 +2680,7 @@ "value": "30d" } ], - "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "query": "2m,10m,30m,1h,6h,12h,1d,7d,14d,30d", "queryValue": "", "refresh": 2, "skipUrlSync": false, diff --git a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json index 5fb1927..15f8ab7 100644 --- a/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json +++ b/grafana/provisioning/dashboards/CHT/cht_partnerships_replication.json @@ -568,11 +568,11 @@ "options": [ { "selected": false, - "text": "1m", - "value": "1m" + "text": "2m", + "value": "2m" }, { - "selected": false, + "selected": true, "text": "10m", "value": "10m" }, @@ -617,7 +617,7 @@ "value": "30d" } ], - "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "query": "2m,10m,30m,1h,6h,12h,1d,7d,14d,30d", "queryValue": "", "refresh": 2, "skipUrlSync": false, From 8f584ece1d666e638e4ff8faa0ec30efecb6a65f Mon Sep 17 00:00:00 2001 From: "kennsippell@gmail.com" Date: Wed, 20 Sep 2023 22:32:45 -0700 Subject: [PATCH 17/17] Require node 18 --- development/fake-cht/package-lock.json | 3 +++ development/fake-cht/package.json | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/development/fake-cht/package-lock.json b/development/fake-cht/package-lock.json index 5bbec06..0f94fd7 100644 --- a/development/fake-cht/package-lock.json +++ b/development/fake-cht/package-lock.json @@ -11,6 +11,9 @@ "express": "^4.18.2", "pg": "^8.10.0", "prometheus-api-metrics": "^3.2.2" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@types/accepts": { diff --git a/development/fake-cht/package.json b/development/fake-cht/package.json index 037fa7b..cf1f277 100644 --- a/development/fake-cht/package.json +++ b/development/fake-cht/package.json @@ -2,7 +2,10 @@ "name": "fake-cht", "version": "1.0.0", "scripts": { - "start": "node --experimental-fetch src/index.js" + "start": "node src/index.js" + }, + "engines" : { + "node" : ">=18.0.0" }, "dependencies": { "express": "^4.18.2",