diff --git a/files/grafana/dashboards/home-networking.json b/files/grafana/dashboards/home-networking.json index 40c7109..71d8af0 100644 --- a/files/grafana/dashboards/home-networking.json +++ b/files/grafana/dashboards/home-networking.json @@ -28,6 +28,12 @@ ], "datasource": null, "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "s", "gauge": { "maxValue": 100, @@ -59,7 +65,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -158,6 +163,12 @@ ], "datasource": null, "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "s", "gauge": { "maxValue": 100, @@ -189,7 +200,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -288,6 +298,12 @@ ], "datasource": null, "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "bps", "gauge": { "maxValue": 100, @@ -319,7 +335,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -430,6 +445,12 @@ ], "datasource": null, "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "bps", "gauge": { "maxValue": 100, @@ -461,7 +482,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -572,6 +592,12 @@ ], "datasource": null, "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "celsius", "gauge": { "maxValue": 100, @@ -603,7 +629,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -696,6 +721,12 @@ ], "datasource": null, "decimals": 1, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "fahrenheit", "gauge": { "maxValue": 100, @@ -727,7 +758,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -809,6 +839,335 @@ ], "valueName": "current" }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 1, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "fahrenheit" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 4 + }, + "hiddenSeries": false, + "id": 37, + "interval": null, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxDataPoints": 100, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "7.0.0", + "pointradius": 2, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "snmp", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"temperature\") * 9/5 + 32 FROM \"snmp\" WHERE (\"agent_host\" = '172.16.100.3') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "temperature" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "agent_host", + "operator": "=", + "value": "172.16.100.3" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Switch Temperature (F)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:510", + "format": "fahrenheit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:511", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 1, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "fahrenheit" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 4 + }, + "hiddenSeries": false, + "id": 38, + "interval": null, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxDataPoints": 100, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "7.0.0", + "pointradius": 2, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "snmp", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT max(\"temperature\") FROM \"snmp\" WHERE (\"agent_host\" = '172.16.100.3') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "temperature" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "agent_host", + "operator": "=", + "value": "172.16.100.3" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Switch Temperature (C)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:453", + "format": "celsius", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:454", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, { "alert": { "alertRuleTags": {}, @@ -850,13 +1209,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 4 + "y": 12 }, "hiddenSeries": false, "id": 14, @@ -1150,13 +1515,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 4 + "y": 12 }, "hiddenSeries": false, "id": 29, @@ -1424,13 +1795,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 12 + "y": 20 }, "hiddenSeries": false, "id": 35, @@ -1681,13 +2058,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 12 + "y": 20 }, "hiddenSeries": false, "id": 36, @@ -1946,13 +2329,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 20 + "y": 28 }, "hiddenSeries": false, "id": 16, @@ -2191,13 +2580,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 20 + "y": 28 }, "hiddenSeries": false, "id": 30, @@ -2436,13 +2831,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 28 + "y": 36 }, "hiddenSeries": false, "id": 31, @@ -2681,13 +3082,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 28 + "y": 36 }, "hiddenSeries": false, "id": 32, @@ -2926,13 +3333,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 36 + "y": 44 }, "hiddenSeries": false, "id": 5, @@ -3115,13 +3528,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 36 + "y": 44 }, "hiddenSeries": false, "id": 10, @@ -3304,13 +3723,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 44 + "y": 52 }, "hiddenSeries": false, "id": 9, @@ -3493,13 +3918,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 44 + "y": 52 }, "hiddenSeries": false, "id": 11, @@ -3682,13 +4113,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 52 + "y": 60 }, "hiddenSeries": false, "id": 12, @@ -3871,13 +4308,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 52 + "y": 60 }, "hiddenSeries": false, "id": 33, @@ -4060,13 +4503,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 60 + "y": 68 }, "hiddenSeries": false, "id": 23, @@ -4243,13 +4692,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 60 + "y": 68 }, "hiddenSeries": false, "id": 18, @@ -4434,13 +4889,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 68 + "y": 76 }, "hiddenSeries": false, "id": 26, @@ -4617,13 +5078,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 68 + "y": 76 }, "hiddenSeries": false, "id": 24, @@ -4800,13 +5267,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 76 + "y": 84 }, "hiddenSeries": false, "id": 25, @@ -4983,13 +5456,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 76 + "y": 84 }, "hiddenSeries": false, "id": 27, @@ -5166,13 +5645,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 84 + "y": 92 }, "hiddenSeries": false, "id": 20, @@ -5349,13 +5834,19 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 84 + "y": 92 }, "hiddenSeries": false, "id": 21, @@ -5528,7 +6019,7 @@ } ], "refresh": "5s", - "schemaVersion": 21, + "schemaVersion": 25, "style": "dark", "tags": [], "templating": { @@ -5540,7 +6031,6 @@ }, "timepicker": { "refresh_intervals": [ - "5s", "10s", "30s", "1m", @@ -5555,5 +6045,5 @@ "timezone": "", "title": "Home Networking", "uid": "N0X50kOWk", - "version": 5 + "version": 6 } diff --git a/files/grafana/dashboards/system.json b/files/grafana/dashboards/system.json index 9949a56..48fcd00 100644 --- a/files/grafana/dashboards/system.json +++ b/files/grafana/dashboards/system.json @@ -15,7 +15,7 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "iteration": 1578873134491, + "iteration": 1590362591630, "links": [], "panels": [ { @@ -30,6 +30,12 @@ ], "datasource": null, "decimals": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "dtdurations", "gauge": { "maxValue": 100, @@ -61,7 +67,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -144,33 +149,27 @@ { "cacheTimeout": null, "datasource": null, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 0 - }, - "id": 19, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, - "min": 0, - "nullValueMode": "connected", - "thresholds": [ + "max": 100, + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ { "color": "#299c46", "value": null @@ -183,17 +182,32 @@ "color": "#d44a3a", "value": 80 } - ], - "unit": "percent" + ] }, - "override": {}, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 3, + "y": 0 + }, + "id": 19, + "links": [], + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], "values": false }, - "orientation": "horizontal", "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "6.5.2", + "pluginVersion": "7.0.0", "targets": [ { "groupBy": [ @@ -248,33 +262,27 @@ { "cacheTimeout": null, "datasource": null, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 0 - }, - "id": 20, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, - "min": 0, - "nullValueMode": "connected", - "thresholds": [ + "max": 100, + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ { "color": "#299c46", "value": null @@ -287,17 +295,32 @@ "color": "#d44a3a", "value": 80 } - ], - "unit": "percent" + ] }, - "override": {}, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 6, + "y": 0 + }, + "id": 20, + "links": [], + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], "values": false }, - "orientation": "horizontal", "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "6.5.2", + "pluginVersion": "7.0.0", "targets": [ { "groupBy": [ @@ -362,6 +385,12 @@ ], "datasource": null, "decimals": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "bytes", "gauge": { "maxValue": 100, @@ -393,7 +422,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -478,33 +506,27 @@ { "cacheTimeout": null, "datasource": null, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 21, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, - "min": 0, - "nullValueMode": "connected", - "thresholds": [ + "max": 100, + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ { "color": "#299c46", "value": null @@ -517,17 +539,32 @@ "color": "#d44a3a", "value": 80 } - ], - "unit": "percent" + ] }, - "override": {}, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 12, + "y": 0 + }, + "id": 21, + "links": [], + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], "values": false }, - "orientation": "horizontal", "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "6.5.2", + "pluginVersion": "7.0.0", "targets": [ { "groupBy": [ @@ -592,6 +629,12 @@ ], "datasource": null, "decimals": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "bytes", "gauge": { "maxValue": 100, @@ -623,7 +666,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -715,6 +757,12 @@ "#d44a3a" ], "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "bps", "gauge": { "maxValue": 100, @@ -746,7 +794,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -850,6 +897,12 @@ "#d44a3a" ], "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "bps", "gauge": { "maxValue": 100, @@ -881,7 +934,6 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -981,6 +1033,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1231,6 +1289,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1369,6 +1433,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1572,6 +1642,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1703,6 +1779,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1840,6 +1922,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1977,6 +2065,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2116,6 +2210,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2255,6 +2355,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2263,6 +2369,7 @@ "x": 0, "y": 36 }, + "hiddenSeries": false, "id": 9, "legend": { "avg": false, @@ -2438,6 +2545,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2446,6 +2559,7 @@ "x": 12, "y": 36 }, + "hiddenSeries": false, "id": 22, "legend": { "avg": false, @@ -2609,6 +2723,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2617,6 +2737,7 @@ "x": 0, "y": 44 }, + "hiddenSeries": false, "id": 13, "legend": { "avg": false, @@ -2739,6 +2860,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2747,6 +2874,7 @@ "x": 12, "y": 44 }, + "hiddenSeries": false, "id": 42, "legend": { "avg": false, @@ -2869,6 +2997,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2877,6 +3011,7 @@ "x": 0, "y": 52 }, + "hiddenSeries": false, "id": 11, "legend": { "avg": false, @@ -3043,6 +3178,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3051,6 +3192,7 @@ "x": 12, "y": 52 }, + "hiddenSeries": false, "id": 14, "legend": { "avg": false, @@ -3226,6 +3368,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3234,6 +3382,7 @@ "x": 0, "y": 60 }, + "hiddenSeries": false, "id": 16, "legend": { "avg": false, @@ -3397,6 +3546,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3405,6 +3560,7 @@ "x": 12, "y": 60 }, + "hiddenSeries": false, "id": 34, "legend": { "avg": false, @@ -3533,6 +3689,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3541,6 +3703,7 @@ "x": 0, "y": 68 }, + "hiddenSeries": false, "id": 27, "legend": { "avg": false, @@ -3681,6 +3844,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3689,6 +3858,7 @@ "x": 12, "y": 68 }, + "hiddenSeries": false, "id": 15, "legend": { "avg": false, @@ -3852,6 +4022,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3860,6 +4036,7 @@ "x": 0, "y": 76 }, + "hiddenSeries": false, "id": 29, "legend": { "avg": false, @@ -3975,6 +4152,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3983,6 +4166,7 @@ "x": 12, "y": 76 }, + "hiddenSeries": false, "id": 46, "legend": { "avg": false, @@ -4098,6 +4282,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -4106,6 +4296,7 @@ "x": 0, "y": 84 }, + "hiddenSeries": false, "id": 36, "legend": { "avg": false, @@ -4263,6 +4454,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -4271,6 +4468,7 @@ "x": 12, "y": 84 }, + "hiddenSeries": false, "id": 48, "legend": { "avg": false, @@ -4519,6 +4717,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -4527,6 +4731,7 @@ "x": 0, "y": 92 }, + "hiddenSeries": false, "id": 49, "legend": { "avg": false, @@ -4775,6 +4980,12 @@ "dashLength": 10, "dashes": false, "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -4783,6 +4994,7 @@ "x": 12, "y": 92 }, + "hiddenSeries": false, "id": 50, "legend": { "avg": false, @@ -5024,10 +5236,273 @@ "align": false, "alignLevel": null } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 100 + }, + "hiddenSeries": false, + "id": 53, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "ping.max", + "fillBelowTo": "ping.mean", + "lines": false + }, + { + "alias": "ping.mean", + "fillBelowTo": "ping.min", + "lines": false + }, + { + "alias": "ping.min", + "lines": false + }, + { + "alias": "ping.loss", + "color": "#C4162A", + "fill": 2, + "linewidth": 3, + "steppedLine": true, + "yaxis": 2 + }, + { + "alias": "ping.mean", + "lines": false, + "points": true + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "ping", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "average_response_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "mean" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "maximum_response_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + }, + { + "params": [ + "max" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "minimum_response_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "min" + }, + { + "params": [ + "min" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=", + "value": "10.8.0.1" + }, + { + "condition": "AND", + "key": "host", + "operator": "=~", + "value": "/^$host$/" + } + ] + }, + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "ping", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"percent_packet_loss\") AS \"loss\" FROM \"ping\" WHERE (\"url\" = '24.13.205.122') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": false, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "percent_packet_loss" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "loss" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=", + "value": "10.8.0.1" + }, + { + "condition": "AND", + "key": "host", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "VPN Ping (IPv4)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "refresh": "5s", - "schemaVersion": 21, + "schemaVersion": 25, "style": "dark", "tags": [], "templating": { @@ -5035,7 +5510,7 @@ { "allValue": null, "current": { - "selected": false, + "selected": true, "text": "jump0.kill0.net", "value": "jump0.kill0.net" }, @@ -5092,5 +5567,5 @@ "timezone": "", "title": "System", "uid": "UbZ4ARdWz", - "version": 4 + "version": 5 } diff --git a/roles/grafana/defaults/main.yaml b/roles/grafana/defaults/main.yaml index 0d7d9e9..f28d0d6 100644 --- a/roles/grafana/defaults/main.yaml +++ b/roles/grafana/defaults/main.yaml @@ -9,6 +9,7 @@ grafana_service_enabled: yes grafana_etc_path: /etc/grafana grafana_config_path: "{{ grafana_etc_path }}/grafana.ini" +grafana_provisioning_path: /etc/grafana/provisioning grafana_domain: "stats.{{ ansible_domain }}" grafana_port: 3002 @@ -21,3 +22,38 @@ grafana_config: root_url: "https://{{ grafana_domain }}" http_addr: localhost http_port: "{{ grafana_port }}" + +grafana_ssl_enabled: yes +grafana_ssl_certificate: "/etc/letsencrypt/live/{{ grafana_domain }}/fullchain.pem" +grafana_ssl_certificate_key: "/etc/letsencrypt/live/{{ grafana_domain }}/privkey.pem" +#grafana_ssl_dhparam: "/etc/letsencrypt/ssl-dhparams.pem" + +grafana_datasources: + apiVersion: 1 + datasources: + - name: influxdb + type: influxdb + access: proxy + url: http://localhost:8086 + database: telegraf + isDefault: yes + version: 1 + +grafana_dashboards: + apiVersion: 1 + providers: + - name: ansible + folder: Built-in + type: file + options: + path: /var/lib/grafana/dashboards + +grafana_dashboard_files: + - connectivity.json + - home-networking.json + - iptables.json + - nginx.json + - processes.json + - switching.json + - system.json + - ups.json diff --git a/roles/grafana/tasks/main.yaml b/roles/grafana/tasks/main.yaml index 39f7603..6aacd42 100644 --- a/roles/grafana/tasks/main.yaml +++ b/roles/grafana/tasks/main.yaml @@ -44,6 +44,39 @@ mode: 0640 notify: restart grafana +- name: provision datasources + copy: + dest: "{{ grafana_provisioning_path }}/datasources/datasource.yaml" + content: "{{ grafana_datasources | to_nice_yaml }}" + owner: root + group: "{{ grafana_group }}" + mode: 0640 + +- name: create dashboard directory + file: + path: /var/lib/grafana/dashboards + state: directory + owner: "{{ grafana_user }}" + group: "{{ grafana_group }}" + mode: 0755 + +- name: provision dashboards + copy: + dest: "{{ grafana_provisioning_path }}/dashboards/dashboards.yaml" + content: "{{ grafana_dashboards | to_nice_yaml }}" + owner: root + group: "{{ grafana_group }}" + mode: 0640 + +- name: upload user dashboards + copy: + src: "files/grafana/dashboards/{{ item }}" + dest: "/var/lib/grafana/dashboards/{{ item | basename }}" + owner: "{{ grafana_user }}" + group: "{{ grafana_group }}" + mode: 0644 + loop: "{{ grafana_dashboard_files | default([]) }}" + - name: manage service service: name: "{{ grafana_service_name }}"