diff --git a/salt/grafana/dashboards/eval/eval.json b/salt/grafana/dashboards/eval/eval.json index c9f3bced4..ee94504d1 100644 --- a/salt/grafana/dashboards/eval/eval.json +++ b/salt/grafana/dashboards/eval/eval.json @@ -24,18 +24,36 @@ "fieldConfig": { "defaults": { "custom": {}, - "decimals": 2, - "mappings": [], + "unit": "percent", + "min": 0, + "max": 100, "thresholds": { "mode": "absolute", "steps": [ { - "color": "rgb(255, 255, 255)", + "color": "rgba(50, 172, 45, 0.97)", "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 60 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 80 } ] }, - "unit": "s" + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected" }, "overrides": [] }, @@ -45,23 +63,15 @@ "x": 0, "y": 0 }, - "id": 39, + "id": 2, + "links": [], "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - } + "alertThreshold": true }, - "pluginVersion": "7.0.5", + "pluginVersion": "7.3.4", "targets": [ { + "dsType": "influxdb", "groupBy": [ { "params": [ @@ -76,7 +86,7 @@ "type": "fill" } ], - "measurement": "system", + "measurement": "cpu", "orderByTime": "ASC", "policy": "default", "refId": "A", @@ -85,13 +95,19 @@ [ { "params": [ - "uptime" + "usage_idle" ], "type": "field" }, { "params": [], - "type": "last" + "type": "mean" + }, + { + "params": [ + "* -1 + 100" + ], + "type": "math" } ] ], @@ -100,14 +116,87 @@ "key": "host", "operator": "=", "value": "{{ SERVERNAME }}" + }, + { + "condition": "AND", + "key": "cpu", + "operator": "=", + "value": "cpu-total" } - ] + ], + "alias": "Usage" } ], + "title": "{{ SERVERNAME }} - CPU", + "type": "graph", + "cacheTimeout": null, + "renderer": "flot", + "yaxes": [ + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "percent", + "$$hashKey": "object:395" + }, + { + "label": null, + "show": false, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:396" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "fillGradient": 0, + "linewidth": 1, + "dashes": false, + "hiddenSeries": false, + "dashLength": 10, + "spaceLength": 10, + "points": false, + "pointradius": 2, + "bars": false, + "stack": false, + "percentage": false, + "legend": { + "show": false, + "values": false, + "min": false, + "max": false, + "current": false, + "total": false, + "avg": false + }, + "nullPointMode": "connected", + "steppedLine": false, + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, "timeFrom": null, "timeShift": null, - "title": "{{ SERVERNAME }} - System Uptime", - "type": "stat" + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [] }, { "cacheTimeout": null, @@ -175,7 +264,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -416,7 +505,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -556,7 +645,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -696,7 +785,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -778,72 +867,58 @@ } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", "fieldConfig": { "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ ROOTFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ ROOTFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ ROOTFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" + "custom": {} }, "overrides": [] }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 5 }, - "id": 12, - "links": [], - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 73, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "7.0.5", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -863,7 +938,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -888,76 +963,102 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", "fieldConfig": { "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ NSMFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ NSMFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ NSMFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" + "custom": {} }, "overrides": [] }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 5 }, - "id": 31, - "links": [], - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 74, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "7.0.5", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -977,7 +1078,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -1002,8 +1103,48 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/nsm)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1059,7 +1200,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1204,7 +1345,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1349,7 +1490,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1494,7 +1635,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1652,7 +1793,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1702,7 +1843,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1752,7 +1893,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1802,7 +1943,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1852,7 +1993,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1902,7 +2043,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2182,7 +2323,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2321,7 +2462,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2460,7 +2601,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2620,7 +2761,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2725,7 +2866,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2897,25 +3038,18 @@ "title": "Zeek Restarts via Healthcheck", "type": "stat" }, + + + { - "cacheTimeout": null, "datasource": "InfluxDB", "fieldConfig": { "defaults": { "custom": {}, - "decimals": 2, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 1209600, + "unit": "s", "min": 0, - "nullValueMode": "connected", + "max": null, + "decimals": 2, "thresholds": { "mode": "absolute", "steps": [ @@ -2933,7 +3067,16 @@ } ] }, - "unit": "s" + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected" }, "overrides": [] }, @@ -2946,25 +3089,16 @@ "id": 22, "links": [], "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "alertThreshold": true }, - "pluginVersion": "7.0.5", + "pluginVersion": "7.3.4", "targets": [ { "dsType": "influxdb", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3000,13 +3134,81 @@ "operator": "=", "value": "{{ SERVERNAME }}" } - ] + ], + "alias": "Oldest Pcap" } ], + "title": "{{ SERVERNAME }} - PCAP Retention", + "type": "graph", + "renderer": "flot", + "yaxes": [ + { + "label": "", + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "s", + "$$hashKey": "object:643", + "decimals": 2 + }, + { + "label": null, + "show": false, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:644" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "linewidth": 1, + "dashLength": 10, + "spaceLength": 10, + "pointradius": 2, + "legend": { + "show": true, + "values": false, + "min": false, + "max": false, + "current": false, + "total": false, + "avg": false + }, + "nullPointMode": "connected", + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [], + "cacheTimeout": null, "timeFrom": null, "timeShift": null, - "title": "{{ SERVERNAME }} - PCAP Retention", - "type": "gauge" + "fillGradient": 0, + "dashes": false, + "hiddenSeries": false, + "points": false, + "bars": false, + "stack": false, + "percentage": false, + "steppedLine": false }, { "aliasColors": { @@ -3118,7 +3320,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3162,7 +3364,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3206,7 +3408,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3352,7 +3554,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3395,7 +3597,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3438,7 +3640,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3481,7 +3683,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3622,7 +3824,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3783,7 +3985,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3827,7 +4029,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3870,7 +4072,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4006,7 +4208,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4054,7 +4256,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4200,7 +4402,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4264,7 +4466,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4422,7 +4624,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4622,5 +4824,5 @@ "timezone": "browser", "title": "Evaluation Mode - {{ SERVERNAME }} Overview", "uid": "{{ UID }}", - "version": 6 + "version": 1 } diff --git a/salt/grafana/dashboards/manager/manager.json b/salt/grafana/dashboards/manager/manager.json index c5c09ae0e..9a498a34f 100644 --- a/salt/grafana/dashboards/manager/manager.json +++ b/salt/grafana/dashboards/manager/manager.json @@ -20,8 +20,43 @@ "links": [], "panels": [ { - "cacheTimeout": null, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "percent", + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 60 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 80 + } + ] + }, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected" + }, + "overrides": [] + }, "gridPos": { "h": 5, "w": 4, @@ -31,47 +66,16 @@ "id": 2, "links": [], "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "mappings": [], - "max": 100, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 60 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [], - "values": false - }, - "orientation": "auto", - "showThresholdLabels": false, - "showThresholdMarkers": true + "alertThreshold": true }, - "pluginVersion": "6.6.2", + "pluginVersion": "7.3.4", "targets": [ { "dsType": "influxdb", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -119,13 +123,80 @@ "operator": "=", "value": "cpu-total" } - ] + ], + "alias": "Usage" } ], + "title": "{{ SERVERNAME }} - CPU", + "type": "graph", + "cacheTimeout": null, + "renderer": "flot", + "yaxes": [ + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "percent", + "$$hashKey": "object:395" + }, + { + "label": null, + "show": false, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:396" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "fillGradient": 0, + "linewidth": 1, + "dashes": false, + "hiddenSeries": false, + "dashLength": 10, + "spaceLength": 10, + "points": false, + "pointradius": 2, + "bars": false, + "stack": false, + "percentage": false, + "legend": { + "show": false, + "values": false, + "min": false, + "max": false, + "current": false, + "total": false, + "avg": false + }, + "nullPointMode": "connected", + "steppedLine": false, + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, "timeFrom": null, "timeShift": null, - "title": "{{ SERVERNAME }} - CPU", - "type": "gauge" + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [] }, { "datasource": "InfluxDB", @@ -260,7 +331,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -400,7 +471,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -540,7 +611,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -622,68 +693,58 @@ } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 5 }, - "id": 12, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ ROOTFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ ROOTFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ ROOTFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 73, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "6.6.2", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -703,7 +764,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -728,72 +789,102 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 5 }, - "id": 35, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ NSMFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ NSMFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ NSMFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 74, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "6.6.2", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -813,7 +904,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -838,8 +929,48 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/nsm)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -888,7 +1019,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1028,7 +1159,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1168,7 +1299,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1308,7 +1439,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1454,7 +1585,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1504,7 +1635,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1554,7 +1685,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1604,7 +1735,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1654,7 +1785,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1704,7 +1835,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1846,7 +1977,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1910,7 +2041,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2286,7 +2417,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2330,7 +2461,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2374,7 +2505,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2510,7 +2641,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2574,7 +2705,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2734,7 +2865,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2777,7 +2908,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2820,7 +2951,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2863,7 +2994,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2997,7 +3128,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3041,7 +3172,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3084,7 +3215,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3219,7 +3350,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3283,7 +3414,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3434,7 +3565,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3481,7 +3612,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3616,7 +3747,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3751,7 +3882,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3815,7 +3946,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, diff --git a/salt/grafana/dashboards/managersearch/managersearch.json b/salt/grafana/dashboards/managersearch/managersearch.json index 838a37426..a852d8c0a 100644 --- a/salt/grafana/dashboards/managersearch/managersearch.json +++ b/salt/grafana/dashboards/managersearch/managersearch.json @@ -21,8 +21,43 @@ "links": [], "panels": [ { - "cacheTimeout": null, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "percent", + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 60 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 80 + } + ] + }, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected" + }, + "overrides": [] + }, "gridPos": { "h": 5, "w": 4, @@ -32,57 +67,16 @@ "id": 2, "links": [], "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 60 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + "alertThreshold": true }, - "pluginVersion": "6.7.3", + "pluginVersion": "7.3.4", "targets": [ { "dsType": "influxdb", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -130,11 +124,80 @@ "operator": "=", "value": "cpu-total" } - ] + ], + "alias": "Usage" } ], "title": "{{ SERVERNAME }} - CPU", - "type": "gauge" + "type": "graph", + "cacheTimeout": null, + "renderer": "flot", + "yaxes": [ + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "percent", + "$$hashKey": "object:395" + }, + { + "label": null, + "show": false, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:396" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "fillGradient": 0, + "linewidth": 1, + "dashes": false, + "hiddenSeries": false, + "dashLength": 10, + "spaceLength": 10, + "points": false, + "pointradius": 2, + "bars": false, + "stack": false, + "percentage": false, + "legend": { + "show": false, + "values": false, + "min": false, + "max": false, + "current": false, + "total": false, + "avg": false + }, + "nullPointMode": "connected", + "steppedLine": false, + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "timeFrom": null, + "timeShift": null, + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [] }, { "datasource": "InfluxDB", @@ -269,7 +332,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -628,68 +691,58 @@ } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 5 }, - "id": 12, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ ROOTFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ ROOTFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ ROOTFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 73, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "6.7.3", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -709,7 +762,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -734,73 +787,102 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 5 }, - "id": 35, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "decimals": 2, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ NSMFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ NSMFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ NSMFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 74, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "6.7.3", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -820,7 +902,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -845,8 +927,48 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/nsm)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1034,7 +1156,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1458,7 +1580,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1508,7 +1630,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1558,7 +1680,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1608,7 +1730,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1658,7 +1780,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1708,7 +1830,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1850,7 +1972,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1914,7 +2036,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2062,7 +2184,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2190,7 +2312,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2373,7 +2495,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2417,7 +2539,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2461,7 +2583,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2597,7 +2719,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2661,7 +2783,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2809,7 +2931,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2937,7 +3059,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3072,7 +3194,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3116,7 +3238,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3159,7 +3281,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3495,7 +3617,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3627,7 +3749,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4005,7 +4127,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4135,7 +4257,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4182,7 +4304,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4313,7 +4435,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4453,7 +4575,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4496,7 +4618,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4539,7 +4661,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4582,7 +4704,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, diff --git a/salt/grafana/dashboards/search_nodes/searchnode.json b/salt/grafana/dashboards/search_nodes/searchnode.json index a7170d276..72ebe768a 100644 --- a/salt/grafana/dashboards/search_nodes/searchnode.json +++ b/salt/grafana/dashboards/search_nodes/searchnode.json @@ -20,8 +20,43 @@ "links": [], "panels": [ { - "cacheTimeout": null, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "percent", + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 60 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 80 + } + ] + }, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected" + }, + "overrides": [] + }, "gridPos": { "h": 5, "w": 4, @@ -31,57 +66,16 @@ "id": 2, "links": [], "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 60 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + "alertThreshold": true }, - "pluginVersion": "6.6.2", + "pluginVersion": "7.3.4", "targets": [ { "dsType": "influxdb", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -129,11 +123,80 @@ "operator": "=", "value": "cpu-total" } - ] + ], + "alias": "Usage" } ], "title": "{{ SERVERNAME }} - CPU", - "type": "gauge" + "type": "graph", + "cacheTimeout": null, + "renderer": "flot", + "yaxes": [ + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "percent", + "$$hashKey": "object:395" + }, + { + "label": null, + "show": false, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:396" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "fillGradient": 0, + "linewidth": 1, + "dashes": false, + "hiddenSeries": false, + "dashLength": 10, + "spaceLength": 10, + "points": false, + "pointradius": 2, + "bars": false, + "stack": false, + "percentage": false, + "legend": { + "show": false, + "values": false, + "min": false, + "max": false, + "current": false, + "total": false, + "avg": false + }, + "nullPointMode": "connected", + "steppedLine": false, + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "timeFrom": null, + "timeShift": null, + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [] }, { "datasource": "InfluxDB", @@ -268,7 +331,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -408,7 +471,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -548,7 +611,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -676,7 +739,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -757,68 +820,58 @@ } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 5 }, - "id": 12, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ ROOTFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ ROOTFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ ROOTFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 73, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "6.6.2", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -838,7 +891,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -863,27 +916,102 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", - "cacheTimeout": null, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 5 }, - "id": 35, - "links": [], + "hiddenSeries": false, + "id": 74, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -903,7 +1031,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -928,54 +1056,48 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/nsm)", - "type": "gauge", - "options": { - "showThresholdMarkers": true, - "showThresholdLabels": false, - "fieldOptions": { - "values": false, - "calcs": [ - "lastNotNull" - ], - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ NSMFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ NSMFS * '.90'|float }}" - } - ] - }, - "mappings": [ - { - "op": "=", - "text": "N/A", - "value": "null", - "id": 0, - "type": 1 - } - ], - "unit": "bytes", - "nullValueMode": "connected", - "min": 0, - "max": "{{ NSMFS}}", - "decimals": 2 - }, - "overrides": [] - }, - "orientation": "horizontal" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" }, - "pluginVersion": "6.6.2" + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1024,7 +1146,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1152,7 +1274,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1280,7 +1402,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1408,7 +1530,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1548,7 +1670,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1598,7 +1720,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1648,7 +1770,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1698,7 +1820,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1748,7 +1870,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1798,7 +1920,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1976,7 +2098,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2106,7 +2228,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2153,7 +2275,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2340,7 +2462,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2384,7 +2506,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2428,7 +2550,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2568,7 +2690,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2611,7 +2733,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2654,7 +2776,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2697,7 +2819,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2832,7 +2954,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2896,7 +3018,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3051,7 +3173,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3095,7 +3217,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3138,7 +3260,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3269,7 +3391,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3404,7 +3526,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3468,7 +3590,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, diff --git a/salt/grafana/dashboards/sensor_nodes/sensor.json b/salt/grafana/dashboards/sensor_nodes/sensor.json index 048bb5a34..9136a7838 100644 --- a/salt/grafana/dashboards/sensor_nodes/sensor.json +++ b/salt/grafana/dashboards/sensor_nodes/sensor.json @@ -109,23 +109,13 @@ "type": "stat" }, { - "cacheTimeout": null, "datasource": "InfluxDB", "fieldConfig": { "defaults": { "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, + "unit": "percent", "min": 0, - "nullValueMode": "connected", + "max": 100, "thresholds": { "mode": "absolute", "steps": [ @@ -143,7 +133,16 @@ } ] }, - "unit": "percent" + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected" }, "overrides": [] }, @@ -156,25 +155,16 @@ "id": 2, "links": [], "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "alertThreshold": true }, - "pluginVersion": "7.0.5", + "pluginVersion": "7.3.4", "targets": [ { "dsType": "influxdb", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -222,11 +212,80 @@ "operator": "=", "value": "cpu-total" } - ] + ], + "alias": "Usage" } ], "title": "{{ SERVERNAME }} - CPU", - "type": "gauge" + "type": "graph", + "cacheTimeout": null, + "renderer": "flot", + "yaxes": [ + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "percent", + "$$hashKey": "object:395" + }, + { + "label": null, + "show": false, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:396" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "fillGradient": 0, + "linewidth": 1, + "dashes": false, + "hiddenSeries": false, + "dashLength": 10, + "spaceLength": 10, + "points": false, + "pointradius": 2, + "bars": false, + "stack": false, + "percentage": false, + "legend": { + "show": false, + "values": false, + "min": false, + "max": false, + "current": false, + "total": false, + "avg": false + }, + "nullPointMode": "connected", + "steppedLine": false, + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "timeFrom": null, + "timeShift": null, + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [] }, { "aliasColors": {}, @@ -414,7 +473,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -553,7 +612,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -692,7 +751,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -773,72 +832,58 @@ } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", "fieldConfig": { "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ ROOTFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ ROOTFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ ROOTFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" + "custom": {} }, "overrides": [] }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 5 }, - "id": 12, - "links": [], - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 73, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "7.0.5", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -858,7 +903,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -883,76 +928,102 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", "fieldConfig": { "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ NSMFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ NSMFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ NSMFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" + "custom": {} }, "overrides": [] }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 5 }, - "id": 31, - "links": [], - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 74, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "7.0.5", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -972,7 +1043,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -997,28 +1068,58 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/nsm)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "cacheTimeout": null, "datasource": "InfluxDB", "fieldConfig": { "defaults": { "custom": {}, - "decimals": 2, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 1209600, + "unit": "s", "min": 0, - "nullValueMode": "connected", + "max": null, + "decimals": 2, "thresholds": { "mode": "absolute", "steps": [ @@ -1036,7 +1137,16 @@ } ] }, - "unit": "s" + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected" }, "overrides": [] }, @@ -1049,25 +1159,16 @@ "id": 22, "links": [], "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "alertThreshold": true }, - "pluginVersion": "7.0.5", + "pluginVersion": "7.3.4", "targets": [ { "dsType": "influxdb", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1103,12 +1204,82 @@ "operator": "=", "value": "{{ SERVERNAME }}" } - ] + ], + "alias": "Oldest Pcap" } ], "title": "{{ SERVERNAME }} - PCAP Retention", - "type": "gauge" - }, + "type": "graph", + "renderer": "flot", + "yaxes": [ + { + "label": "", + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "s", + "$$hashKey": "object:643", + "decimals": 2 + }, + { + "label": null, + "show": false, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:644" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "linewidth": 1, + "dashLength": 10, + "spaceLength": 10, + "pointradius": 2, + "legend": { + "show": true, + "values": false, + "min": false, + "max": false, + "current": false, + "total": false, + "avg": false + }, + "nullPointMode": "connected", + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [], + "cacheTimeout": null, + "timeFrom": null, + "timeShift": null, + "fillGradient": 0, + "dashes": false, + "hiddenSeries": false, + "points": false, + "bars": false, + "stack": false, + "percentage": false, + "steppedLine": false + }, { "aliasColors": {}, "bars": false, @@ -1162,7 +1333,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1307,7 +1478,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1452,7 +1623,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1609,7 +1780,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1659,7 +1830,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1709,7 +1880,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1759,7 +1930,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1809,7 +1980,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1859,7 +2030,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1999,7 +2170,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2132,7 +2303,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2271,7 +2442,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2410,7 +2581,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2553,7 +2724,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2786,7 +2957,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2850,7 +3021,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3016,7 +3187,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3059,7 +3230,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3102,7 +3273,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3145,7 +3316,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3281,7 +3452,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3329,7 +3500,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3475,7 +3646,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3685,7 +3856,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3729,7 +3900,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3773,7 +3944,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3914,7 +4085,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3958,7 +4129,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4001,7 +4172,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4142,7 +4313,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4206,7 +4377,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, diff --git a/salt/grafana/dashboards/standalone/standalone.json b/salt/grafana/dashboards/standalone/standalone.json index 3bab1ff5f..079578a38 100644 --- a/salt/grafana/dashboards/standalone/standalone.json +++ b/salt/grafana/dashboards/standalone/standalone.json @@ -21,23 +21,13 @@ "links": [], "panels": [ { - "cacheTimeout": null, "datasource": "InfluxDB", "fieldConfig": { "defaults": { "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, + "unit": "percent", "min": 0, - "nullValueMode": "connected", + "max": 100, "thresholds": { "mode": "absolute", "steps": [ @@ -55,7 +45,16 @@ } ] }, - "unit": "percent" + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected" }, "overrides": [] }, @@ -68,25 +67,16 @@ "id": 2, "links": [], "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "alertThreshold": true }, - "pluginVersion": "7.0.5", + "pluginVersion": "7.3.4", "targets": [ { "dsType": "influxdb", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -134,12 +124,84 @@ "operator": "=", "value": "cpu-total" } - ] + ], + "alias": "Usage" } ], "title": "{{ SERVERNAME }} - CPU", - "type": "gauge" + "type": "graph", + "cacheTimeout": null, + "renderer": "flot", + "yaxes": [ + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "percent", + "$$hashKey": "object:395" + }, + { + "label": null, + "show": false, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:396" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "fillGradient": 0, + "linewidth": 1, + "dashes": false, + "hiddenSeries": false, + "dashLength": 10, + "spaceLength": 10, + "points": false, + "pointradius": 2, + "bars": false, + "stack": false, + "percentage": false, + "legend": { + "show": false, + "values": false, + "min": false, + "max": false, + "current": false, + "total": false, + "avg": false + }, + "nullPointMode": "connected", + "steppedLine": false, + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "timeFrom": null, + "timeShift": null, + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [] }, + + + { "datasource": "InfluxDB", "fieldConfig": { @@ -284,7 +346,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -574,7 +636,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -714,7 +776,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -796,72 +858,58 @@ } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", "fieldConfig": { "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ ROOTFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ ROOTFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ ROOTFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" + "custom": {} }, "overrides": [] }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 5 }, - "id": 12, - "links": [], - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 73, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "7.0.5", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -881,7 +929,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -906,76 +954,102 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "cacheTimeout": null, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, "datasource": "InfluxDB", "fieldConfig": { "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ NSMFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ NSMFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ NSMFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" + "custom": {} }, "overrides": [] }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 5 }, - "id": 31, - "links": [], - "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "hiddenSeries": false, + "id": 74, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false }, - "pluginVersion": "7.0.5", + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "dsType": "influxdb", + "alias": "Used", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -995,7 +1069,7 @@ [ { "params": [ - "used" + "used_percent" ], "type": "field" }, @@ -1020,8 +1094,48 @@ ] } ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, "title": "{{ SERVERNAME }} - Disk Used(/nsm)", - "type": "gauge" + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:708", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:709", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1366,7 +1480,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1511,7 +1625,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1669,7 +1783,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1719,7 +1833,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1769,7 +1883,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1819,7 +1933,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1869,7 +1983,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -1919,7 +2033,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2067,7 +2181,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2131,7 +2245,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2285,7 +2399,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2424,7 +2538,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2621,7 +2735,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2665,7 +2779,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2709,7 +2823,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -2851,7 +2965,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3045,24 +3159,14 @@ "type": "stat" }, { - "cacheTimeout": null, "datasource": "InfluxDB", "fieldConfig": { "defaults": { "custom": {}, - "decimals": 2, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 1209600, + "unit": "s", "min": 0, - "nullValueMode": "connected", + "max": null, + "decimals": 2, "thresholds": { "mode": "absolute", "steps": [ @@ -3080,7 +3184,16 @@ } ] }, - "unit": "s" + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected" }, "overrides": [] }, @@ -3093,25 +3206,16 @@ "id": 22, "links": [], "options": { - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "alertThreshold": true }, - "pluginVersion": "7.0.5", + "pluginVersion": "7.3.4", "targets": [ { "dsType": "influxdb", "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3147,13 +3251,81 @@ "operator": "=", "value": "{{ SERVERNAME }}" } - ] + ], + "alias": "Oldest Pcap" } ], + "title": "{{ SERVERNAME }} - PCAP Retention", + "type": "graph", + "renderer": "flot", + "yaxes": [ + { + "label": "", + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "s", + "$$hashKey": "object:643", + "decimals": 2 + }, + { + "label": null, + "show": false, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:644" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "linewidth": 1, + "dashLength": 10, + "spaceLength": 10, + "pointradius": 2, + "legend": { + "show": false, + "values": false, + "min": false, + "max": false, + "current": false, + "total": false, + "avg": false + }, + "nullPointMode": "connected", + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [], + "cacheTimeout": null, "timeFrom": null, "timeShift": null, - "title": "{{ SERVERNAME }} - PCAP Retention", - "type": "gauge" + "fillGradient": 0, + "dashes": false, + "hiddenSeries": false, + "points": false, + "bars": false, + "stack": false, + "percentage": false, + "steppedLine": false }, { "aliasColors": { @@ -3215,7 +3387,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3259,7 +3431,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3302,7 +3474,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3648,7 +3820,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3794,7 +3966,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -3937,7 +4109,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -4550,7 +4722,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -5172,7 +5344,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -5220,7 +5392,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -5378,7 +5550,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -5483,7 +5655,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -5912,7 +6084,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -5955,7 +6127,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -5998,7 +6170,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, @@ -6041,7 +6213,7 @@ "groupBy": [ { "params": [ - "$Interval" + "$__interval" ], "type": "time" }, diff --git a/salt/grafana/defaults.yaml b/salt/grafana/defaults.yaml new file mode 100644 index 000000000..171f679e3 --- /dev/null +++ b/salt/grafana/defaults.yaml @@ -0,0 +1,26 @@ +grafana: + config: + server: + root_url: "%(protocol)s://%(domain)s/grafana/" + auth.anonymous: + enabled: true + org_name: Main Org. + org_role: Viewer + smtp: + enabled: false +# host: localhost:25 +# user: myuser + # If the password contains # or ; you have to wrap it with triple quotes wrapped by single quotes. Ex '"""#password;"""' +# password: mypassword +# cert_file: /etc/grafana/config/files/smtp_cert_file.crt +# key_file: /etc/grafana/config/files/smtp_key_file.key +# skip_verify: false + from_address: admin@grafana.localhost + from_name: Grafana +# ehlo_identity: dashboard.example.com +# auth.ldap: +# enabled: false +# config_file: /etc/grafana/config/files/ldap.toml +# allow_sign_up: true +# enterprise: +# license_path: /opt/so/conf/grafana/etc/files/license.jwt \ No newline at end of file diff --git a/salt/grafana/etc/dashboards/dashboard.yml b/salt/grafana/etc/dashboards/dashboard.yml index 72f77f845..b00dadc04 100644 --- a/salt/grafana/etc/dashboards/dashboard.yml +++ b/salt/grafana/etc/dashboards/dashboard.yml @@ -8,6 +8,7 @@ providers: type: file disableDeletion: false editable: true + allowUiUpdates: true options: path: /etc/grafana/grafana_dashboards/manager - name: 'Manager Search' @@ -15,6 +16,7 @@ providers: type: file disableDeletion: false editable: true + allowUiUpdates: true options: path: /etc/grafana/grafana_dashboards/managersearch - name: 'Sensor Nodes' @@ -22,6 +24,7 @@ providers: type: file disableDeletion: false editable: true + allowUiUpdates: true options: path: /etc/grafana/grafana_dashboards/sensor_nodes - name: 'Search Nodes' @@ -29,6 +32,7 @@ providers: type: file disableDeletion: false editable: true + allowUiUpdates: true options: path: /etc/grafana/grafana_dashboards/search_nodes - name: 'Standalone' @@ -36,6 +40,7 @@ providers: type: file disableDeletion: false editable: true + allowUiUpdates: true options: path: /etc/grafana/grafana_dashboards/standalone {%- else %} @@ -44,6 +49,7 @@ providers: type: file disableDeletion: false editable: true + allowUiUpdates: true options: path: /etc/grafana/grafana_dashboards/eval {% endif %} diff --git a/salt/grafana/etc/files/readme.txt b/salt/grafana/etc/files/readme.txt new file mode 100644 index 000000000..c78e8687c --- /dev/null +++ b/salt/grafana/etc/files/readme.txt @@ -0,0 +1 @@ +For files that are referenced inside the Grafana config, place them in /opt/so/saltstack/local/salt/grafana/etc/files/. This would include keys used for smtp or a Grafana enterprise license file. \ No newline at end of file diff --git a/salt/grafana/etc/grafana.ini b/salt/grafana/etc/grafana.ini deleted file mode 100644 index 3486ff241..000000000 --- a/salt/grafana/etc/grafana.ini +++ /dev/null @@ -1,482 +0,0 @@ -##################### Grafana Configuration Example ##################### -# -# Everything has defaults so you only need to uncomment things you want to -# change - -# possible values : production, development -;app_mode = production - -# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty -;instance_name = ${HOSTNAME} - -#################################### Paths #################################### -[paths] -# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) -;data = /var/lib/grafana - -# Temporary files in `data` directory older than given duration will be removed -;temp_data_lifetime = 24h - -# Directory where grafana can store logs -;logs = /var/log/grafana - -# Directory where grafana will automatically scan and look for plugins -;plugins = /var/lib/grafana/plugins - -# folder that contains provisioning config files that grafana will apply on startup and while running. -;provisioning = conf/provisioning - -#################################### Server #################################### -[server] -# Protocol (http, https, socket) -;protocol = http - -# The ip address to bind to, empty will bind to all interfaces -;http_addr = - -# The http port to use -;http_port = 3000 - -# The public facing domain name used to access grafana from a browser -;domain = localhost - -# Redirect to correct domain if host header does not match domain -# Prevents DNS rebinding attacks -;enforce_domain = false - -# The full public facing url you use in browser, used for redirects and emails -# If you use reverse proxy and sub path specify full url (with sub path) -root_url = %(protocol)s://%(domain)s/grafana/ - -# Log web requests -;router_logging = false - -# the path relative working path -;static_root_path = public - -# enable gzip -;enable_gzip = false - -# https certs & key file -;cert_file = -;cert_key = - -# Unix socket path -;socket = - -#################################### Database #################################### -[database] -# You can configure the database connection by specifying type, host, name, user and password -# as separate properties or as on string using the url properties. - -# Either "mysql", "postgres" or "sqlite3", it's your choice -;type = sqlite3 -;host = 127.0.0.1:3306 -;name = grafana -;user = root -# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" -;password = - -# Use either URL or the previous fields to configure the database -# Example: mysql://user:secret@host:port/database -;url = - -# For "postgres" only, either "disable", "require" or "verify-full" -;ssl_mode = disable - -# For "sqlite3" only, path relative to data_path setting -;path = grafana.db - -# Max idle conn setting default is 2 -;max_idle_conn = 2 - -# Max conn setting default is 0 (mean not set) -;max_open_conn = - -# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours) -;conn_max_lifetime = 14400 - -# Set to true to log the sql calls and execution times. -log_queries = - -#################################### Session #################################### -[session] -# Either "memory", "file", "redis", "mysql", "postgres", default is "file" -;provider = file - -# Provider config options -# memory: not have any config yet -# file: session dir path, is relative to grafana data_path -# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana` -# mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name` -# postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable -;provider_config = sessions - -# Session cookie name -;cookie_name = grafana_sess - -# If you use session in https only, default is false -;cookie_secure = false - -# Session life time, default is 86400 -;session_life_time = 86400 - -#################################### Data proxy ########################### -[dataproxy] - -# This enables data proxy logging, default is false -;logging = false - -#################################### Analytics #################################### -[analytics] -# Server reporting, sends usage counters to stats.grafana.org every 24 hours. -# No ip addresses are being tracked, only simple counters to track -# running instances, dashboard and error counts. It is very helpful to us. -# Change this option to false to disable reporting. -;reporting_enabled = true - -# Set to false to disable all checks to https://grafana.net -# for new vesions (grafana itself and plugins), check is used -# in some UI views to notify that grafana or plugin update exists -# This option does not cause any auto updates, nor send any information -# only a GET request to http://grafana.com to get latest versions -;check_for_updates = true - -# Google Analytics universal tracking code, only enabled if you specify an id here -;google_analytics_ua_id = - -#################################### Security #################################### -[security] -# default admin user, created on startup -;admin_user = admin - -# default admin password, can be changed before first start of grafana, or in profile settings -;admin_password = admin - -# used for signing -;secret_key = SW2YcwTIb9zpOOhoPsMm - -# Auto-login remember days -;login_remember_days = 7 -;cookie_username = grafana_user -;cookie_remember_name = grafana_remember - -# disable gravatar profile images -;disable_gravatar = false - -# data source proxy whitelist (ip_or_domain:port separated by spaces) -;data_source_proxy_whitelist = - -# disable protection against brute force login attempts -;disable_brute_force_login_protection = false - -#################################### Snapshots ########################### -[snapshots] -# snapshot sharing options -;external_enabled = true -;external_snapshot_url = https://snapshots-origin.raintank.io -;external_snapshot_name = Publish to snapshot.raintank.io - -# remove expired snapshot -;snapshot_remove_expired = true - -#################################### Dashboards History ################## -[dashboards] -# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1 -;versions_to_keep = 20 - -#################################### Users ############################### -[users] -# disable user signup / registration -;allow_sign_up = true - -# Allow non admin users to create organizations -;allow_org_create = true - -# Set to true to automatically assign new users to the default organization (id 1) -;auto_assign_org = true - -# Default role new users will be automatically assigned (if disabled above is set to true) -;auto_assign_org_role = Viewer - -# Background text for the user field on the login page -;login_hint = email or username - -# Default UI theme ("dark" or "light") -;default_theme = dark - -# External user management, these options affect the organization users view -;external_manage_link_url = -;external_manage_link_name = -;external_manage_info = - -# Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard. -;viewers_can_edit = false - -[auth] -# Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false -;disable_login_form = false - -# Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false -;disable_signout_menu = false - -# URL to redirect the user to after sign out -;signout_redirect_url = - -#################################### Anonymous Auth ########################## -[auth.anonymous] -# enable anonymous access -enabled = true - -# specify organization name that should be used for unauthenticated users -org_name = Main Org. - -# specify role for unauthenticated users -org_role = Viewer - -#################################### Github Auth ########################## -[auth.github] -;enabled = false -;allow_sign_up = true -;client_id = some_id -;client_secret = some_secret -;scopes = user:email,read:org -;auth_url = https://github.com/login/oauth/authorize -;token_url = https://github.com/login/oauth/access_token -;api_url = https://api.github.com/user -;team_ids = -;allowed_organizations = - -#################################### Google Auth ########################## -[auth.google] -;enabled = false -;allow_sign_up = true -;client_id = some_client_id -;client_secret = some_client_secret -;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email -;auth_url = https://accounts.google.com/o/oauth2/auth -;token_url = https://accounts.google.com/o/oauth2/token -;api_url = https://www.googleapis.com/oauth2/v1/userinfo -;allowed_domains = - -#################################### Generic OAuth ########################## -[auth.generic_oauth] -;enabled = false -;name = OAuth -;allow_sign_up = true -;client_id = some_id -;client_secret = some_secret -;scopes = user:email,read:org -;auth_url = https://foo.bar/login/oauth/authorize -;token_url = https://foo.bar/login/oauth/access_token -;api_url = https://foo.bar/user -;team_ids = -;allowed_organizations = -;tls_skip_verify_insecure = false -;tls_client_cert = -;tls_client_key = -;tls_client_ca = - -#################################### Grafana.com Auth #################### -[auth.grafana_com] -;enabled = false -;allow_sign_up = true -;client_id = some_id -;client_secret = some_secret -;scopes = user:email -;allowed_organizations = - -#################################### Auth Proxy ########################## -[auth.proxy] -;enabled = false -;header_name = X-WEBAUTH-USER -;header_property = username -;auto_sign_up = true -;ldap_sync_ttl = 60 -;whitelist = 192.168.1.1, 192.168.2.1 -;headers = Email:X-User-Email, Name:X-User-Name - -#################################### Basic Auth ########################## -[auth.basic] -;enabled = true - -#################################### Auth LDAP ########################## -[auth.ldap] -;enabled = false -;config_file = /etc/grafana/ldap.toml -;allow_sign_up = true - -#################################### SMTP / Emailing ########################## -[smtp] -;enabled = false -;host = localhost:25 -;user = -# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;""" -;password = -;cert_file = -;key_file = -;skip_verify = false -;from_address = admin@grafana.localhost -;from_name = Grafana -# EHLO identity in SMTP dialog (defaults to instance_name) -;ehlo_identity = dashboard.example.com - -[emails] -;welcome_email_on_sign_up = false - -#################################### Logging ########################## -[log] -# Either "console", "file", "syslog". Default is console and file -# Use space to separate multiple modes, e.g. "console file" -;mode = console file - -# Either "debug", "info", "warn", "error", "critical", default is "info" -;level = info - -# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug -;filters = - -# For "console" mode only -[log.console] -;level = - -# log line format, valid options are text, console and json -;format = console - -# For "file" mode only -[log.file] -;level = - -# log line format, valid options are text, console and json -;format = text - -# This enables automated log rotate(switch of following options), default is true -;log_rotate = true - -# Max line number of single file, default is 1000000 -;max_lines = 1000000 - -# Max size shift of single file, default is 28 means 1 << 28, 256MB -;max_size_shift = 28 - -# Segment log daily, default is true -;daily_rotate = true - -# Expired days of log file(delete after max days), default is 7 -;max_days = 7 - -[log.syslog] -;level = - -# log line format, valid options are text, console and json -;format = text - -# Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used. -;network = -;address = - -# Syslog facility. user, daemon and local0 through local7 are valid. -;facility = - -# Syslog tag. By default, the process' argv[0] is used. -;tag = - -#################################### Alerting ############################ -[alerting] -# Disable alerting engine & UI features -;enabled = true -# Makes it possible to turn off alert rule execution but alerting UI is visible -;execute_alerts = true - -# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state) -;error_or_timeout = alerting - -# Default setting for how Grafana handles nodata or null values in alerting. (alerting, no_data, keep_state, ok) -;nodata_or_nullvalues = no_data - -# Alert notifications can include images, but rendering many images at the same time can overload the server -# This limit will protect the server from render overloading and make sure notifications are sent out quickly -;concurrent_render_limit = 5 - -#################################### Explore ############################# -[explore] -# Enable the Explore section -;enabled = false - -#################################### Internal Grafana Metrics ########################## -# Metrics available at HTTP API Url /metrics -[metrics] -# Disable / Enable internal metrics -;enabled = true - -# Publish interval -;interval_seconds = 10 - -# Send internal metrics to Graphite -[metrics.graphite] -# Enable by setting the address setting (ex localhost:2003) -;address = -;prefix = prod.grafana.%(instance_name)s. - -#################################### Distributed tracing ############ -[tracing.jaeger] -# Enable by setting the address sending traces to jaeger (ex localhost:6831) -;address = localhost:6831 -# Tag that will always be included in when creating new spans. ex (tag1:value1,tag2:value2) -;always_included_tag = tag1:value1 -# Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote -;sampler_type = const -# jaeger samplerconfig param -# for "const" sampler, 0 or 1 for always false/true respectively -# for "probabilistic" sampler, a probability between 0 and 1 -# for "rateLimiting" sampler, the number of spans per second -# for "remote" sampler, param is the same as for "probabilistic" -# and indicates the initial sampling rate before the actual one -# is received from the mothership -;sampler_param = 1 - -#################################### Grafana.com integration ########################## -# Url used to import dashboards directly from Grafana.com -[grafana_com] -;url = https://grafana.com - -#################################### External image storage ########################## -[external_image_storage] -# Used for uploading images to public servers so they can be included in slack/email messages. -# you can choose between (s3, webdav, gcs, azure_blob, local) -;provider = - -[external_image_storage.s3] -;bucket = -;region = -;path = -;access_key = -;secret_key = - -[external_image_storage.webdav] -;url = -;public_url = -;username = -;password = - -[external_image_storage.gcs] -;key_file = -;bucket = -;path = - -[external_image_storage.azure_blob] -;account_name = -;account_key = -;container_name = - -[external_image_storage.local] -# does not require any configuration - -[rendering] -# Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer -;server_url = -;callback_url = - -[enterprise] -# Path to a valid Grafana Enterprise license.jwt file -;license_path = diff --git a/salt/grafana/etc/grafana.ini.jinja b/salt/grafana/etc/grafana.ini.jinja new file mode 100644 index 000000000..f2309056d --- /dev/null +++ b/salt/grafana/etc/grafana.ini.jinja @@ -0,0 +1,12 @@ +{%- macro write_config_line(cfg) %} +{%- for k,v in cfg.items() -%} +{{ k }} = {{ v }} +{% endfor %} +{%- endmacro %} + +{{ write_config_line(config.get("default", {})) }} +{% for header, cfg in config.items() %} +{%- if header == "default" %}{% continue %}{% endif %} +[{{ header }}] +{{ write_config_line(cfg) }} +{% endfor %} \ No newline at end of file diff --git a/salt/grafana/init.sls b/salt/grafana/init.sls index 8fe88f354..9c596ca98 100644 --- a/salt/grafana/init.sls +++ b/salt/grafana/init.sls @@ -9,6 +9,10 @@ {% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %} {% set ADMINPASS = salt['pillar.get']('secrets:grafana_admin') %} +{% import_yaml 'grafana/defaults.yaml' as default_settings %} +{% set GRAFANA_SETTINGS = salt['grains.filter_by'](default_settings, default='grafana', merge=salt['pillar.get']('grafana', {})) %} + + {% if grains['role'] in ['so-manager', 'so-managersearch', 'so-eval', 'so-standalone'] and GRAFANA == 1 %} # Grafana all the things @@ -75,13 +79,44 @@ grafanadashsndir: - group: 939 - makedirs: True -grafanaconf: - file.recurse: - - name: /opt/so/conf/grafana/etc +grafana-dashboard-config: + file.managed: + - name: /opt/so/conf/grafana/etc/dashboards/dashboard.yml - user: 939 - group: 939 - template: jinja - - source: salt://grafana/etc + - source: salt://grafana/etc/dashboards/dashboard.yml + - makedirs: True + + +grafana-datasources-config: + file.managed: + - name: /opt/so/conf/grafana/etc/datasources/influxdb.yaml + - user: 939 + - group: 939 + - template: jinja + - source: salt://grafana/etc/datasources/influxdb.yaml + - makedirs: True + +grafana-config: + file.managed: + - name: /opt/so/conf/grafana/etc/grafana.ini + - user: 939 + - group: 939 + - template: jinja + - source: salt://grafana/etc/grafana.ini.jinja + - context: + config: {{ GRAFANA_SETTINGS.config|json }} + +# these are the files that are referenced inside the config such as smtp:cert_file, smtp:cert_key, auth.ldap:config_file, enterprise:license_path +grafana-config-files: + file.recurse: + - name: /opt/so/conf/grafana/etc/files + - user: 939 + - group: 939 + - source: salt://grafana/etc/files + - makedirs: True + {% if salt['pillar.get']('managertab', False) %} {% for SN, SNDATA in salt['pillar.get']('managertab', {}).items() %} @@ -229,6 +264,7 @@ so-grafana: - /opt/so/conf/grafana/etc/datasources:/etc/grafana/provisioning/datasources:rw - /opt/so/conf/grafana/etc/dashboards:/etc/grafana/provisioning/dashboards:rw - /opt/so/conf/grafana/grafana_dashboards:/etc/grafana/grafana_dashboards:rw + - /opt/so/conf/grafana/etc/files:/etc/grafana/config/files:ro - environment: - GF_SECURITY_ADMIN_PASSWORD={{ ADMINPASS }} - port_bindings: