Skip to content

Commit

Permalink
Add new panels showing weekly test count and data volume (#1021)
Browse files Browse the repository at this point in the history
* Add new panels showing weekly test count and data volume

* Add decimals

* Omit previous week
  • Loading branch information
cristinaleonr authored Dec 7, 2023
1 parent eefdce8 commit 983e373
Showing 1 changed file with 289 additions and 8 deletions.
297 changes: 289 additions & 8 deletions config/federation/grafana/dashboards/NDT_EarlyExit.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 438,
"links": [],
"liveNow": false,
"panels": [
Expand Down Expand Up @@ -86,8 +85,8 @@
"autorange": true,
"gridcolor": "#333",
"range": [
-0.001024012632533507,
0.0198703998906092
-0.0010087298937641136,
0.019376447510975305
],
"title": {
"text": "Frequency"
Expand Down Expand Up @@ -201,8 +200,8 @@
"autorange": true,
"gridcolor": "#333",
"range": [
-0.00968565641076581,
0.18402747180455034
-0.009505293176164416,
0.18060057034712387
],
"title": {
"text": "Frequency"
Expand Down Expand Up @@ -846,6 +845,288 @@
"title": "Amount of Data Transferred (split)",
"transformations": [],
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "Test Count",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 12,
"x": 0,
"y": 43
},
"id": 15,
"options": {
"legend": {
"calcs": [
"last"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "10.2.2",
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
"format": 0,
"group": [],
"location": "US",
"metricColumn": "none",
"orderByCol": "1",
"orderBySort": "1",
"project": "mlab-oti",
"rawQuery": true,
"rawSql": "SELECT \n TIMESTAMP_TRUNC(TIMESTAMP(date), WEEK, \"UTC\") AS time,\n COUNT(*) AS testCount\nFROM \n ndt.ndt7\nWHERE\n date BETWEEN \"${__from:date:YYYY-MM-DD}\" AND \"${__to:date:YYYY-MM-DD}\"\n AND DATE_TRUNC(date, WEEK) != DATE_TRUNC(CURRENT_DATE, WEEK)\n AND raw.Download IS NOT NULL\n AND ARRAY_LENGTH(raw.Download.ServerMeasurements) > 0\n AND (\"ist\" IN ( SELECT metadata.Value FROM UNNEST(raw.Download.ClientMetadata) AS metadata))\n AND REGEXP_CONTAINS(SUBSTR(server.Site, 0, 3), '${metro:regex}')\n AND REGEXP_CONTAINS(server.Site, '${site:regex}')\n AND REGEXP_CONTAINS(CAST(client.Network.ASNumber AS string), \"${as:regex}\")\nGROUP BY time\nORDER BY time",
"refId": "A",
"select": [
[
{
"params": [
"-- value --"
],
"type": "column"
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"timeColumn": "-- time --",
"timeColumnType": "TIMESTAMP",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Weekly Tests (IST)",
"transformations": [],
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "TB Transferred",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 12,
"x": 12,
"y": 43
},
"id": 16,
"options": {
"legend": {
"calcs": [
"last"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
"format": 0,
"group": [],
"location": "US",
"metricColumn": "none",
"orderByCol": "1",
"orderBySort": "1",
"project": "mlab-oti",
"rawQuery": true,
"rawSql": "SELECT \n TIMESTAMP_TRUNC(TIMESTAMP(date), WEEK, \"UTC\") AS time,\n SUM(ARRAY_REVERSE(raw.Download.ServerMeasurements)[OFFSET(0)].TCPInfo.BytesAcked)/1000000000000 AS totalTB\nFROM \n ndt.ndt7\nWHERE\n date BETWEEN \"${__from:date:YYYY-MM-DD}\" AND \"${__to:date:YYYY-MM-DD}\"\n AND DATE_TRUNC(date, WEEK) != DATE_TRUNC(CURRENT_DATE, WEEK)\n AND raw.Download IS NOT NULL\n AND ARRAY_LENGTH(raw.Download.ServerMeasurements) > 0 \n AND (\"ist\" IN ( SELECT metadata.Value FROM UNNEST(raw.Download.ClientMetadata) AS metadata))\n AND REGEXP_CONTAINS(SUBSTR(server.Site, 0, 3), '${metro:regex}')\n AND REGEXP_CONTAINS(server.Site, '${site:regex}')\n AND REGEXP_CONTAINS(CAST(client.Network.ASNumber AS string), \"${as:regex}\")\nGROUP BY time\nORDER BY time",
"refId": "A",
"select": [
[
{
"params": [
"-- value --"
],
"type": "column"
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"timeColumn": "-- time --",
"timeColumnType": "TIMESTAMP",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Weekly Data Transferred (IST)",
"transformations": [],
"type": "timeseries"
}
],
"refresh": "",
Expand Down Expand Up @@ -986,13 +1267,13 @@
]
},
"time": {
"from": "now-7d",
"from": "now-4M",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "NDT: Early Exit",
"uid": "W8JPPzzIz",
"version": 34,
"version": 39,
"weekStart": ""
}
}

0 comments on commit 983e373

Please sign in to comment.