diff --git a/morph/grid/local/grid.nix b/morph/grid/local/grid.nix index da8a83812ceba910280bfc61210487b2f217113f..f1e1980532177385c926eb6c3903b67724ff7175 100644 --- a/morph/grid/local/grid.nix +++ b/morph/grid/local/grid.nix @@ -131,7 +131,7 @@ let }; # TBD: derive these automatically: - paymentExporterTargets = [ "payments" ]; + paymentExporterTargets = [ "payments.monitoringvpn" ]; blackboxExporterHttpsTargets = [ # "https://private.storage/" # "https://payments.private.storage/" diff --git a/morph/grid/local/public-keys/users.nix.example b/morph/grid/local/public-keys/users.nix.example index 10a60be1f7b8760e81f7fdb6ecd1d177913e05af..4e4794de770437fb14e666d7b538a3d481c38eb7 100644 --- a/morph/grid/local/public-keys/users.nix.example +++ b/morph/grid/local/public-keys/users.nix.example @@ -1,6 +1,11 @@ +let # Add your public key. Example: -# let key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHx7wJQNqKn8jOC4AxySRL2UxidNp7uIK9ad3pMb1ifF flo@fs-la"; +# key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHx7wJQNqKn8jOC4AxySRL2UxidNp7uIK9ad3pMb1ifF flo@fs-la"; # You can use the following to get key from the local machine. -# let key = builtins.readFile ~/.ssh/id_ed25519.pub; -let key = undefined; -in { "root" = key; "vagrant" = key; } +# key = builtins.readFile ~/.ssh/id_ed25519.pub; + key = undefined; + keys = [key] +in { + "root" = keys; + "vagrant" = keys; +} diff --git a/morph/grid/production/grid.nix b/morph/grid/production/grid.nix index ab45d4ba7f67e71383d28120bd925ac3a05f04ef..3570dfef41013cdeba26cde308dcbd660da6c1db 100644 --- a/morph/grid/production/grid.nix +++ b/morph/grid/production/grid.nix @@ -114,7 +114,7 @@ let storage005 = { vpnIP = "172.23.23.25"; stateVersion = "19.03"; }; }; - paymentExporterTargets = [ "payments" ]; + paymentExporterTargets = [ "payments.monitoringvpn" ]; blackboxExporterHttpsTargets = [ "https://private.storage/" "https://www.private.storage/" diff --git a/morph/grid/production/public-keys/users.nix b/morph/grid/production/public-keys/users.nix index 8b586703740765b7a3d462e74ca3ef3cced68da7..9dcc90ea0efb3c927915d441e77c9af2459303e4 100644 --- a/morph/grid/production/public-keys/users.nix +++ b/morph/grid/production/public-keys/users.nix @@ -1,2 +1,6 @@ -let key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGN4VQm3BIQKEFTw6aPrEwNuShf640N+Py2LOKznFCRT exarkun@bottom"; -in { "root" = key; "jcalderone" = key; } +let + jcalderone = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGN4VQm3BIQKEFTw6aPrEwNuShf640N+Py2LOKznFCRT exarkun@bottom"]; +in { + "root" = jcalderone; + "jcalderone" = jcalderone; +} diff --git a/morph/grid/testing/grid.nix b/morph/grid/testing/grid.nix index 19839ae83fa16c31adf0fcd9e3727a8304f8dd6c..bc6d1abed0469c4a62276ee855410bfc15439a01 100644 --- a/morph/grid/testing/grid.nix +++ b/morph/grid/testing/grid.nix @@ -79,7 +79,7 @@ let }; # TBD: derive these automatically: - paymentExporterTargets = [ "payments" ]; + paymentExporterTargets = [ "payments.monitoringvpn" ]; blackboxExporterHttpsTargets = [ "https://privatestorage-staging.com/" "https://www.privatestorage-staging.com/" diff --git a/morph/grid/testing/public-keys/users.nix b/morph/grid/testing/public-keys/users.nix index d6a965011065cfe39713adfb797c190eb8dd1ecd..14647efb7d04d39f8201c03b542191f7e86f35c2 100644 --- a/morph/grid/testing/public-keys/users.nix +++ b/morph/grid/testing/public-keys/users.nix @@ -1,6 +1,6 @@ let - jcalderone = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN4GenAY/YLGuf1WoMXyyVa3S9i4JLQ0AG+pt7nvcLlQ exarkun@baryon"; - flo = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHx7wJQNqKn8jOC4AxySRL2UxidNp7uIK9ad3pMb1ifF flo@fs-la"; + jcalderone = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN4GenAY/YLGuf1WoMXyyVa3S9i4JLQ0AG+pt7nvcLlQ exarkun@baryon"]; + flo = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHx7wJQNqKn8jOC4AxySRL2UxidNp7uIK9ad3pMb1ifF flo@fs-la"]; in { "root" = jcalderone; diff --git a/nixos/modules/monitoring/server/grafana-dashboards/payments.json b/nixos/modules/monitoring/server/grafana-dashboards/payments.json index ffad8e9c42606da20be04207cd807256c5476f3c..6541c9796059523aff679dc34f451db2feeed85d 100644 --- a/nixos/modules/monitoring/server/grafana-dashboards/payments.json +++ b/nixos/modules/monitoring/server/grafana-dashboards/payments.json @@ -21,7 +21,7 @@ "description": "PaymentServer and related metrics", "editable": true, "fiscalYearStartMonth": 0, - "graphTooltip": 0, + "graphTooltip": 2, "links": [], "liveNow": false, "panels": [ @@ -744,6 +744,7 @@ "type": "timeseries" }, { + "description": "HTTP 4xx and 5xx errors", "fieldConfig": { "defaults": { "color": { @@ -754,7 +755,7 @@ "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", - "fillOpacity": 10, + "fillOpacity": 20, "gradientMode": "none", "hideFrom": { "legend": false, @@ -762,16 +763,19 @@ "viz": false }, "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", - "spanNulls": true, + "spanNulls": false, "stacking": { "group": "A", - "mode": "normal" + "mode": "none" }, "thresholdsStyle": { "mode": "off" @@ -812,7 +816,7 @@ "placement": "bottom" }, "tooltip": { - "mode": "single" + "mode": "multi" } }, "pluginVersion": "8.3.4", @@ -1031,7 +1035,7 @@ { "datasource": { "type": "loki", - "uid": "P8E80F9AEF21F6940" + "uid": "000000002" }, "description": "Exercise in counting maybe interesting lines. This can be alerted on.", "fieldConfig": { @@ -1044,7 +1048,7 @@ "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", - "fillOpacity": 0, + "fillOpacity": 20, "gradientMode": "none", "hideFrom": { "legend": false, @@ -1052,6 +1056,9 @@ "viz": false }, "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -1107,10 +1114,9 @@ { "datasource": { "type": "loki", - "uid": "P8E80F9AEF21F6940" + "uid": "000000002" }, - "expr": "count_over_time({host=\"payments\",unit=\"zkapissuer.service\"} !~ \"200|GET|Accept\" [5m])", - "maxLines": 0, + "expr": "count_over_time({host=\"payments\",unit=\"zkapissuer.service\"} !~ \"200|/metrics|Accept\" [5m])", "refId": "A" } ], @@ -1121,7 +1127,7 @@ { "datasource": { "type": "loki", - "uid": "P8E80F9AEF21F6940" + "uid": "000000002" }, "description": "Exercise in filtering the payment server logs.", "gridPos": { @@ -1137,7 +1143,7 @@ "prettifyLogMessage": false, "showCommonLabels": false, "showLabels": false, - "showTime": false, + "showTime": true, "sortOrder": "Descending", "wrapLogMessage": false }, @@ -1145,9 +1151,9 @@ { "datasource": { "type": "loki", - "uid": "P8E80F9AEF21F6940" + "uid": "000000002" }, - "expr": "{host=\"payments\",unit=\"zkapissuer.service\"} !~ \"200|GET|Accept\"", + "expr": "{host=\"payments\",unit=\"zkapissuer.service\"} !~ \"200|/metrics|Accept\"", "refId": "A" } ], @@ -1163,7 +1169,7 @@ "list": [] }, "time": { - "from": "now-3h", + "from": "now-7d", "to": "now" }, "timepicker": { diff --git a/nixos/modules/monitoring/server/grafana-dashboards/resources-overview.json b/nixos/modules/monitoring/server/grafana-dashboards/resources-overview.json index 745f7b7ff03d9a0a4e93fc50946f8066fb08e7b9..efe0246d59bda158a1d1f21a726dfadf6280ccca 100644 --- a/nixos/modules/monitoring/server/grafana-dashboards/resources-overview.json +++ b/nixos/modules/monitoring/server/grafana-dashboards/resources-overview.json @@ -8,19 +8,25 @@ "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] }, "description": "USE: Usage, Saturation and Error rate for our resources", "editable": true, - "gnetId": null, - "graphTooltip": 0, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, "links": [], + "liveNow": false, "panels": [ { "collapsed": false, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -33,52 +39,79 @@ "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "Some of our software runs in a single thread, so this shows max CPU per core (instead of averaged over all cores)", "fieldConfig": { "defaults": { - "links": [] + "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": "never", + "spanNulls": true, + "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": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 6, "x": 0, "y": 1 }, - "hiddenSeries": false, "id": 28, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "expr": "1 - (max by (instance) (irate(node_cpu_seconds_total{mode=\"idle\"}[5m])))", @@ -88,46 +121,8 @@ "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Max CPU % per core per node", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": "1", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "alert": { @@ -165,15 +160,57 @@ "noDataState": "no_data", "notifications": [] }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, "displayName": "${__field.labels.instance}", - "links": [] + "links": [], + "mappings": [], + "max": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "short" }, "overrides": [ { @@ -189,40 +226,24 @@ } ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 6, "x": 6, "y": 1 }, - "hiddenSeries": false, "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "expr": "node_load15", @@ -232,55 +253,8 @@ "refId": "A" } ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 1, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "15 min load average", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": "1", - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "alert": { @@ -318,53 +292,79 @@ "noDataState": "no_data", "notifications": [] }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "How much RAM is in use? Relative to available system memory.", "fieldConfig": { "defaults": { - "links": [] + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "links": [], + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 0.8 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 6, "x": 12, "y": 1 }, - "hiddenSeries": false, "id": 2, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "expr": "1 - (node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes) / node_memory_MemTotal_bytes\r\n", @@ -374,56 +374,8 @@ "refId": "A" } ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.8, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "RAM used %", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "percentunit", - "label": null, - "logBase": 1, - "max": "1", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "alert": { @@ -461,54 +413,78 @@ "noDataState": "no_data", "notifications": [] }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "How much Swap is in use? Relative to available swap.", "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 0.1 + } + ] + }, + "unit": "percentunit" + }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 6, "x": 18, "y": 1 }, - "hiddenSeries": false, "id": 30, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "exemplar": true, @@ -519,61 +495,11 @@ "refId": "A" } ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.1, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Swap used %", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:98", - "format": "percentunit", - "label": null, - "logBase": 1, - "max": "1", - "min": "0", - "show": true - }, - { - "$$hashKey": "object:99", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "collapsed": false, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -586,52 +512,77 @@ "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "Shows most saturated network link for every node. Bit/s.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 8, "x": 0, "y": 9 }, - "hiddenSeries": false, "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "expr": "max by (instance) (rate(node_network_transmit_bytes_total{device!~\"lo|monitoringvpn\"}[5m]) * 8)", @@ -648,98 +599,82 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Throughput", - "tooltip": { - "shared": false, - "sort": 2, - "value_type": "individual" - }, "transformations": [], - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:226", - "decimals": null, - "format": "bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:227", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "Packet and error count. Positive values mean transmit, negative receive.", "fieldConfig": { "defaults": { - "links": [] + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "pps" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 8, "x": 8, "y": 9 }, - "hiddenSeries": false, "id": 26, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "expr": "- rate(node_network_receive_packets_total{device!~\"lo|monitoringvpn\"}[5m])", @@ -770,46 +705,8 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Network pkt/s", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "pps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "alert": { @@ -916,52 +813,77 @@ "noDataState": "no_data", "notifications": [] }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "Network errors, drops etc. Should all be 0.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 10 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 9 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 9 }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "id": 10, "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "expr": "node_network_transmit_errs_total\n", @@ -988,59 +910,11 @@ "refId": "D" } ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 10, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Network errors", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "collapsed": false, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -1092,7 +966,6 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, "description": "Watch filesystems filling up. Shows only mounts over 10 % of available bytes used.", "fieldConfig": { "defaults": { @@ -1114,6 +987,8 @@ "legend": { "avg": false, "current": false, + "hideEmpty": false, + "hideZero": false, "max": false, "min": false, "show": false, @@ -1127,7 +1002,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.10", + "pluginVersion": "8.3.5", "pointradius": 2, "points": false, "renderer": "flot", @@ -1157,21 +1032,17 @@ "visible": true } ], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Storage usage %", "tooltip": { "shared": false, - "sort": 0, + "sort": 2, "value_type": "individual" }, "transformations": [], "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -1179,7 +1050,6 @@ { "$$hashKey": "object:131", "format": "percentunit", - "label": null, "logBase": 1, "max": "1", "min": "0", @@ -1188,65 +1058,86 @@ { "$$hashKey": "object:132", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "Input Output Operations per second. Positive values mean read, negative write.", "fieldConfig": { "defaults": { - "links": [] + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 6, "x": 6, "y": 17 }, - "hiddenSeries": false, "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "expr": "rate(node_disk_reads_completed_total[5m]) > 0", @@ -1263,94 +1154,81 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "IOPS", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "Max average storage latency per node. Positive values mean read, negative write.", "fieldConfig": { "defaults": { - "links": [] + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 6, "x": 12, "y": 17 }, - "hiddenSeries": false, "id": 16, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "expr": "max by (instance, device) (rate(node_disk_read_time_seconds_total[5m]) / rate(node_disk_reads_completed_total[5m]))", @@ -1367,46 +1245,8 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Storage latency", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "alert": { @@ -1444,51 +1284,76 @@ "noDataState": "ok", "notifications": [] }, - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": null, "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 0 + } + ] + }, + "unit": "short" + }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 6, "x": 18, "y": 17 }, - "hiddenSeries": false, "id": 32, - "legend": { - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": false + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, - "percentage": false, - "pluginVersion": "7.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "exemplar": true, @@ -1498,73 +1363,25 @@ "refId": "A" } ], - "thresholds": [ - { - "colorMode": "critical", - "fill": false, - "line": false, - "op": "gt", - "value": 0, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Degraded RAID arrays", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:151", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:152", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], - "refresh": "30s", - "schemaVersion": 27, + "refresh": "5s", + "schemaVersion": 34, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { - "from": "now-3h", + "from": "now-24h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Resources overview", "uid": "ResourcesOverview", - "version": 1 + "version": 1, + "weekStart": "" } diff --git a/nixos/modules/monitoring/server/grafana-dashboards/services-overview.json b/nixos/modules/monitoring/server/grafana-dashboards/services-overview.json index 09bfa3acde10c14fb41d3082779bc14d064b6554..b52b35dc297efa30eac1d472f81ef47ebcd45b30 100644 --- a/nixos/modules/monitoring/server/grafana-dashboards/services-overview.json +++ b/nixos/modules/monitoring/server/grafana-dashboards/services-overview.json @@ -8,19 +8,25 @@ "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] }, "description": "How are our user-facing services doing?", "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "links": [], + "liveNow": false, "panels": [ { "collapsed": false, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -68,50 +74,76 @@ "noDataState": "no_data", "notifications": [] }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "", "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 3.142 + } + ] + }, + "unit": "s" + }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 8, "x": 0, "y": 1 }, - "hiddenSeries": false, "id": 36, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "exemplar": true, @@ -121,57 +153,8 @@ "refId": "A" } ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 3.142, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Response times", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:425", - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:426", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "alert": { @@ -209,50 +192,76 @@ "noDataState": "ok", "notifications": [] }, - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "Shows all HTTP endpoints where probe_success == 0. This could have different reasons, likely ones being the service is down or the TLS certificate is not trusted.", "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 0 + } + ] + }, + "unit": "short" + }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 8, "x": 8, "y": 1 }, - "hiddenSeries": false, "id": 38, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "exemplar": true, @@ -262,57 +271,8 @@ "refId": "A" } ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Probe fails", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:903", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:904", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "alert": { @@ -351,50 +311,77 @@ "noDataState": "no_data", "notifications": [] }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, "description": "", "fieldConfig": { - "defaults": {}, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "transparent", + "value": 2419200 + } + ] + }, + "unit": "s" + }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 8, "x": 16, "y": 1 }, - "hiddenSeries": false, "id": 34, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, - "percentage": false, - "pluginVersion": "7.5.11", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "8.3.5", "targets": [ { "exemplar": true, @@ -405,73 +392,25 @@ "refId": "A" } ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 2419200, - "visible": true - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "TLS certificate expiry", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:179", - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:180", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "30s", - "schemaVersion": 27, + "schemaVersion": 34, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { - "from": "now-15m", + "from": "now-1h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Services overview", "uid": "ServicesOverview", - "version": 1 + "version": 1, + "weekStart": "" } diff --git a/nixos/modules/ssh.nix b/nixos/modules/ssh.nix index eb55fbf2ee4d3e6c04dd08039a8a9f9012f069b8..8d5d5766ae3b30c4801b6ce200fa58c1460f6ca7 100644 --- a/nixos/modules/ssh.nix +++ b/nixos/modules/ssh.nix @@ -6,7 +6,7 @@ }: { options = { services.private-storage.sshUsers = lib.mkOption { - type = lib.types.attrsOf lib.types.str; + type = lib.types.attrsOf (lib.types.listOf lib.types.str); example = { root = "ssh-ed25519 AAA..."; }; description = '' Users to configure on the issuer server and the storage servers and @@ -44,9 +44,9 @@ }; users.users = - let makeUserConfig = username: sshPublicKey: { + let makeUserConfig = username: sshPublicKeys: { isNormalUser = username != "root"; - openssh.authorizedKeys.keys = [ sshPublicKey ]; + openssh.authorizedKeys.keys = sshPublicKeys; }; in builtins.mapAttrs makeUserConfig cfg.sshUsers; }; diff --git a/nixos/modules/tahoe.nix b/nixos/modules/tahoe.nix index 44c381e6b6dfa6039d1dd6a49d44f1afaf51ab10..e4a83006e129e80a59ca9f8262acf74760b4fc98 100644 --- a/nixos/modules/tahoe.nix +++ b/nixos/modules/tahoe.nix @@ -293,7 +293,7 @@ in isSystemUser = true; group = "tahoe.${node}"; }); - users.groups = flip mapAttrs' cfg.introducers (node: _: + users.groups = flip mapAttrs' cfg.nodes (node: _: nameValuePair "tahoe.${node}" { }); }) diff --git a/nixos/tests/private-storage.nix b/nixos/tests/private-storage.nix index eaff1ed5320607e6aabc94226804aea4b7186b0a..b17b8f32ed494c0823f349166f9a28f1e3dcb876 100644 --- a/nixos/tests/private-storage.nix +++ b/nixos/tests/private-storage.nix @@ -2,12 +2,12 @@ let ourpkgs = pkgs.callPackage ../pkgs { }; - sshPrivateKey = ./probeuser_ed25519; - sshPublicKey = ./probeuser_ed25519.pub; + sshPrivateKeyFile = ./probeuser_ed25519; + sshPublicKeyFile = ./probeuser_ed25519.pub; sshUsers = { - root = (builtins.readFile sshPublicKey); - probeuser = (builtins.readFile sshPublicKey); + root = [(builtins.readFile sshPublicKeyFile)]; + probeuser = [(builtins.readFile sshPublicKeyFile)]; }; # This is a test double of the Stripe API server. It is extremely simple. @@ -157,7 +157,7 @@ in { testScript = ourpkgs.lib.testing.makeTestScript { testpath = ./test_privatestorage.py; kwargs = { - inherit sshPrivateKey pemFile introducerPort introducerFURL issuerURL ristrettoPublicKey voucher; + inherit sshPrivateKeyFile pemFile introducerPort introducerFURL issuerURL ristrettoPublicKey voucher; # Supply some helper programs to help the tests stay a bit higher level. run_introducer = ./run-introducer.py; diff --git a/nixos/tests/test_privatestorage.py b/nixos/tests/test_privatestorage.py index dc060d51f1815f549485d3415b3b3af97d5c79af..e1f34fa4f1b0f603168fe825871d8cb81f52d8ce 100644 --- a/nixos/tests/test_privatestorage.py +++ b/nixos/tests/test_privatestorage.py @@ -13,20 +13,20 @@ def runOnNode(node, argv): introducer.log(output) raise -def ssh(username, sshPrivateKey, hostname): +def ssh(username, sshPrivateKeyFile, hostname): """ Generate a command which can be used with runOnNode to ssh to the given host. """ return [ - "cp", sshPrivateKey, "/tmp/ssh_key", ";", + "cp", sshPrivateKeyFile, "/tmp/ssh_key", ";", "chmod", "0400", "/tmp/ssh_key", ";", "ssh", "-oStrictHostKeyChecking=no", "-i", "/tmp/ssh_key", "{username}@{hostname}".format(username=username, hostname=hostname), ":", ] def test( - sshPrivateKey, + sshPrivateKeyFile, pemFile, run_introducer, run_client, @@ -60,11 +60,11 @@ def test( # doesn't prove it is so but if it fails it's a pretty good indication # it isn't so. storage.wait_for_open_port(22) - runOnNode(issuer, ssh("probeuser", sshPrivateKey, "storage")) - runOnNode(issuer, ssh("root", sshPrivateKey, "storage")) + runOnNode(issuer, ssh("probeuser", sshPrivateKeyFile, "storage")) + runOnNode(issuer, ssh("root", sshPrivateKeyFile, "storage")) issuer.wait_for_open_port(22) - runOnNode(storage, ssh("probeuser", sshPrivateKey, "issuer")) - runOnNode(storage, ssh("root", sshPrivateKey, "issuer")) + runOnNode(storage, ssh("probeuser", sshPrivateKeyFile, "issuer")) + runOnNode(storage, ssh("root", sshPrivateKeyFile, "issuer")) # Set up a Tahoe-LAFS introducer. introducer.copy_from_host(pemFile, '/tmp/node.pem') diff --git a/nixpkgs.json b/nixpkgs.json index 62afaf9ea5f9896250a677bb383e16b8d0bc081a..1ef93ddcc57942d20ca7fdb599c7261ad09c02c3 100644 --- a/nixpkgs.json +++ b/nixpkgs.json @@ -1,5 +1,5 @@ { "name": "source", - "url": "https://releases.nixos.org/nixos/21.11/nixos-21.11.335883.7adc9c14ec7/nixexprs.tar.xz", - "sha256": "0r0sgphydyv0xggzyfas5v7dznf42sdgib8s8zmf7dbi09yb4y1l" + "url": "https://releases.nixos.org/nixos/21.11/nixos-21.11.336045.4afca382d80/nixexprs.tar.xz", + "sha256": "1af93alrn7iwv6kjm9r941wafjgpx142psjpix45qn2p50lbpxyx" } \ No newline at end of file