diff --git a/dashboard/endlessh.json b/dashboard/endlessh.json new file mode 100755 index 0000000..fbcb34e --- /dev/null +++ b/dashboard/endlessh.json @@ -0,0 +1,1003 @@ +{ + "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": 23, + "iteration": 1635127491503, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": null, + "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": 14, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.2", + "targets": [ + { + "exemplar": true, + "expr": "increase(endlessh_client_open_count_total{instance=\"$host\",job=\"$job\"}[$__range])", + "hide": false, + "interval": "", + "legendFormat": "Total number connections that endlessh trapped", + "refId": "Total connections" + } + ], + "title": "Connections", + "type": "stat" + }, + { + "datasource": null, + "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": 16, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.2", + "targets": [ + { + "exemplar": true, + "expr": "increase(endlessh_trapped_time_seconds_total{instance=\"$host\",job=\"$job\"}[$__range])", + "hide": false, + "interval": "", + "legendFormat": "Seconds spent on endlessh", + "refId": "Trapped Time" + } + ], + "title": "Trapped Time", + "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": "area", + "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": null, + "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": 24, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.2", + "targets": [ + { + "exemplar": true, + "expr": "count(group by (ip) ((max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__range]) - (max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__range] offset $__range) or endlessh_client_open_count{instance=\"$host\",job=\"$job\"} * 0))!=0))", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Unique IPs connected", + "refId": "ip" + } + ], + "title": "Unique IPs", + "transformations": [], + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 0 + }, + "id": 26, + "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", + "targets": [ + { + "exemplar": true, + "expr": "(max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__rate_interval]) - (max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__rate_interval] offset $__rate_interval) or endlessh_client_open_count{instance=\"$host\",job=\"$job\"} * 0)) != 0", + "format": "table", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "client" + } + ], + "title": "Latest Connection", + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": false, + "field": "Time" + } + ] + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "instance": true, + "job": true + }, + "indexByName": { + "Time (lastNotNull)": 0, + "instance": 3, + "ip (lastNotNull)": 1, + "job": 2 + }, + "renameByName": { + "Time (lastNotNull)": "Time", + "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": "area", + "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_closed_count_total{instance=\"$host\",job=\"$job\"} * 0)", + "instant": false, + "interval": "", + "legendFormat": "Current Open Connections", + "refId": "current_open" + } + ], + "title": "Current Connections", + "type": "stat" + }, + { + "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": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 3 + }, + "id": 30, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "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_closed_count_total{instance=\"$host\",job=\"$job\"} * 0)", + "interval": "", + "legendFormat": "count", + "refId": "Count" + } + ], + "title": "Concurrent Connections", + "type": "timeseries" + }, + { + "datasource": null, + "description": "", + "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": 22, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "table", + "placement": "right", + "values": [ + "percent", + "value" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "sum by (country) ((max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__range]) - (max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__range] offset $__range) or endlessh_client_open_count{instance=\"$host\",job=\"$job\"} * 0)) != 0)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{country}}", + "panelId": 28, + "refId": "Country" + } + ], + "title": "Connections by country", + "transformations": [], + "type": "piechart" + }, + { + "cacheTimeout": null, + "circleMaxSize": "11", + "circleMinSize": "2", + "colors": [ + "#96D98D", + "#C8F2C2", + "#FFF899", + "#FFEE52", + "#F2CC0C", + "#E0B400", + "#FFB357", + "#FF780A", + "#FA6400", + "#FF7383", + "#E02F44" + ], + "datasource": null, + "decimals": 0, + "esGeoPoint": "geohash (lastNotNull)", + "esLocationName": "location (lastNotNull) (lastNotNull)", + "esMetric": "Value #Count (lastNotNull) (sum)", + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 7 + }, + "hideEmpty": false, + "hideZero": false, + "id": 2, + "initialZoom": "0.5", + "interval": null, + "links": [], + "locationData": "geohash", + "mapCenter": "(0°, 0°)", + "mapCenterLatitude": 0, + "mapCenterLongitude": 0, + "maxDataPoints": null, + "mouseWheelZoom": false, + "showLegend": false, + "stickyLabels": false, + "tableQueryOptions": { + "geohashField": "geohash", + "labelField": "", + "latitudeField": "latitude", + "longitudeField": "longitude", + "metricField": "metric", + "queryType": "geohash" + }, + "targets": [ + { + "exemplar": true, + "expr": "max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__range]) - (max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__range] offset $__range) or endlessh_client_open_count{instance=\"$host\",job=\"$job\"} * 0)", + "format": "table", + "hide": false, + "interval": "", + "legendFormat": "{{location}}", + "refId": "Count" + } + ], + "thresholds": "2,3,4,5,6,7,8,9,10,20", + "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 #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 #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": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "greater", + "options": { + "value": 0 + } + }, + "fieldName": "Value #Count (lastNotNull) (sum)" + } + ], + "match": "any", + "type": "include" + } + }, + { + "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 #geo (lastNotNull) (sum)": "Value", + "Value #time (lastNotNull) (sum)": "Trapped Time", + "Value (lastNotNull) (sum)": "Value", + "geohash (lastNotNull)": "Geohash", + "location (lastNotNull) (lastNotNull)": "Location" + } + } + } + ], + "type": "grafana-worldmap-panel", + "unitPlural": "", + "unitSingle": "", + "unitSingular": "", + "valueName": "total" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true, + "minWidth": 50 + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 28, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Connections" + } + ] + }, + "pluginVersion": "8.2.2", + "targets": [ + { + "exemplar": true, + "expr": "max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__range]) - (max_over_time(endlessh_client_open_count{instance=\"$host\",job=\"$job\"}[$__range] offset $__range) or endlessh_client_open_count{instance=\"$host\",job=\"$job\"} * 0)", + "format": "table", + "interval": "", + "legendFormat": "{{ip}}", + "refId": "Count" + }, + { + "exemplar": true, + "expr": "max_over_time(endlessh_client_trapped_time_seconds{instance=~\"$host\",job=~\"$job\"}[$__range]) - (max_over_time(endlessh_client_trapped_time_seconds{instance=~\"$host\",job=~\"$job\"}[$__range] offset $__range) or endlessh_client_trapped_time_seconds{instance=~\"$host\",job=~\"$job\"} * 0)", + "format": "table", + "hide": false, + "interval": "", + "legendFormat": "{{ip}}", + "refId": "Time" + } + ], + "title": "Clients", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "groupBy", + "options": { + "fields": { + "Time": { + "aggregations": [ + "firstNotNull" + ], + "operation": "aggregate" + }, + "Value #Count": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "Value #Time": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "country": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "ip": { + "aggregations": [], + "operation": "groupby" + } + } + } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "greater", + "options": { + "value": 0 + } + }, + "fieldName": "Value #Count (lastNotNull)" + } + ], + "match": "any", + "type": "include" + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "Time (firstNotNull)": 0, + "Value #Count (lastNotNull)": 3, + "Value #Time (lastNotNull)": 4, + "country (lastNotNull)": 2, + "ip": 1 + }, + "renameByName": { + "Time (first)": "Time", + "Time (firstNotNull)": "First seen", + "Time (lastNotNull)": "Time", + "Value #Count (lastNotNull)": "Connections", + "Value #Time (lastNotNull)": "Trapped Time", + "country (lastNotNull)": "Country", + "ip": "IP" + } + } + } + ], + "type": "table" + } + ], + "refresh": "1m", + "schemaVersion": 31, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": false, + "text": "endlessh", + "value": "endlessh" + }, + "datasource": null, + "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": { + "selected": false, + "text": "endlessh:2112", + "value": "endlessh:2112" + }, + "datasource": null, + "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": 216 +} \ No newline at end of file