{ "__inputs": [ { "name": "DS_PROMETHEUS", "label": "Prometheus", "description": "", "type": "datasource", "pluginId": "prometheus", "pluginName": "Prometheus" } ], "__requires": [ { "type": "panel", "id": "geomap", "name": "Geomap", "version": "" }, { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "8.2.2" }, { "type": "panel", "id": "piechart", "name": "Pie chart", "version": "" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" }, { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, { "type": "panel", "id": "table", "name": "Table", "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" } ] }, "description": "Dashboard for endlessh", "editable": true, "fiscalYearStartMonth": 0, "gnetId": null, "graphTooltip": 0, "id": null, "iteration": 1635302834418, "links": [], "liveNow": false, "panels": [ { "datasource": "-- Dashboard --", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 3, "w": 4, "x": 0, "y": 0 }, "id": 36, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^Total number connections that endlessh trapped$/", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.2.2", "targets": [ { "panelId": 47, "refId": "A" } ], "title": "Connections", "transformations": [ { "id": "groupBy", "options": { "fields": { "Value #Count": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Seen": { "aggregations": [ "sum" ], "operation": "aggregate" }, "ip": { "aggregations": [], "operation": "groupby" } } } }, { "id": "reduce", "options": { "includeTimeField": false, "labelsToFields": false, "mode": "reduceFields", "reducers": [ "sum" ] } }, { "id": "merge", "options": {} }, { "id": "organize", "options": { "excludeByName": {}, "indexByName": { "Field": 0, "Total": 1 }, "renameByName": { "Total": "Total number connections that endlessh trapped", "Value #Count (lastNotNull)": "Total number connections that endlessh trapped", "Value #Seen (sum)": "Total number connections that endlessh trapped" } } } ], "type": "stat" }, { "datasource": "-- Dashboard --", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "s" }, "overrides": [] }, "gridPos": { "h": 3, "w": 4, "x": 4, "y": 0 }, "id": 42, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^Time spent on endlessh$/", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.2.2", "targets": [ { "panelId": 47, "refId": "A" } ], "title": "Trapped Time", "transformations": [ { "id": "groupBy", "options": { "fields": { "Value #Count": { "aggregations": [ "lastNotNull" ], "operation": null }, "Value #Seen": { "aggregations": [ "sum" ], "operation": null }, "Value #Time": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Trapped": { "aggregations": [ "sum" ], "operation": "aggregate" }, "ip": { "aggregations": [], "operation": "groupby" } } } }, { "id": "reduce", "options": { "includeTimeField": false, "labelsToFields": false, "mode": "reduceFields", "reducers": [ "sum" ] } }, { "id": "merge", "options": {} }, { "id": "organize", "options": { "excludeByName": {}, "indexByName": {}, "renameByName": { "Total": "Seconds spent on endlessh", "Value #Time (lastNotNull)": "Seconds spent on endlessh", "Value #Trapped (lastNotNull)": "Time spent on endlessh", "Value #Trapped (sum)": "Time spent on endlessh" } } } ], "type": "stat" }, { "datasource": null, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 3, "w": 4, "x": 8, "y": 0 }, "id": 18, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.2.2", "targets": [ { "exemplar": true, "expr": "increase(endlessh_sent_bytes_total{instance=\"$host\",job=\"$job\"}[$__range])", "hide": false, "interval": "", "legendFormat": "Bytes sent by endlessh", "refId": "sent_bytes" } ], "title": "Sent Bytes", "type": "stat" }, { "datasource": "-- Dashboard --", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 3, "w": 4, "x": 12, "y": 0 }, "id": 38, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^Unique IPs connected$/", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.2.2", "targets": [ { "panelId": 47, "refId": "A" } ], "title": "Unique IPs", "transformations": [ { "id": "groupBy", "options": { "fields": { "Time": { "aggregations": [], "operation": null }, "Value #Count": { "aggregations": [ "lastNotNull" ], "operation": null }, "Value #Seen": { "aggregations": [ "sum" ], "operation": "aggregate" }, "ip": { "aggregations": [], "operation": "groupby" } } } }, { "id": "reduce", "options": { "includeTimeField": false, "labelsToFields": false, "mode": "reduceFields", "reducers": [ "count" ] } }, { "id": "merge", "options": {} }, { "id": "organize", "options": { "excludeByName": {}, "indexByName": {}, "renameByName": { "Count": "Unique IPs connected", "Value #Seen (sum)": "Unique IPs connected", "ip": "" } } } ], "type": "stat" }, { "datasource": "-- Dashboard --", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "links": [ { "targetBlank": true, "title": "whois", "url": "https://search.arin.net/rdap/?query=${__value.text}" } ], "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 3, "w": 4, "x": 16, "y": 0 }, "id": 45, "maxDataPoints": null, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^Client IP of the latest connection$/", "values": false }, "text": {}, "textMode": "value" }, "pluginVersion": "8.2.2", "repeat": null, "targets": [ { "panelId": 47, "refId": "A" } ], "title": "Latest Connection", "transformations": [ { "id": "groupBy", "options": { "fields": { "Time": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Seen": { "aggregations": [ "sum" ], "operation": "aggregate" }, "country": { "aggregations": [ "lastNotNull" ], "operation": null }, "ip": { "aggregations": [], "operation": "groupby" } } } }, { "id": "merge", "options": {} }, { "id": "filterByValue", "options": { "filters": [ { "config": { "id": "greater", "options": { "value": 0 } }, "fieldName": "Value #Seen (sum)" } ], "match": "any", "type": "include" } }, { "id": "sortBy", "options": { "fields": {}, "sort": [ { "field": "Time (lastNotNull)" } ] } }, { "id": "organize", "options": { "excludeByName": { "instance": true, "job": true }, "indexByName": { "Time (lastNotNull)": 0, "instance": 3, "ip (lastNotNull)": 1, "job": 2 }, "renameByName": { "Time (lastNotNull)": "Time", "Value #Seen (sum)": "Count", "ip": "Client IP of the latest connection", "ip (lastNotNull)": "Client IP of the latest connection" } } } ], "type": "stat" }, { "datasource": null, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "#EAB839", "value": 10 }, { "color": "red", "value": 20 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 3, "w": 4, "x": 20, "y": 0 }, "id": 20, "interval": null, "maxDataPoints": null, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.2.2", "targets": [ { "exemplar": true, "expr": "(endlessh_client_open_count_total{instance=\"$host\",job=\"$job\"}) - (endlessh_client_closed_count_total{instance=\"$host\",job=\"$job\"} offset $__interval or endlessh_client_open_count_total{instance=\"$host\",job=\"$job\"} * 0)", "instant": false, "interval": "", "legendFormat": "Current Open Connections", "refId": "current_open" } ], "title": "Current Connections", "type": "stat" }, { "datasource": "-- Dashboard --", "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": "stepAfter", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "min": -0.01, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 12, "x": 0, "y": 3 }, "id": 30, "options": { "legend": { "calcs": [], "displayMode": "hidden", "placement": "bottom" }, "tooltip": { "mode": "single" } }, "targets": [ { "panelId": 20, "refId": "A" } ], "title": "Concurrent Connections", "type": "timeseries" }, { "datasource": "-- Dashboard --", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "mappings": [] }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 3 }, "id": 32, "options": { "displayLabels": [], "legend": { "displayMode": "table", "placement": "right", "values": [ "value", "percent" ] }, "pieType": "pie", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single" } }, "targets": [ { "panelId": 47, "refId": "A" } ], "title": "Connections by country", "transformations": [ { "id": "groupBy", "options": { "fields": { "Value #Count": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Seen": { "aggregations": [ "sum" ], "operation": "aggregate" }, "country": { "aggregations": [ "last" ], "operation": "aggregate" }, "ip": { "aggregations": [], "operation": "groupby" } } } }, { "id": "merge", "options": {} }, { "id": "filterByValue", "options": { "filters": [ { "config": { "id": "greater", "options": { "value": 0 } }, "fieldName": "Value #Seen (sum)" } ], "match": "any", "type": "include" } }, { "id": "groupBy", "options": { "fields": { "Value #Count (lastNotNull)": { "aggregations": [ "sum" ], "operation": "aggregate" }, "Value #Seen (sum)": { "aggregations": [ "sum" ], "operation": "aggregate" }, "country (last)": { "aggregations": [], "operation": "groupby" }, "country (lastNotNull)": { "aggregations": [], "operation": "groupby" } } } }, { "id": "rowsToFields", "options": {} } ], "type": "piechart" }, { "cacheTimeout": null, "datasource": "-- Dashboard --", "fieldConfig": { "defaults": { "color": { "mode": "continuous-GrYlRd" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "#96D98D", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 12, "w": 12, "x": 0, "y": 7 }, "id": 48, "interval": null, "links": [], "maxDataPoints": null, "options": { "basemap": { "config": {}, "type": "default" }, "controls": { "mouseWheelZoom": false, "showAttribution": false, "showDebug": false, "showScale": false, "showZoom": true }, "layers": [ { "config": { "color": { "field": "Connections", "fixed": "dark-green" }, "fillOpacity": 0.4, "shape": "circle", "showLegend": false, "size": { "field": "Connections", "fixed": 5, "max": 10, "min": 2 } }, "location": { "geohash": "Geohash", "mode": "geohash" }, "type": "markers" } ], "view": { "id": "zero", "lat": 0, "lon": 0, "zoom": 1 } }, "targets": [ { "panelId": 47, "refId": "A" } ], "timeFrom": null, "title": "Locations", "transformations": [ { "id": "groupBy", "options": { "fields": { "Time": { "aggregations": [ "firstNotNull" ], "operation": null }, "Value": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Count": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Seen": { "aggregations": [ "sum" ], "operation": "aggregate" }, "Value #geo": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #time": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "geohash": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "ip": { "aggregations": [], "operation": "groupby" }, "location": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" } } } }, { "id": "groupBy", "options": { "fields": { "Time (firstNotNull)": { "aggregations": [ "firstNotNull" ], "operation": "aggregate" }, "Time (lastNotNull)": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Count (lastNotNull)": { "aggregations": [ "sum" ], "operation": "aggregate" }, "Value #Seen (sum)": { "aggregations": [ "sum" ], "operation": "aggregate" }, "Value #geo (lastNotNull)": { "aggregations": [ "sum" ], "operation": "aggregate" }, "Value #time (lastNotNull)": { "aggregations": [ "sum" ], "operation": "aggregate" }, "Value (lastNotNull)": { "aggregations": [ "sum" ], "operation": "aggregate" }, "geohash (lastNotNull)": { "aggregations": [], "operation": "groupby" }, "location (lastNotNull)": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" } } } }, { "id": "organize", "options": { "excludeByName": {}, "indexByName": { "Time (firstNotNull) (firstNotNull)": 0, "Value #geo (lastNotNull) (sum)": 3, "geohash (lastNotNull)": 1, "location (lastNotNull) (lastNotNull)": 2 }, "renameByName": { "Time (firstNotNull) (firstNotNull)": "Time", "Time (firstNotNull) (lastNotNull)": "Time", "Value #Count (lastNotNull) (lastNotNull)": "Connections", "Value #Count (lastNotNull) (sum)": "Connections", "Value #Seen (sum) (lastNotNull)": "Count", "Value #Seen (sum) (sum)": "Connections", "Value #geo (lastNotNull) (sum)": "Value", "Value #time (lastNotNull) (sum)": "Trapped Time", "Value (lastNotNull) (sum)": "Value", "geohash (lastNotNull)": "Geohash", "location (lastNotNull) (lastNotNull)": "Location" } } } ], "type": "geomap" }, { "datasource": null, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "displayMode": "auto", "filterable": true, "minWidth": 50 }, "links": [], "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Last Connection" }, "properties": [ { "id": "custom.minWidth", "value": 150 } ] }, { "matcher": { "id": "byName", "options": "IP" }, "properties": [ { "id": "links", "value": [ { "targetBlank": true, "title": "search ARIN", "url": "https://search.arin.net/rdap/?query=${__data.fields.IP}" } ] } ] }, { "matcher": { "id": "byName", "options": "Trapped Time" }, "properties": [ { "id": "unit", "value": "s" } ] } ] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 11 }, "id": 47, "options": { "frameIndex": 0, "showHeader": true, "sortBy": [ { "desc": true, "displayName": "Last Connection" } ] }, "pluginVersion": "8.2.2", "targets": [ { "exemplar": true, "expr": "(endlessh_client_open_count{instance=\"$host\",job=\"$job\"} - endlessh_client_open_count{instance=\"$host\",job=\"$job\"} offset $__interval) > 0 or (endlessh_client_open_count{instance=\"$host\",job=\"$job\"}!=0 unless endlessh_client_open_count{instance=\"$host\",job=\"$job\"} offset $__interval)", "format": "table", "hide": false, "interval": "", "legendFormat": "Seen {{ip}}", "refId": "Seen" }, { "exemplar": true, "expr": "(endlessh_client_trapped_time_seconds{instance=\"$host\",job=\"$job\"} - endlessh_client_trapped_time_seconds{instance=\"$host\",job=\"$job\"} offset $__interval) > 0 or (endlessh_client_trapped_time_seconds{instance=\"$host\",job=\"$job\"}!=0 unless endlessh_client_trapped_time_seconds{instance=\"$host\",job=\"$job\"} offset $__interval)", "format": "table", "hide": false, "interval": "", "legendFormat": "Trapped {{ip}}", "refId": "Trapped" } ], "title": "Clients", "transformations": [ { "id": "groupBy", "options": { "fields": { "Time": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Seen": { "aggregations": [ "sum" ], "operation": "aggregate" }, "Value #Trapped": { "aggregations": [ "sum" ], "operation": "aggregate" }, "country": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "ip": { "aggregations": [], "operation": "groupby" } } } }, { "id": "merge", "options": {} }, { "id": "groupBy", "options": { "fields": { "Time (lastNotNull)": { "aggregations": [ "firstNotNull" ], "operation": "aggregate" }, "Value #Seen (sum)": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Trapped (lastNotNull)": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "Value #Trapped (sum)": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "country (lastNotNull)": { "aggregations": [ "lastNotNull" ], "operation": "aggregate" }, "ip": { "aggregations": [], "operation": "groupby" } } } }, { "id": "filterByValue", "options": { "filters": [ { "config": { "id": "greater", "options": { "value": 0 } }, "fieldName": "Value #Seen (sum) (lastNotNull)" } ], "match": "any", "type": "include" } }, { "id": "organize", "options": { "excludeByName": {}, "indexByName": { "Time (lastNotNull) (firstNotNull)": 0, "Value #Seen (sum) (lastNotNull)": 3, "Value #Trapped (lastNotNull) (lastNotNull)": 4, "country (lastNotNull) (lastNotNull)": 2, "ip": 1 }, "renameByName": { "Time (lastNotNull) (firstNotNull)": "Last Connection", "Value #Seen (sum) (lastNotNull)": "Connections", "Value #Trapped (lastNotNull) (lastNotNull)": "Trapped Time", "Value #Trapped (sum) (lastNotNull)": "Trapped Time", "country (lastNotNull) (lastNotNull)": "Country", "ip": "IP" } } } ], "type": "table" } ], "refresh": "1m", "schemaVersion": 31, "style": "dark", "tags": [ "prometheus" ], "templating": { "list": [ { "allValue": null, "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values(endlessh_client_open_count_total, job)", "description": null, "error": null, "hide": 0, "includeAll": false, "label": "Job", "multi": false, "name": "job", "options": [], "query": { "query": "label_values(endlessh_client_open_count_total, job)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 1, "type": "query" }, { "allValue": null, "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values(endlessh_client_open_count_total, instance)", "description": null, "error": null, "hide": 0, "includeAll": false, "label": "Host", "multi": false, "name": "host", "options": [], "query": { "query": "label_values(endlessh_client_open_count_total, instance)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 1, "type": "query" } ] }, "time": { "from": "now-24h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Endlessh", "uid": "ATIxYkO7k", "version": 292 }