From b003ef53a941057bf5f12054e93e9f00c8ad3679 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Mon, 13 Dec 2021 12:14:42 -0500 Subject: [PATCH] export dashboard --- grafana-dashboard.json | 1158 ++++++++++++++++++++++++++++++++++++++++ readme.md | 25 + 2 files changed, 1183 insertions(+) create mode 100644 grafana-dashboard.json diff --git a/grafana-dashboard.json b/grafana-dashboard.json new file mode 100644 index 0000000..a92e21d --- /dev/null +++ b/grafana-dashboard.json @@ -0,0 +1,1158 @@ +{ + "__inputs": [ + { + "name": "DS_NODES.MADIATOR.COM", + "label": "nodes.madiator.com", + "description": "", + "type": "datasource", + "pluginId": "marcusolsson-csv-datasource", + "pluginName": "CSV" + } + ], + "__requires": [ + { + "type": "panel", + "id": "geomap", + "name": "Geomap", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "" + }, + { + "type": "datasource", + "id": "marcusolsson-csv-datasource", + "name": "CSV", + "version": "0.6.1" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 20, + "options": { + "content": "# Metrics\n\n- Percent of all published data hosted\n- Desktop app retention\n- Desktop app WAU\n- Blockchain metrics? # claims, # channels, TVL", + "mode": "markdown" + }, + "pluginVersion": "", + "title": "TODO", + "type": "text" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 16, + "title": "Key Metrics", + "type": "row" + }, + { + "datasource": null, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 9 + }, + "id": 34, + "options": { + "content": "\n# Blockchain", + "mode": "markdown" + }, + "pluginVersion": "", + "title": "Panel Title", + "type": "text" + }, + { + "datasource": "${DS_NODES.MADIATOR.COM}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 3, + "y": 9 + }, + "id": 14, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "", + "targets": [ + { + "decimalSeparator": ".", + "delimiter": ",", + "header": true, + "ignoreUnknown": true, + "refId": "A", + "schema": [ + { + "name": "address", + "type": "string" + } + ], + "skipRows": 0 + } + ], + "title": "Public Blockchain Nodes", + "transformations": [ + { + "id": "reduce", + "options": { + "reducers": [ + "distinctCount" + ] + } + } + ], + "type": "stat" + }, + { + "datasource": "${DS_NODES.MADIATOR.COM}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 30 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 7, + "y": 9 + }, + "id": 18, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "", + "targets": [ + { + "decimalSeparator": ".", + "delimiter": ",", + "header": true, + "ignoreUnknown": true, + "refId": "A", + "schema": [ + { + "name": "user_agent", + "type": "string" + }, + { + "name": "address", + "type": "string" + } + ], + "skipRows": 0 + } + ], + "title": "Public lbcd Nodes", + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "address": { + "aggregations": [ + "distinctCount" + ], + "operation": "aggregate" + }, + "user_agent": { + "aggregations": [], + "operation": "groupby" + } + } + } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "regex", + "options": { + "value": ".*LBRY\\.GO.*" + } + }, + "fieldName": "user_agent" + } + ], + "match": "any", + "type": "include" + } + } + ], + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 14 + }, + "id": 35, + "options": { + "content": "# Data", + "mode": "markdown" + }, + "pluginVersion": "", + "title": "Panel Title", + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 5, + "w": 4, + "x": 3, + "y": 14 + }, + "id": 22, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "title": "DHT Nodes (estimated)", + "type": "timeseries" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 5, + "w": 4, + "x": 7, + "y": 14 + }, + "id": 28, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "title": "Total Data Hosted (estimated)", + "type": "timeseries" + }, + { + "datasource": null, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 19 + }, + "id": 36, + "options": { + "content": "# Hubs", + "mode": "markdown" + }, + "pluginVersion": "", + "title": "Panel Title", + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 5, + "w": 4, + "x": 3, + "y": 19 + }, + "id": 24, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "title": "Hubs", + "type": "timeseries" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 5, + "w": 4, + "x": 7, + "y": 19 + }, + "id": 26, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Countries with Hubs", + "type": "timeseries" + }, + { + "datasource": null, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 24 + }, + "id": 37, + "options": { + "content": "# Apps", + "mode": "markdown" + }, + "pluginVersion": "", + "title": "Panel Title", + "type": "text" + }, + { + "datasource": null, + "description": "- LBRY Desktop\n- Odysee", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 3, + "y": 24 + }, + "id": 30, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "", + "targets": [ + { + "exemplar": true, + "expr": "2", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Apps with 10k+ DAU", + "type": "stat" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 10, + "panels": [], + "title": "Blockchain", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 30 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "", + "targets": [ + { + "exemplar": true, + "expr": "lbcd_blocks", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Blocks", + "type": "stat" + }, + { + "datasource": "${DS_NODES.MADIATOR.COM}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 6, + "y": 30 + }, + "id": 32, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "", + "targets": [ + { + "decimalSeparator": ".", + "delimiter": ",", + "header": true, + "ignoreUnknown": true, + "refId": "A", + "schema": [ + { + "name": "country", + "type": "string" + } + ], + "skipRows": 0 + } + ], + "title": "Countries with Nodes", + "transformations": [ + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "regex", + "options": { + "value": "[a-z]" + } + }, + "fieldName": "country" + } + ], + "match": "any", + "type": "include" + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "country": { + "aggregations": [], + "operation": "groupby" + } + } + } + }, + { + "id": "reduce", + "options": { + "reducers": [ + "distinctCount" + ] + } + } + ], + "type": "stat" + }, + { + "datasource": "${DS_NODES.MADIATOR.COM}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 16, + "x": 0, + "y": 35 + }, + "id": 6, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "country" + } + ] + }, + "pluginVersion": "", + "targets": [ + { + "decimalSeparator": ".", + "delimiter": ",", + "header": true, + "ignoreUnknown": true, + "refId": "A", + "schema": [ + { + "name": "address", + "type": "string" + }, + { + "name": "user_agent", + "type": "string" + }, + { + "name": "country", + "type": "string" + } + ], + "skipRows": 0 + } + ], + "title": "Public Nodes", + "type": "table" + }, + { + "datasource": "${DS_NODES.MADIATOR.COM}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 16, + "x": 0, + "y": 45 + }, + "id": 12, + "options": { + "basemap": { + "config": {}, + "type": "default" + }, + "controls": { + "mouseWheelZoom": true, + "showAttribution": true, + "showDebug": false, + "showScale": false, + "showZoom": true + }, + "layers": [ + { + "config": { + "color": { + "fixed": "purple" + }, + "fillOpacity": 0.6, + "shape": "circle", + "showLegend": true, + "size": { + "field": "address (count)", + "fixed": 5, + "max": 15, + "min": 2 + } + }, + "location": { + "lookup": "country", + "mode": "lookup" + }, + "type": "markers" + } + ], + "view": { + "id": "coords", + "lat": 12, + "lon": 21, + "zoom": 1.8 + } + }, + "pluginVersion": "8.2.2", + "targets": [ + { + "decimalSeparator": ".", + "delimiter": ",", + "header": true, + "ignoreUnknown": true, + "refId": "A", + "schema": [ + { + "name": "address", + "type": "string" + }, + { + "name": "country", + "type": "string" + } + ], + "skipRows": 0 + } + ], + "title": "Nodes Map", + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "address": { + "aggregations": [ + "count" + ], + "operation": "aggregate" + }, + "country": { + "aggregations": [], + "operation": "groupby" + } + } + } + } + ], + "type": "geomap" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 58 + }, + "id": 8, + "panels": [], + "title": "Data Layer", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 59 + }, + "id": 2, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "", + "targets": [ + { + "exemplar": true, + "expr": "dht_node_known_peers", + "interval": "", + "legendFormat": "known peers", + "refId": "A" + } + ], + "title": "DHT Node Peers", + "type": "stat" + } + ], + "refresh": "15m", + "schemaVersion": 31, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "LBRY", + "uid": "zqY5GYO7k", + "version": 16 +} diff --git a/readme.md b/readme.md index 0dad5c5..1b92b4a 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,30 @@ +# LBRY Dashboard + +Important metrics: + +- num of peers + - [x] blockchain (nodes.madiator.com) + - [ ] dht + - [ ] apps? +- space + - [ ] storage space allocated to network + - [ ] storage space used by network + - [ ] % of downloads coming from reflector +- activity + - [ ] total claims and identities + - [ ] claims / week + - [ ] txns + - [ ] weekly active addresses + + + ## notes to self make sure you `ufw allow to 172.17.0.1/16` so that prometheus can access the host https://stackoverflow.com/questions/64768618/ufw-forbids-docker-container-to-connect-to-postgres + + +requires CSV plugin: https://github.com/marcusolsson/grafana-csv-datasource + +then import `grafana-dashboard.json`