From 0bc994c89e4b621852dd0037cb7eec09121c41f8 Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Tue, 26 Nov 2024 19:04:08 -0500 Subject: [PATCH] Add dashboard for Autojoin status (#1070) * Add dashboard for Autojoin status * Correct datasources --- .../grafana/dashboards/Autojoin.json | 1048 +++++++++++++++++ 1 file changed, 1048 insertions(+) create mode 100644 config/federation/grafana/dashboards/Autojoin.json diff --git a/config/federation/grafana/dashboards/Autojoin.json b/config/federation/grafana/dashboards/Autojoin.json new file mode 100644 index 00000000..abad5272 --- /dev/null +++ b/config/federation/grafana/dashboards/Autojoin.json @@ -0,0 +1,1048 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 466, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "from": 1, + "result": { + "color": "green", + "index": 0, + "text": "✓" + }, + "to": 100 + }, + "type": "range" + }, + { + "options": { + "from": 0, + "result": { + "color": "red", + "index": 1, + "text": "☓" + }, + "to": 1 + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 3, + "x": 0, + "y": 0 + }, + "id": 11, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value_and_name", + "wideLayout": true + }, + "pluginVersion": "11.1.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "editorMode": "code", + "expr": "count(sum(ndt7_measurer_bbr_enabled_total{status=\"true\", machine=~\".*${metro:regex}.*\"}) > 0)", + "hide": false, + "instant": false, + "legendFormat": "ndt7", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(jostler_bytes_per_bundle_count{datatype=\"ndt7\", machine=~\".*${metro:regex}.*\"} > 0)", + "interval": "", + "legendFormat": "jostler", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "editorMode": "code", + "expr": "count(heartbeat_health_endpoint_checks_total{status=\"OK\", machine=~\".*${metro:regex}.*\"} > 0)", + "hide": false, + "instant": false, + "legendFormat": "heartbeat", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "editorMode": "code", + "expr": "count(uuid_annotator_annotation_errors_total{machine=~\".*${metro:regex}.*\"} == 0)", + "hide": false, + "instant": false, + "legendFormat": "uuid-annotator", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "editorMode": "code", + "expr": "count(traces_performed_total{exported_type=\"scamper\", machine=~\".*${metro:regex}.*\"} > 0)", + "hide": false, + "instant": false, + "legendFormat": "traceroute", + "range": true, + "refId": "E" + } + ], + "title": "Status ${metro}", + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 9, + "x": 3, + "y": 0 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "7.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "editorMode": "code", + "expr": "sum by(site) (label_replace(rate(controller_access_txcontroller_requests_total{request=\"rejected\", machine=~\".*${metro:regex}.*\"}[15m]), \"site\", \"$1\", \"machine\", \"ndt-([a-z]{3}[^-]+)-.*\")) / \n sum by(site) (label_replace(rate(controller_access_txcontroller_requests_total{machine=~\".*${metro:regex}.*\"}[15m]), \"site\", \"$1\", \"machine\", \"ndt-([a-z]{3}[^-]+)-.*\"))", + "hide": false, + "interval": "", + "legendFormat": "{{site}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasourcePlatform}" + }, + "editorMode": "code", + "expr": "sum by(site) (rate(controller_access_txcontroller_requests_total{request=\"rejected\", machine=~\".*${metro:regex}.*\"}[15m])) / \n sum by(site) (rate(controller_access_txcontroller_requests_total{machine=~\".*${metro:regex}.*\"}[15m]) )", + "hide": false, + "legendFormat": "{{site}}", + "range": true, + "refId": "B" + } + ], + "title": "Prometheus: Percent of NDT TX Rejections ($metro)", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Tests/min", + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasourcePlatform}" + }, + "editorMode": "code", + "expr": "60 * sum by(direction, site) (rate(ndt_test_rate_mbps_count{direction=\"download\", machine=~\".*(${metro:regex}).*\"}[5m]))\n", + "hide": false, + "legendFormat": "{{site}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "editorMode": "code", + "expr": "60 * sum by(direction, org, site) (label_replace(rate(ndt_test_rate_mbps_count{deployment=\"byos\", direction=\"download\", machine=~\".*(${metro:regex}).*\"}[5m]), \"site\", \"$1\", \"machine\", \"ndt-([a-z]{3}[^-]+)-.*\"))\n", + "legendFormat": "{{site}}", + "range": true, + "refId": "A" + } + ], + "title": "Prometheus: NDT Download Counts ($metro)", + "type": "timeseries" + }, + { + "cards": { + "cardPadding": 0, + "cardRound": 0 + }, + "color": { + "cardColor": "#cffaff", + "colorScale": "linear", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 9 + }, + "heatmap": {}, + "hideZeroBuckets": true, + "highlightCards": true, + "id": 6, + "interval": "5m", + "legend": { + "show": true + }, + "options": { + "calculate": false, + "calculation": {}, + "cellGap": 1, + "cellRadius": 0, + "cellValues": { + "decimals": 0 + }, + "color": { + "exponent": 0.5, + "fill": "#cffaff", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "Spectral", + "steps": 128 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "ge" + }, + "showValue": "never", + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "Mbits" + } + }, + "pluginVersion": "11.1.3", + "reverseYBuckets": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum by(le) (increase(ndt_test_rate_mbps_bucket{direction=~\"download\", monitoring=\"false\", machine=~\".*${metro:regex}.*\"}[5m]))", + "format": "heatmap", + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Prometheus: Aggregate Download Rate Heatmap ($metro)", + "tooltip": { + "show": true, + "showHistogram": true + }, + "tooltipDecimals": 0, + "type": "heatmap", + "xAxis": { + "show": true + }, + "yAxis": { + "format": "Mbits", + "logBase": 1, + "show": true + }, + "yBucketBound": "upper" + }, + { + "datasource": { + "type": "grafana-bigquery-datasource", + "uid": "f126f149-75bd-4e5a-9883-fcd7e62bc80a" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "grafana-bigquery-datasource", + "uid": "f126f149-75bd-4e5a-9883-fcd7e62bc80a" + }, + "editorMode": "code", + "format": 0, + "location": "", + "project": "mlab-oti", + "rawQuery": true, + "rawSql": "/* TODO: figure out per-org labels */\nSELECT time, org as metric, count(*) as total FROM (\nSELECT TIMESTAMP_TRUNC(raw.StartTime, HOUR) as time, server.Site as org,\nFROM `mlab-autojoin.autoload_v2_ndt.ndt7_union`\nWHERE date BETWEEN \"${__from:date:YYYY-MM-DD}\" AND \"${__to:date:YYYY-MM-DD}\" AND server.Site is not NULL\n AND REGEXP_CONTAINS(server.Site, \"${metro:regex}\")\nUNION ALL\nSELECT TIMESTAMP_TRUNC(raw.StartTime, HOUR) as time, server.Site as org\nFROM `mlab-oti.ndt.ndt7`\nWHERE date BETWEEN \"${__from:date:YYYY-MM-DD}\" AND \"${__to:date:YYYY-MM-DD}\" AND server.Site is not NULL\n AND REGEXP_CONTAINS(server.Site, \".*${metro:regex}.*\")\n)\ngroup by time, org\norder by time,org", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "BigQuery: Row Counts per hour", + "type": "timeseries" + }, + { + "datasource": { + "type": "grafana-bigquery-datasource", + "uid": "PE8D1C7E267159A85" + }, + "gridPos": { + "h": 16, + "w": 8, + "x": 0, + "y": 18 + }, + "id": 3, + "maxDataPoints": 80000, + "options": { + "config": { + "displayModeBar": false + }, + "data": [], + "layout": { + "font": { + "color": "grey" + }, + "legend": { + "orientation": "h" + }, + "margin": { + "b": 50, + "l": 50, + "r": 50, + "t": 10 + }, + "paper_bgcolor": "rgba(0, 0, 0, 0)", + "plot_bgcolor": "rgba(0, 0, 0, 0)", + "xaxis": { + "autorange": true, + "gridcolor": "#333", + "range": [ + -0.9899999999999997, + 3.5500000000000025 + ], + "title": { + "text": "Mbps" + }, + "type": "log" + }, + "yaxis": { + "autorange": true, + "gridcolor": "#333", + "range": [ + -0.0016114953333780972, + 0.030618411334183845 + ], + "type": "linear" + } + }, + "onclick": "console.log(data)", + "script": "console.log(data);\nvar sites = {};\n\nvar x = data.series[0].fields[0].values;\nvar y = data.series[0].fields[1].values;\nvar names = data.series[0].fields[2].values;\n\nnames.forEach(site => {\n sites[site] = {\n x: [],\n y: [],\n name: site,\n line: {\n width: 1\n }\n }\n}); \nx.forEach((xv, i) => {\n sites[names[i]].x.push(x[i]);\n sites[names[i]].y.push(y[i]);\n})\nvar data = [];\nObject.keys(sites).sort().forEach(site => {\n data.push(sites[site]);\n});\nconsole.log(data);\nvar site = \"atl03\";\nvar trace = {\n x: x, //.filter((element, i) => names[i] === site),\n y: y, //.filter((element, i) => names[i] === site),\n name: names //.filter((element, i) => names[i] === site)\n};\nconsole.log(\"okay2\");\nconsole.log(trace);\n//return {data:[trace]};\nreturn {data:data};" + }, + "targets": [ + { + "datasource": { + "type": "grafana-bigquery-datasource", + "uid": "PE8D1C7E267159A85" + }, + "editorMode": "code", + "format": 1, + "location": "", + "project": "mlab-oti", + "rawQuery": true, + "rawSql": "SELECT * FROM (\nSELECT\n xright,\n CASE \"pdf\"\n WHEN \"pdf\" THEN site_pdf\n ELSE site_cdf\n END AS data,\n site,\nFROM `ops.ndt7_download_pdf_byosraw`(0.1, 3500, \"MeanThroughputMbps\", \"${__from:date:YYYY-MM-DD}\", \"${__to:date:YYYY-MM-DD}\", \"${metro:regex}.*\")\nUNION ALL\nSELECT\n xright,\n CASE \"pdf\"\n WHEN \"pdf\" THEN site_pdf\n ELSE site_cdf\n END AS data,\n site,\nFROM `ops.ndt7_download_pdf`(0.1, 3500, \"MeanThroughputMbps\", \"${__from:date:YYYY-MM-DD}\", \"${__to:date:YYYY-MM-DD}\", \"${metro:regex}.*\")\n)\nORDER BY xright, site", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "BigQuery: Download Mbps", + "type": "ae3e-plotly-panel" + }, + { + "datasource": { + "type": "grafana-bigquery-datasource", + "uid": "PE8D1C7E267159A85" + }, + "gridPos": { + "h": 16, + "w": 8, + "x": 8, + "y": 18 + }, + "id": 4, + "maxDataPoints": 80000, + "options": { + "config": { + "displayModeBar": false + }, + "data": [], + "layout": { + "font": { + "color": "grey" + }, + "legend": { + "orientation": "h" + }, + "margin": { + "b": 50, + "l": 50, + "r": 50, + "t": 10 + }, + "paper_bgcolor": "rgba(0, 0, 0, 0)", + "plot_bgcolor": "rgba(0, 0, 0, 0)", + "xaxis": { + "autorange": true, + "gridcolor": "#333", + "range": [ + -0.9899999999999997, + 2.6900000000000026 + ], + "title": { + "text": "RTT" + }, + "type": "log" + }, + "yaxis": { + "autorange": true, + "gridcolor": "#333", + "range": [ + -0.0016684022529029079, + 0.03169964280515525 + ], + "type": "linear" + } + }, + "onclick": "console.log(\"okay\");\nconsole.log(data)\n// window.updateVariables({query:{'var-project':'test'}, partial: true})", + "script": "console.log(data);\nvar sites = {};\n\nvar x = data.series[0].fields[0].values;\nvar y = data.series[0].fields[1].values;\nvar names = data.series[0].fields[2].values;\n\nnames.forEach(site => {\n sites[site] = {\n x: [],\n y: [],\n name: site,\n line: {\n width: 1\n }\n }\n}); \nx.forEach((xv, i) => {\n sites[names[i]].x.push(x[i]);\n sites[names[i]].y.push(y[i]);\n})\nvar data = [];\nObject.keys(sites).sort().forEach(site => {\n data.push(sites[site]);\n});\nconsole.log(data);\nvar site = \"atl03\";\nvar trace = {\n x: x, //.filter((element, i) => names[i] === site),\n y: y, //.filter((element, i) => names[i] === site),\n name: names //.filter((element, i) => names[i] === site)\n};\nconsole.log(\"okay2\");\nconsole.log(trace);\n//return {data:[trace]};\nreturn {data:data};" + }, + "targets": [ + { + "datasource": { + "type": "grafana-bigquery-datasource", + "uid": "PE8D1C7E267159A85" + }, + "editorMode": "code", + "format": 1, + "location": "", + "project": "mlab-oti", + "rawQuery": true, + "rawSql": "SELECT * FROM (\nSELECT\n xright,\n CASE \"pdf\"\n WHEN \"pdf\" THEN site_pdf\n ELSE site_cdf\n END AS data,\n site,\nFROM `ops.ndt7_download_pdf_byosraw`(0.1, 500, \"MinRTT\", \"${__from:date:YYYY-MM-DD}\", \"${__to:date:YYYY-MM-DD}\", \"${metro:regex}.*\")\nUNION ALL\nSELECT\n xright,\n CASE \"pdf\"\n WHEN \"pdf\" THEN site_pdf\n ELSE site_cdf\n END AS data,\n site,\nFROM `ops.ndt7_download_pdf`(0.1, 500, \"MinRTT\", \"${__from:date:YYYY-MM-DD}\", \"${__to:date:YYYY-MM-DD}\", \"${metro:regex}.*\")\n)\nORDER BY xright, site", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "BigQuery: Download MinRTT", + "type": "ae3e-plotly-panel" + }, + { + "datasource": { + "type": "grafana-bigquery-datasource", + "uid": "PE8D1C7E267159A85" + }, + "gridPos": { + "h": 16, + "w": 8, + "x": 16, + "y": 18 + }, + "id": 5, + "maxDataPoints": 80000, + "options": { + "config": { + "displayModeBar": false + }, + "data": [], + "layout": { + "font": { + "color": "grey" + }, + "legend": { + "orientation": "h" + }, + "margin": { + "b": 50, + "l": 50, + "r": 50, + "t": 10 + }, + "paper_bgcolor": "rgba(0, 0, 0, 0)", + "plot_bgcolor": "rgba(0, 0, 0, 0)", + "xaxis": { + "autorange": true, + "gridcolor": "#333", + "range": [ + -5.989999999999998, + 0.009999999999961536 + ], + "title": { + "text": "Loss" + }, + "type": "log" + }, + "yaxis": { + "autorange": true, + "gridcolor": "#333", + "range": [ + -0.000544817130945613, + 0.010351525487966648 + ], + "type": "linear" + } + }, + "onclick": "console.log(\"okay\");\nconsole.log(data)\n// window.updateVariables({query:{'var-project':'test'}, partial: true})", + "script": "console.log(data);\nvar sites = {};\n\nvar x = data.series[0].fields[0].values;\nvar y = data.series[0].fields[1].values;\nvar names = data.series[0].fields[2].values;\n\nnames.forEach(site => {\n sites[site] = {\n x: [],\n y: [],\n name: site,\n line: {\n width: 1\n }\n }\n}); \nx.forEach((xv, i) => {\n sites[names[i]].x.push(x[i]);\n sites[names[i]].y.push(y[i]);\n})\nvar data = [];\nObject.keys(sites).sort().forEach(site => {\n data.push(sites[site]);\n});\nconsole.log(data);\nvar site = \"atl03\";\nvar trace = {\n x: x, //.filter((element, i) => names[i] === site),\n y: y, //.filter((element, i) => names[i] === site),\n name: names //.filter((element, i) => names[i] === site)\n};\nconsole.log(\"okay2\");\nconsole.log(trace);\n//return {data:[trace]};\nreturn {data:data};" + }, + "targets": [ + { + "datasource": { + "type": "grafana-bigquery-datasource", + "uid": "PE8D1C7E267159A85" + }, + "editorMode": "code", + "format": 1, + "location": "", + "project": "mlab-oti", + "rawQuery": true, + "rawSql": "SELECT * FROM (\nSELECT\n xright,\n CASE \"pdf\"\n WHEN \"pdf\" THEN site_pdf\n ELSE site_cdf\n END AS data,\n site,\nFROM `ops.ndt7_download_pdf_byosraw`(1e-6, 1, \"LossRate\", \"${__from:date:YYYY-MM-DD}\", \"${__to:date:YYYY-MM-DD}\", \"${metro:regex}.*\")\nUNION ALL\nSELECT\n xright,\n CASE \"pdf\"\n WHEN \"pdf\" THEN site_pdf\n ELSE site_cdf\n END AS data,\n site,\nFROM `ops.ndt7_download_pdf`(1e-6, 1, \"LossRate\", \"${__from:date:YYYY-MM-DD}\", \"${__to:date:YYYY-MM-DD}\", \"${metro:regex}.*\")\n)\nORDER BY xright, site", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "BigQuery: Download LossRates", + "type": "ae3e-plotly-panel" + } + ], + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Autojoin Platform (mlab-autojoin)", + "value": "P9963F0EC00120018" + }, + "hide": 1, + "includeAll": false, + "multi": false, + "name": "datasourceAutojoin", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "/Autojoin/", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": "Platform Cluster (mlab-oti)", + "value": "WW1Jk2sGk" + }, + "hide": 1, + "includeAll": false, + "multi": false, + "name": "datasourcePlatform", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "/Platform Cluster/", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": "Google BigQuery (measurement-lab)", + "value": "f126f149-75bd-4e5a-9883-fcd7e62bc80a" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "bigquery", + "options": [], + "query": "grafana-bigquery-datasource", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": "equinix", + "value": "equinix" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasourceAutojoin}" + }, + "definition": "label_values(ndt_test_rate_mbps_count,org)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "org", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(ndt_test_rate_mbps_count,org)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "dfw", + "value": "dfw" + }, + "datasource": { + "type": "grafana-bigquery-datasource", + "uid": "${bigquery}" + }, + "definition": "", + "hide": 0, + "includeAll": false, + "multi": true, + "name": "metro", + "options": [], + "query": { + "editorMode": "code", + "format": 1, + "location": "", + "project": "measurement-lab", + "rawQuery": true, + "rawSql": "SELECT SUBSTR(server.Site, 0, 3) as metro FROM `measurement-lab.ndt.ndt7`\nWHERE date BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) AND CURRENT_DATE()\n AND server.Site is not null\n AND \"mlab\" = \"$org\"\nGROUP BY server.Site \nUNION ALL\nSELECT SUBSTR(server.Site, 0, 3) as metro FROM `mlab-autojoin.autoload_v2_ndt.ndt7_union`\nWHERE date BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) AND CURRENT_DATE()\n AND server.Site is not null\n AND archiver.ArchiveURL LIKE \"%${org}%\"\nGROUP BY server.Site\nORDER BY metro", + "refId": "tempvar", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Autojoin", + "uid": "abcdef37wdji8d", + "version": 81, + "weekStart": "" +}