From 05430e32b2e58cfc77a9b9deb24750480b906953 Mon Sep 17 00:00:00 2001 From: Luis Martin Schick Date: Sun, 28 Feb 2021 00:42:07 +0100 Subject: [PATCH 1/4] Changed Node version from Current to 14.x --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 108b494..7b739a9 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ SquadJS relies on being able to access the Squad server log directory in order t #### Prerequisites * Git - * [Node.js](https://nodejs.org/en/) (Current) - [Download](https://nodejs.org/en/) + * [Node.js](https://nodejs.org/en/) (14.x) - [Download](https://nodejs.org/en/) * [Yarn](https://yarnpkg.com/) (Version 1.22.0+) - [Download](https://classic.yarnpkg.com/en/docs/install) * Some plugins may have additional requirements. From 82586a970a2f4ec36e6ae2f374478f0a993d89bc Mon Sep 17 00:00:00 2001 From: got2bhockey Date: Sat, 27 Feb 2021 19:03:10 -0500 Subject: [PATCH 2/4] Ported Grafana dashboard to v2 format --- squad-server/plugins/db-log.js | 2 +- .../templates/SquadJS-Dashboard-v2.json | 3448 +++++++++++++++++ 2 files changed, 3449 insertions(+), 1 deletion(-) create mode 100644 squad-server/templates/SquadJS-Dashboard-v2.json diff --git a/squad-server/plugins/db-log.js b/squad-server/plugins/db-log.js index a0cd72b..f665b96 100644 --- a/squad-server/plugins/db-log.js +++ b/squad-server/plugins/db-log.js @@ -14,7 +14,7 @@ export default class DBLog extends BasePlugin { '' ); } diff --git a/squad-server/templates/SquadJS-Dashboard-v2.json b/squad-server/templates/SquadJS-Dashboard-v2.json new file mode 100644 index 0000000..5ac32f0 --- /dev/null +++ b/squad-server/templates/SquadJS-Dashboard-v2.json @@ -0,0 +1,3448 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 2, + "id": 7, + "iteration": 1614468639214, + "links": [], + "panels": [ + { + "columnAliases": [], + "columnFiltersEnabled": false, + "columnWidthHints": [], + "columns": [], + "compactRowsEnabled": false, + "datasource": "MySQL", + "datatablePagingType": "simple_numbers", + "datatableTheme": "basic_theme", + "description": "This panel does not sort top scores. ", + "emptyData": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "100%", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "hoverEnabled": true, + "id": 35, + "infoEnabled": true, + "lengthChangeEnabled": true, + "orderColumnEnabled": true, + "pagingTypes": [ + { + "text": "Page number buttons only", + "value": "numbers" + }, + { + "text": "'Previous' and 'Next' buttons only", + "value": "simple" + }, + { + "text": "'Previous' and 'Next' buttons, plus page numbers", + "value": "simple_numbers" + }, + { + "text": "'First', 'Previous', 'Next' and 'Last' buttons", + "value": "full" + }, + { + "text": "'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers", + "value": "full_numbers" + }, + { + "text": "'First' and 'Last' buttons, plus page numbers", + "value": "first_last_numbers" + } + ], + "panelHeight": null, + "pluginVersion": "7.1.1", + "rowNumbersEnabled": false, + "rowsPerPage": 5, + "scroll": false, + "scrollHeight": "default", + "searchEnabled": true, + "showCellBorders": false, + "showHeader": true, + "showRowBorders": true, + "sort": { + "col": 0, + "desc": true + }, + "sortByColumns": [ + { + "columnData": "Kills", + "sortMethod": "desc" + } + ], + "sortByColumnsData": [ + [ + 3, + "desc" + ] + ], + "stripedRowsEnabled": true, + "styles": [ + { + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "splitPattern": "/ /", + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n m.attacker AS \"Steam ID\",\r\n m.attackerName AS \"Name\",\r\n `Wounds`,\r\n `Kills`,\r\n `Deaths`,\r\n `Kills`/`Deaths` AS `K/D`,\r\n `Revives`\r\nFROM `DBLog_Wounds` m\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Wounds`\r\n FROM `DBLog_Wounds`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) w ON w.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Kills`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) k ON k.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n victim,\r\n COUNT(*) AS `Deaths`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY victim\r\n) d ON d.victim = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n reviver,\r\n COUNT(*) AS `Revives`\r\n FROM `DBLog_Revives`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY reviver\r\n) r ON r.reviver = m.attacker\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID \r\nGROUP BY m.attacker\r\nHAVING `K/D` IS NOT NULL;", + "refId": "A", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + } + ] + ], + "table": "DBLog_TickRates", + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "themeOptions": { + "dark": "./styles/dark.scss", + "light": "./styles/light.scss" + }, + "themes": [ + { + "disabled": false, + "text": "Basic", + "value": "basic_theme" + }, + { + "disabled": true, + "text": "Bootstrap", + "value": "bootstrap_theme" + }, + { + "disabled": true, + "text": "Foundation", + "value": "foundation_theme" + }, + { + "disabled": true, + "text": "ThemeRoller", + "value": "themeroller_theme" + } + ], + "timeFrom": null, + "timeShift": null, + "title": " Only for search in the top scores - This panel does not sort top scores. ", + "transform": "table", + "type": "briangann-datatable-panel" + }, + { + "columns": [], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "100%", + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 32, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 3, + "desc": true + }, + "styles": [], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n m.attacker AS \"Steam ID\",\r\n m.attackerName AS \"Name\",\r\n `Wounds`,\r\n `Kills`,\r\n `Deaths`,\r\n `Kills`/`Deaths` AS `K/D`,\r\n `Revives`\r\nFROM `DBLog_Wounds` m\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Wounds`\r\n FROM `DBLog_Wounds`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) w ON w.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n attacker,\r\n COUNT(*) AS `Kills`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY attacker\r\n) k ON k.attacker = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n victim,\r\n COUNT(*) AS `Deaths`\r\n FROM `DBLog_Deaths`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY victim\r\n) d ON d.victim = m.attacker\r\nLEFT JOIN (\r\n SELECT\r\n reviver,\r\n COUNT(*) AS `Revives`\r\n FROM `DBLog_Revives`\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID\r\n GROUP BY reviver\r\n) r ON r.reviver = m.attacker\r\n WHERE\r\n $__timeFilter(time) AND\r\n server = $SERVER_ID \r\nGROUP BY m.attacker\r\nHAVING `K/D` IS NOT NULL;", + "refId": "B", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Top Scorers", + "transform": "table", + "type": "table-old" + }, + { + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "displayName": "", + "mappings": [], + "max": 60, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "yellow", + "value": 15 + }, + { + "color": "dark-green", + "value": 20 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 23 + }, + "id": 16, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.1.4", + "targets": [ + { + "format": "time_series", + "group": [], + "groupBy": [], + "measurement": "tick_rate", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT LAST(\"tick_rate\") FROM \"DBLog_TickRates\" WHERE server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n time AS \"time\",\n tickRate\nFROM DBLog_TickRates\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nORDER BY time DESC", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tick_rate" + ], + "type": "column" + } + ] + ], + "table": "DBLog_TickRates", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "server", + "=", + "$SERVER" + ], + "type": "expression" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Tick Rate", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 18, + "x": 6, + "y": 23 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tick_rate", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n mean(\"tick_rate\") \nFROM \"DBLog_TickRates\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID'\nGROUP BY time($INTERVAL) fill(null)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n avg(tickRate) AS \"tick_rate\"\nFROM DBLog_TickRates\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tick_rate" + ], + "type": "column" + }, + { + "params": [ + "avg" + ], + "type": "aggregate" + }, + { + "params": [ + "tick_rate" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_TickRates", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [ + { + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(50, 116, 217, 0.2)", + "line": true, + "lineColor": "#F2495C", + "op": "lt", + "value": 15, + "yaxis": "left" + }, + { + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(50, 116, 217, 0.2)", + "line": true, + "lineColor": "#FADE2A", + "op": "lt", + "value": 20, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Tick Rate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": "60", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "displayName": "", + "mappings": [], + "max": 80, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "orange", + "value": null + }, + { + "color": "green", + "value": 50 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 31 + }, + "id": 27, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.1.4", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [], + "measurement": "tick_rate", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT LAST(\"player_count\") FROM \"DBLog_PlayerCounts\" WHERE server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n players AS \"Player Count\"\nFROM DBLog_PlayerCounts\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval) DESC\nLIMIT 1", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "player_count" + ], + "type": "column" + }, + { + "params": [ + "Player Count" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_PlayerCounts", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Player Count", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 18, + "x": 6, + "y": 31 + }, + "hiddenSeries": false, + "id": 28, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tick_rate", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n MEAN(\"player_count\") \nFROM \"DBLog_PlayerCounts\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID'\nGROUP BY time($INTERVAL) fill(null)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n avg(players) AS \"player_count\"\nFROM DBLog_PlayerCounts\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "player_count" + ], + "type": "column" + }, + { + "params": [ + "avg" + ], + "type": "aggregate" + }, + { + "params": [ + "player_count" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_PlayerCounts", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [ + { + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(50, 116, 217, 0.2)", + "line": true, + "lineColor": "#FF9830", + "op": "lt", + "value": 50, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Player Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": "80", + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 39 + }, + "id": 12, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": " Wounds", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT COUNT(\"victimName\") \nFROM DBLog_Wounds\nWHERE \n $timeFilter AND\n server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "id" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Wounded in Time Period", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 39 + }, + "id": 13, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": " Deaths", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n count(\"victimName\") \nFROM \"DBLog_Deaths\"\nWHERE \n $timeFilter AND\n server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "id" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Deaths in Time Period", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 39 + }, + "id": 10, + "interval": "", + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": " TKs", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [], + "measurement": "player_wound", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n count(\"victimName\") \nFROM \"DBLog_Wounds\"\nWHERE \n teamkill = true AND\n $timeFilter AND\n server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = '1' AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "id" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "tinyint", + "name": "", + "params": [ + "teamkill", + "=", + "'1'" + ], + "type": "expression" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "TKs in Time Period", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 39 + }, + "id": 14, + "interval": "", + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": " Revives", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [], + "measurement": "revive", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID'", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"id\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "id" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Revives in Time Period", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "columns": [], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "100%", + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 4, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Time", + "thresholds": [], + "type": "date", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n a.time AS \"Time\",\n a.attacker AS \"Attacker\",\n a.attackerName AS \"Attacker Name\",\n a.weapon AS \"Weapon\",\n a.victim AS \"Victim\",\n a.victimName AS \"Victim Name\",\n Total AS \"Total in Time Frame\"\nFROM DBLog_Wounds a\nJOIN\n (\n SELECT\n attacker,\n COUNT(*) AS \"Total\"\n FROM DBLog_Wounds\n WHERE \n $__timeFilter(time) AND\n server = $SERVER_ID AND\n teamkill = true\n GROUP BY attacker\n ) AS b\n ON a.attacker = b.attacker\nWHERE \n $__timeFilter(time) AND\n server = $SERVER_ID AND\n teamkill = true AND\n server = $SERVER_ID\nORDER BY time DESC\nLIMIT 30;", + "refId": "B", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Recent Teamkills", + "transform": "table", + "type": "table-old" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 9, + "w": 6, + "x": 0, + "y": 56 + }, + "id": 20, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "alias": "Non-Teamkills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = false", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Non-Teamkill\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = 0 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Non-Teamkill" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "tinyint", + "name": "", + "params": [ + "teamkill", + "=", + "0" + ], + "type": "expression" + } + ] + }, + { + "alias": "Teamkills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = true", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Teamkill\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n teamkill = '1' AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Teamkill" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "tinyint", + "name": "", + "params": [ + "teamkill", + "=", + "'1'" + ], + "type": "expression" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Non-Teamkills vs Teamkills (Wounds)", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 6, + "y": 56 + }, + "hiddenSeries": false, + "id": 29, + "interval": "2m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Players Wounded", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_wound", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "All" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "alias": "Players Wounded By Team 1", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 1" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "1" + ], + "type": "expression" + } + ] + }, + { + "alias": "Players Wounded By Team 2", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Wounds\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 2" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "2" + ], + "type": "expression" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Wounds Per Minutes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 9, + "w": 6, + "x": 0, + "y": 65 + }, + "id": 18, + "interval": null, + "legend": { + "header": "", + "percentage": true, + "show": true, + "sideWidth": null, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "alias": "Deaths", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Deaths\" \nWHERE \n $timeFilter ", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(woundTime,$__interval),\n count(id) AS \"Deaths\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(woundTime) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(woundTime,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Deaths" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "woundTime", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "alias": "Revives", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Revives\" \nWHERE \n $timeFilter ", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(woundTime,$__interval),\n count(id) AS \"Revives\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(woundTime) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(woundTime,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Revives" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "woundTime", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Deaths vs Revives", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 6, + "y": 65 + }, + "hiddenSeries": false, + "id": 6, + "interval": "2m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Players Killed", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_wound", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "All" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "alias": "Players Killed By Team 1", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 1" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "1" + ], + "type": "expression" + } + ] + }, + { + "alias": "Players Killed By Team 2", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "player_die", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Deaths\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 2" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Deaths", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "2" + ], + "type": "expression" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Kills Per Minutes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 9, + "w": 6, + "x": 0, + "y": 74 + }, + "id": 31, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "alias": "Team 1 Kills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=1", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n attackerTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 1" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "attackerTeamID", + "=", + "1" + ], + "type": "expression" + } + ] + }, + { + "alias": "Team 2 Kills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Deaths\" WHERE $timeFilter AND server = '$SERVER_ID' AND attackerTeamID=2", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 2" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Team 1 vs Team 2", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 6, + "y": 74 + }, + "hiddenSeries": false, + "id": 8, + "interval": "2m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "7.1.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Revives", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "revive", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"All\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "All" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "alias": "Revives", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "revive", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' AND reviverTeamID = 1 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 1\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n victimTeamID = 1 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 1" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "victimTeamID", + "=", + "1" + ], + "type": "expression" + } + ] + }, + { + "alias": "Revives", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "revive", + "metricColumn": "none", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"victimName\") FROM \"DBLog_Revives\" WHERE $timeFilter AND server = '$SERVER_ID' AND reviverTeamID = 2 GROUP BY time($INTERVAL) fill(0)", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n count(id) AS \"Team 2\"\nFROM DBLog_Revives\nWHERE\n $__timeFilter(time) AND\n victimTeamID = 2 AND\n server = \"$SERVER_ID\"\nGROUP BY 1\nORDER BY $__timeGroup(time,$__interval)", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Team 2" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Revives", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + }, + { + "datatype": "int", + "name": "", + "params": [ + "victimTeamID", + "=", + "2" + ], + "type": "expression" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Revives Per Minutes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "columns": [], + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "100%", + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 83 + }, + "id": 22, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 2, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n layerClassname as \"Layer\",\n startTime AS \"Start Time\",\n endTime AS \"End Time\"\nFROM `DBLog_Matches`\nWHERE \n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nORDER BY startTime DESC;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Matches", + "transform": "table", + "type": "table-old" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 83 + }, + "id": 25, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "sort": "current", + "sortDesc": true, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "layer", + "rawQuery": true, + "rawSql": "SELECT\n layerClassname AS metric,\n COUNT(*),\n startTime AS time\nFROM `DBLog_Matches`\nWHERE\n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nGROUP BY layerClassname", + "refId": "A", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + } + ] + ], + "table": "game", + "timeColumn": "startTime", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Layers", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 83 + }, + "id": 24, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": 1, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "layer", + "rawQuery": true, + "rawSql": "SELECT\n mapClassname AS metric,\n COUNT(*),\n startTime AS time\nFROM `DBLog_Matches`\nWHERE\n (\n $__timeFilter(startTime) OR \n $__timeFilter(endTime) OR\n endTime IS NULL\n ) AND \n server = $SERVER_ID \nGROUP BY mapClassname", + "refId": "A", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + } + ] + ], + "table": "game", + "timeColumn": "startTime", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Maps", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": "0.01" + }, + "datasource": "MySQL", + "fieldConfig": { + "defaults": { + "custom": { + "align": null + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 91 + }, + "id": 33, + "interval": null, + "legend": { + "percentage": true, + "show": true, + "values": true + }, + "legendType": "Right side", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "pluginVersion": "7.1.0", + "strokeWidth": 1, + "targets": [ + { + "alias": "Non-Teamkills", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "metricColumn": "weapon", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \n COUNT(\"victimName\") \nFROM \"DBLog_Wounds\" \nWHERE \n $timeFilter AND\n server = '$SERVER_ID' AND\n teamkill = false", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(time,$__interval),\n weapon AS metric,\n count(id) AS \"Wounds\"\nFROM DBLog_Wounds\nWHERE\n $__timeFilter(time) AND\n server = \"$SERVER_ID\"\nGROUP BY 2\nORDER BY count(id) DESC", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "id" + ], + "type": "column" + }, + { + "params": [ + "count" + ], + "type": "aggregate" + }, + { + "params": [ + "Wounds" + ], + "type": "alias" + } + ] + ], + "table": "DBLog_Wounds", + "tags": [], + "timeColumn": "time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Weapons", + "type": "grafana-piechart-panel", + "valueName": "current" + } + ], + "refresh": false, + "schemaVersion": 26, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "text": "1", + "value": "1" + }, + "hide": 0, + "includeAll": false, + "label": "Server", + "multi": false, + "name": "SERVER_ID", + "options": [ + { + "selected": true, + "text": "1", + "value": "1" + }, + { + "selected": false, + "text": "2", + "value": "2" + } + ], + "query": "1,2", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "selected": false, + "text": "1m", + "value": "1m" + }, + "hide": 0, + "label": "Interval", + "name": "INTERVAL", + "options": [ + { + "selected": true, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "2m", + "value": "2m" + }, + { + "selected": false, + "text": "3m", + "value": "3m" + }, + { + "selected": false, + "text": "4m", + "value": "4m" + }, + { + "selected": false, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "20m", + "value": "20m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + } + ], + "query": "1m,2m,3m,4m,5m,10m,20m,30m", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Server Overview", + "uid": "n7Xl7jEWx", + "version": 4 + } \ No newline at end of file From 2827fc11ab92ea0125e2cfb008b252a0c6e8cbf7 Mon Sep 17 00:00:00 2001 From: got2bhockey Date: Sun, 28 Feb 2021 00:04:16 +0000 Subject: [PATCH 3/4] ESLint & README Generation --- README.md | 560 ++++++++++++++++++++++++++-------------------------- config.json | 164 +++++++-------- 2 files changed, 362 insertions(+), 362 deletions(-) diff --git a/README.md b/README.md index 108b494..19c3ef4 100644 --- a/README.md +++ b/README.md @@ -268,21 +268,75 @@ The following is a list of plugins built into SquadJS, you can click their title Interested in creating your own plugin? [See more here](./squad-server/plugins/readme.md)
- DiscordSubsystemRestarter -

DiscordSubsystemRestarter

-

The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

  • !squadjs restartsubsystem rcon
  • !squadjs restartsubsystem logparser

+ DiscordRoundWinner +

DiscordRoundWinner

+

The DiscordRoundWinner plugin will send the round winner to a Discord channel.

Options

  • discordClient (Required)

    Description

    Discord connector name.

    Default
    discord
  • -
  • role (Required)

    +
  • channelID (Required)

    Description
    -

    ID of role required to run the sub system restart commands.

    +

    The ID of the channel to log admin broadcasts to.

    Default
  • Example
    -
    667741905228136459
+
667741905228136459
+
  • color

    +
    Description
    +

    The color of the embed.

    +
    Default
    +
    16761867
  • +
    + +
    + DiscordAdminCamLogs +

    DiscordAdminCamLogs

    +

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log admin camera usage to.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    + +
    + DiscordDebug +

    DiscordDebug

    +

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log events to.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • events (Required)

      +
      Description
      +

      A list of events to dump.

      +
      Default
      +
      []
    • Example
      +
      [
      +  "PLAYER_DIED"
      +]
    @@ -324,26 +378,56 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - DiscordAdminBroadcast -

    DiscordAdminBroadcast

    -

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    +

    Options

    +
    • broadcasts

      +
      Description
      +

      Messages to broadcast.

      +
      Default
      +
      []
    • Example
      +
      [
      +  "This server is powered by SquadJS."
      +]
      +
    • interval

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    +
    + +
    + DiscordServerStatus +

    DiscordServerStatus

    +

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • channelID (Required)

      +
    • messageIDs (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      ID of messages to update.

      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      +
      []
    • Example
      +
      [
      +  {
      +    "channelID": "667741905228136459",
      +    "messageID": "766688383043895387"
      +  }
      +]
      +
    • updateInterval

      Description
      -

      The color of the embed.

      +

      How frequently to update the status in Discord.

      Default
      -
      16761867
    +
    60000
    +
  • disableStatus

    +
    Description
    +

    Disable the bot status.

    +
    Default
    +
    false
  • @@ -404,34 +488,190 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - DiscordServerStatus -

    DiscordServerStatus

    -

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    + ChatCommands +

    ChatCommands

    +

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    +

    Options

    +
    • commands

      +
      Description
      +

      An array of objects containing the following properties:

      • command - The command that initiates the message.
      • type - Either warn or broadcast.
      • response - The message to respond with.
      • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

      +
      Default
      +
      [
      +  {
      +    "command": "squadjs",
      +    "type": "warn",
      +    "response": "This server is powered by SquadJS.",
      +    "ignoreChats": []
      +  }
      +]
    +
    + +
    + AutoTKWarn +

    AutoTKWarn

    +

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    +

    Options

    +
    • message

      +
      Description
      +

      The message to warn players with.

      +
      Default
      +
      Please apologise for ALL TKs in ALL chat!
    +
    + +
    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • messageIDs (Required)

      +
    • channelID (Required)

      Description
      -

      ID of messages to update.

      +

      The ID of the channel to log admin broadcasts to.

      Default
      -
      []
    • Example
      -
      [
      -  {
      -    "channelID": "667741905228136459",
      -    "messageID": "766688383043895387"
      -  }
      -]
      -
    • updateInterval

      +
    • Example
      +
      667741905228136459
      +
    • color

      Description
      -

      How frequently to update the status in Discord.

      +

      The color of the embed.

      Default
      -
      60000
    • -
    • disableStatus

      +
      16761867
    +
    + +
    + SeedingMode +

    SeedingMode

    +

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    +

    Options

    +
    • interval

      Description
      -

      Disable the bot status.

      +

      Frequency of seeding messages in milliseconds.

      +
      Default
      +
      150000
    • +
    • seedingThreshold

      +
      Description
      +

      Player count required for server not to be in seeding mode.

      +
      Default
      +
      50
    • +
    • seedingMessage

      +
      Description
      +

      Seeding message to display.

      +
      Default
      +
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • +
    • liveEnabled

      +
      Description
      +

      Enable "Live" messages for when the server goes live.

      +
      Default
      +
      true
    • +
    • liveThreshold

      +
      Description
      +

      Player count required for "Live" messages to not bee displayed.

      +
      Default
      +
      52
    • +
    • liveMessage

      +
      Description
      +

      "Live" message to display.

      +
      Default
      +
      Live!
    +
    + +
    + SCBLInfo +

    SCBLInfo

    +

    The SCBLInfo plugin alerts admins when a harmful player is detected joining their server based on data from the Squad Community Ban List.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to alert admins through.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • threshold

      +
      Description
      +

      Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the Squad Community Ban List's FAQ

      +
      Default
      +
      6
    +
    + +
    + TeamRandomizer +

    TeamRandomizer

    +

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    +

    Options

    +
    • command

      +
      Description
      +

      The command used to randomize the teams.

      +
      Default
      +
      randomize
    +
    + +
    + DiscordRcon +

    DiscordRcon

    +

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      ID of channel to turn into RCON console.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • permissions

      +
      Description
      +

      +
      Default
      +
      {}
    • Example
      +
      {
      +  "123456789123456789": [
      +    "AdminBroadcast",
      +    "AdminForceTeamChange",
      +    "AdminDemoteCommander"
      +  ]
      +}
      +
    • prependAdminNameInBroadcast

      +
      Description
      +

      Prepend admin names when making announcements.

      +
      Default
      +
      false
    +
    + +
    + DiscordTeamkill +

    DiscordTeamkill

    +

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log teamkills to.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embeds.

      +
      Default
      +
      16761867
    • +
    • disableSCBL

      +
      Description
      +

      Disable Squad Community Ban List information.

      Default
      false
    @@ -484,126 +724,21 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - DiscordDebug -

    DiscordDebug

    -

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.

    + DiscordSubsystemRestarter +

    DiscordSubsystemRestarter

    +

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • channelID (Required)

      +
    • role (Required)

      Description
      -

      The ID of the channel to log events to.

      +

      ID of role required to run the sub system restart commands.

      Default
    • Example
      -
      667741905228136459
      -
    • events (Required)

      -
      Description
      -

      A list of events to dump.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "PLAYER_DIED"
      -]
    -
    - -
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    -

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "This server is powered by SquadJS."
      -]
      -
    • interval

      -
      Description
      -

      Frequency of the broadcasts in milliseconds.

      -
      Default
      -
      300000
    -
    - -
    - DiscordTeamkill -

    DiscordTeamkill

    -

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log teamkills to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embeds.

      -
      Default
      -
      16761867
    • -
    • disableSCBL

      -
      Description
      -

      Disable Squad Community Ban List information.

      -
      Default
      -
      false
    -
    - -
    - SeedingMode -

    SeedingMode

    -

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    -

    Options

    -
    • interval

      -
      Description
      -

      Frequency of seeding messages in milliseconds.

      -
      Default
      -
      150000
    • -
    • seedingThreshold

      -
      Description
      -

      Player count required for server not to be in seeding mode.

      -
      Default
      -
      50
    • -
    • seedingMessage

      -
      Description
      -

      Seeding message to display.

      -
      Default
      -
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • -
    • liveEnabled

      -
      Description
      -

      Enable "Live" messages for when the server goes live.

      -
      Default
      -
      true
    • -
    • liveThreshold

      -
      Description
      -

      Player count required for "Live" messages to not bee displayed.

      -
      Default
      -
      52
    • -
    • liveMessage

      -
      Description
      -

      "Live" message to display.

      -
      Default
      -
      Live!
    -
    - -
    - AutoTKWarn -

    AutoTKWarn

    -

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    -

    Options

    -
    • message

      -
      Description
      -

      The message to warn players with.

      -
      Default
      -
      Please apologise for ALL TKs in ALL chat!
    +
    667741905228136459
    @@ -615,7 +750,7 @@ Grafana (NOT YET WORKING WITH V2):
    • Grafana is a cool way of viewing server statistics stored in the database.
    • Install Grafana.
    • Add your database as a datasource named SquadJS.
    • -
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • +
    • Import the SquadJS Dashboard to get a preconfigured MySQL only Grafana dashboard.
    • Install any missing Grafana plugins.

    Options

    • database (Required)

      @@ -630,141 +765,6 @@ Grafana (NOT YET WORKING WITH V2):
      null
    -
    - DiscordRoundWinner -

    DiscordRoundWinner

    -

    The DiscordRoundWinner plugin will send the round winner to a Discord channel.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin broadcasts to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - ChatCommands -

    ChatCommands

    -

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    -

    Options

    -
    • commands

      -
      Description
      -

      An array of objects containing the following properties:

      • command - The command that initiates the message.
      • type - Either warn or broadcast.
      • response - The message to respond with.
      • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

      -
      Default
      -
      [
      -  {
      -    "command": "squadjs",
      -    "type": "warn",
      -    "response": "This server is powered by SquadJS.",
      -    "ignoreChats": []
      -  }
      -]
    -
    - -
    - DiscordAdminCamLogs -

    DiscordAdminCamLogs

    -

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin camera usage to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - DiscordRcon -

    DiscordRcon

    -

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      ID of channel to turn into RCON console.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • permissions

      -
      Description
      -

      -
      Default
      -
      {}
    • Example
      -
      {
      -  "123456789123456789": [
      -    "AdminBroadcast",
      -    "AdminForceTeamChange",
      -    "AdminDemoteCommander"
      -  ]
      -}
      -
    • prependAdminNameInBroadcast

      -
      Description
      -

      Prepend admin names when making announcements.

      -
      Default
      -
      false
    -
    - -
    - TeamRandomizer -

    TeamRandomizer

    -

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    -

    Options

    -
    • command

      -
      Description
      -

      The command used to randomize the teams.

      -
      Default
      -
      randomize
    -
    - -
    - SCBLInfo -

    SCBLInfo

    -

    The SCBLInfo plugin alerts admins when a harmful player is detected joining their server based on data from the Squad Community Ban List.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to alert admins through.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • threshold

      -
      Description
      -

      Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the Squad Community Ban List's FAQ

      -
      Default
      -
      6
    -
    -
    ## Statement on Accuracy diff --git a/config.json b/config.json index 9043cc9..a94ffcc 100644 --- a/config.json +++ b/config.json @@ -33,10 +33,25 @@ }, "plugins": [ { - "plugin": "DiscordSubsystemRestarter", + "plugin": "DiscordRoundWinner", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, + { + "plugin": "DiscordAdminCamLogs", "enabled": false, "discordClient": "discord", - "role": "" + "channelID": "", + "color": 16761867 + }, + { + "plugin": "DiscordDebug", + "enabled": false, + "discordClient": "discord", + "channelID": "", + "events": [] }, { "plugin": "DiscordChat", @@ -50,11 +65,18 @@ ] }, { - "plugin": "DiscordAdminBroadcast", + "plugin": "IntervalledBroadcasts", + "enabled": false, + "broadcasts": [], + "interval": 300000 + }, + { + "plugin": "DiscordServerStatus", "enabled": false, "discordClient": "discord", - "channelID": "", - "color": 16761867 + "messageIDs": [], + "updateInterval": 60000, + "disableStatus": false }, { "plugin": "DiscordAdminRequest", @@ -68,75 +90,6 @@ "pingDelay": 60000, "color": 16761867 }, - { - "plugin": "DiscordServerStatus", - "enabled": false, - "discordClient": "discord", - "messageIDs": [], - "updateInterval": 60000, - "disableStatus": false - }, - { - "plugin": "AutoKickUnassigned", - "enabled": true, - "warningMessage": "Join a squad, you are are unassigned and will be kicked", - "kickMessage": "Unassigned - automatically removed", - "frequencyOfWarnings": 30, - "unassignedTimer": 360, - "playerThreshold": 93, - "roundStartDelay": 900, - "ignoreAdmins": false, - "ignoreWhitelist": false - }, - { - "plugin": "DiscordDebug", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "events": [] - }, - { - "plugin": "IntervalledBroadcasts", - "enabled": false, - "broadcasts": [], - "interval": 300000 - }, - { - "plugin": "DiscordTeamkill", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867, - "disableSCBL": false - }, - { - "plugin": "SeedingMode", - "enabled": true, - "interval": 150000, - "seedingThreshold": 50, - "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", - "liveEnabled": true, - "liveThreshold": 52, - "liveMessage": "Live!" - }, - { - "plugin": "AutoTKWarn", - "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" - }, - { - "plugin": "DBLog", - "enabled": false, - "database": "mysql", - "overrideServerID": null - }, - { - "plugin": "DiscordRoundWinner", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, { "plugin": "ChatCommands", "enabled": true, @@ -150,12 +103,39 @@ ] }, { - "plugin": "DiscordAdminCamLogs", + "plugin": "AutoTKWarn", + "enabled": true, + "message": "Please apologise for ALL TKs in ALL chat!" + }, + { + "plugin": "DiscordAdminBroadcast", "enabled": false, "discordClient": "discord", "channelID": "", "color": 16761867 }, + { + "plugin": "SeedingMode", + "enabled": true, + "interval": 150000, + "seedingThreshold": 50, + "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", + "liveEnabled": true, + "liveThreshold": 52, + "liveMessage": "Live!" + }, + { + "plugin": "SCBLInfo", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "threshold": 6 + }, + { + "plugin": "TeamRandomizer", + "enabled": true, + "command": "randomize" + }, { "plugin": "DiscordRcon", "enabled": false, @@ -165,16 +145,36 @@ "prependAdminNameInBroadcast": false }, { - "plugin": "TeamRandomizer", - "enabled": true, - "command": "randomize" - }, - { - "plugin": "SCBLInfo", + "plugin": "DiscordTeamkill", "enabled": true, "discordClient": "discord", "channelID": "", - "threshold": 6 + "color": 16761867, + "disableSCBL": false + }, + { + "plugin": "AutoKickUnassigned", + "enabled": true, + "warningMessage": "Join a squad, you are are unassigned and will be kicked", + "kickMessage": "Unassigned - automatically removed", + "frequencyOfWarnings": 30, + "unassignedTimer": 360, + "playerThreshold": 93, + "roundStartDelay": 900, + "ignoreAdmins": false, + "ignoreWhitelist": false + }, + { + "plugin": "DiscordSubsystemRestarter", + "enabled": false, + "discordClient": "discord", + "role": "" + }, + { + "plugin": "DBLog", + "enabled": false, + "database": "mysql", + "overrideServerID": null } ], "logger": { From 859168ae2cc161224bae173ea3d63054388b6b7c Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Sun, 28 Feb 2021 00:27:50 +0000 Subject: [PATCH 4/4] ESLint & README Generation --- README.md | 564 ++++++++++++++++++++++++++-------------------------- config.json | 164 +++++++-------- 2 files changed, 364 insertions(+), 364 deletions(-) diff --git a/README.md b/README.md index a471aa7..f6e3868 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ SquadJS relies on being able to access the Squad server log directory in order t #### Prerequisites * Git - * [Node.js](https://nodejs.org/en/) (14.x) - [Download](https://nodejs.org/en/) + * [Node.js](https://nodejs.org/en/) (Current) - [Download](https://nodejs.org/en/) * [Yarn](https://yarnpkg.com/) (Version 1.22.0+) - [Download](https://classic.yarnpkg.com/en/docs/install) * Some plugins may have additional requirements. @@ -268,75 +268,21 @@ The following is a list of plugins built into SquadJS, you can click their title Interested in creating your own plugin? [See more here](./squad-server/plugins/readme.md)
    - DiscordRoundWinner -

    DiscordRoundWinner

    -

    The DiscordRoundWinner plugin will send the round winner to a Discord channel.

    + DiscordSubsystemRestarter +

    DiscordSubsystemRestarter

    +

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • channelID (Required)

      +
    • role (Required)

      Description
      -

      The ID of the channel to log admin broadcasts to.

      +

      ID of role required to run the sub system restart commands.

      Default
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - DiscordAdminCamLogs -

    DiscordAdminCamLogs

    -

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin camera usage to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - DiscordDebug -

    DiscordDebug

    -

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log events to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • events (Required)

      -
      Description
      -

      A list of events to dump.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "PLAYER_DIED"
      -]
    +
    667741905228136459
    @@ -378,56 +324,26 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - IntervalledBroadcasts -

    IntervalledBroadcasts

    -

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    -

    Options

    -
    • broadcasts

      -
      Description
      -

      Messages to broadcast.

      -
      Default
      -
      []
    • Example
      -
      [
      -  "This server is powered by SquadJS."
      -]
      -
    • interval

      -
      Description
      -

      Frequency of the broadcasts in milliseconds.

      -
      Default
      -
      300000
    -
    - -
    - DiscordServerStatus -

    DiscordServerStatus

    -

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    + DiscordAdminBroadcast +

    DiscordAdminBroadcast

    +

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • messageIDs (Required)

      +
    • channelID (Required)

      Description
      -

      ID of messages to update.

      +

      The ID of the channel to log admin broadcasts to.

      Default
      -
      []
    • Example
      -
      [
      -  {
      -    "channelID": "667741905228136459",
      -    "messageID": "766688383043895387"
      -  }
      -]
      -
    • updateInterval

      +
    • Example
      +
      667741905228136459
      +
    • color

      Description
      -

      How frequently to update the status in Discord.

      +

      The color of the embed.

      Default
      -
      60000
    • -
    • disableStatus

      -
      Description
      -

      Disable the bot status.

      -
      Default
      -
      false
    +
    16761867
    @@ -488,190 +404,34 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - ChatCommands -

    ChatCommands

    -

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    + DiscordServerStatus +

    DiscordServerStatus

    +

    The DiscordServerStatus plugin updates a message in Discord with current server information, e.g. player count.

    Options

    -
    • commands

      +
      • discordClient (Required)

        Description
        -

        An array of objects containing the following properties:

        • command - The command that initiates the message.
        • type - Either warn or broadcast.
        • response - The message to respond with.
        • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

        +

        Discord connector name.

        Default
        +
        discord
      • +
      • messageIDs (Required)

        +
        Description
        +

        ID of messages to update.

        +
        Default
        +
        []
      • Example
        [
           {
        -    "command": "squadjs",
        -    "type": "warn",
        -    "response": "This server is powered by SquadJS.",
        -    "ignoreChats": []
        +    "channelID": "667741905228136459",
        +    "messageID": "766688383043895387"
           }
        -]
      -
    - -
    - AutoTKWarn -

    AutoTKWarn

    -

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    -

    Options

    -
    • message

      +] +
    • updateInterval

      Description
      -

      The message to warn players with.

      +

      How frequently to update the status in Discord.

      Default
      -
      Please apologise for ALL TKs in ALL chat!
    -
    - -
    - DiscordAdminBroadcast -

    DiscordAdminBroadcast

    -

    The DiscordAdminBroadcast plugin will send a copy of admin broadcasts made in game to a Discord channel.

    -

    Options

    -
    • discordClient (Required)

      +
      60000
    • +
    • disableStatus

      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log admin broadcasts to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embed.

      -
      Default
      -
      16761867
    -
    - -
    - SeedingMode -

    SeedingMode

    -

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    -

    Options

    -
    • interval

      -
      Description
      -

      Frequency of seeding messages in milliseconds.

      -
      Default
      -
      150000
    • -
    • seedingThreshold

      -
      Description
      -

      Player count required for server not to be in seeding mode.

      -
      Default
      -
      50
    • -
    • seedingMessage

      -
      Description
      -

      Seeding message to display.

      -
      Default
      -
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • -
    • liveEnabled

      -
      Description
      -

      Enable "Live" messages for when the server goes live.

      -
      Default
      -
      true
    • -
    • liveThreshold

      -
      Description
      -

      Player count required for "Live" messages to not bee displayed.

      -
      Default
      -
      52
    • -
    • liveMessage

      -
      Description
      -

      "Live" message to display.

      -
      Default
      -
      Live!
    -
    - -
    - SCBLInfo -

    SCBLInfo

    -

    The SCBLInfo plugin alerts admins when a harmful player is detected joining their server based on data from the Squad Community Ban List.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to alert admins through.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • threshold

      -
      Description
      -

      Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the Squad Community Ban List's FAQ

      -
      Default
      -
      6
    -
    - -
    - TeamRandomizer -

    TeamRandomizer

    -

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    -

    Options

    -
    • command

      -
      Description
      -

      The command used to randomize the teams.

      -
      Default
      -
      randomize
    -
    - -
    - DiscordRcon -

    DiscordRcon

    -

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      ID of channel to turn into RCON console.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • permissions

      -
      Description
      -

      -
      Default
      -
      {}
    • Example
      -
      {
      -  "123456789123456789": [
      -    "AdminBroadcast",
      -    "AdminForceTeamChange",
      -    "AdminDemoteCommander"
      -  ]
      -}
      -
    • prependAdminNameInBroadcast

      -
      Description
      -

      Prepend admin names when making announcements.

      -
      Default
      -
      false
    -
    - -
    - DiscordTeamkill -

    DiscordTeamkill

    -

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    -

    Options

    -
    • discordClient (Required)

      -
      Description
      -

      Discord connector name.

      -
      Default
      -
      discord
    • -
    • channelID (Required)

      -
      Description
      -

      The ID of the channel to log teamkills to.

      -
      Default
      -
    • Example
      -
      667741905228136459
      -
    • color

      -
      Description
      -

      The color of the embeds.

      -
      Default
      -
      16761867
    • -
    • disableSCBL

      -
      Description
      -

      Disable Squad Community Ban List information.

      +

      Disable the bot status.

      Default
      false
    @@ -724,21 +484,126 @@ Interested in creating your own plugin? [See more here](./squad-server/plugins/r
    - DiscordSubsystemRestarter -

    DiscordSubsystemRestarter

    -

    The DiscordSubSystemRestarter plugin allows you to manually restart SquadJS subsystems in case an issues arises with them.

    • !squadjs restartsubsystem rcon
    • !squadjs restartsubsystem logparser

    + DiscordDebug +

    DiscordDebug

    +

    The DiscordDebug plugin can be used to help debug SquadJS by dumping SquadJS events to a Discord channel.

    Options

    • discordClient (Required)

      Description

      Discord connector name.

      Default
      discord
    • -
    • role (Required)

      +
    • channelID (Required)

      Description
      -

      ID of role required to run the sub system restart commands.

      +

      The ID of the channel to log events to.

      Default
    • Example
      -
      667741905228136459
    +
    667741905228136459
    +
  • events (Required)

    +
    Description
    +

    A list of events to dump.

    +
    Default
    +
    []
  • Example
    +
    [
    +  "PLAYER_DIED"
    +]
    +
    + +
    + IntervalledBroadcasts +

    IntervalledBroadcasts

    +

    The IntervalledBroadcasts plugin allows you to set broadcasts, which will be broadcasted at preset intervals

    +

    Options

    +
    • broadcasts

      +
      Description
      +

      Messages to broadcast.

      +
      Default
      +
      []
    • Example
      +
      [
      +  "This server is powered by SquadJS."
      +]
      +
    • interval

      +
      Description
      +

      Frequency of the broadcasts in milliseconds.

      +
      Default
      +
      300000
    +
    + +
    + DiscordTeamkill +

    DiscordTeamkill

    +

    The DiscordTeamkill plugin logs teamkills and related information to a Discord channel for admins to review.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log teamkills to.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embeds.

      +
      Default
      +
      16761867
    • +
    • disableSCBL

      +
      Description
      +

      Disable Squad Community Ban List information.

      +
      Default
      +
      false
    +
    + +
    + SeedingMode +

    SeedingMode

    +

    The SeedingMode plugin broadcasts seeding rule messages to players at regular intervals when the server is below a specified player count. It can also be configured to display "Live" messages when the server goes live.

    +

    Options

    +
    • interval

      +
      Description
      +

      Frequency of seeding messages in milliseconds.

      +
      Default
      +
      150000
    • +
    • seedingThreshold

      +
      Description
      +

      Player count required for server not to be in seeding mode.

      +
      Default
      +
      50
    • +
    • seedingMessage

      +
      Description
      +

      Seeding message to display.

      +
      Default
      +
      Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!
    • +
    • liveEnabled

      +
      Description
      +

      Enable "Live" messages for when the server goes live.

      +
      Default
      +
      true
    • +
    • liveThreshold

      +
      Description
      +

      Player count required for "Live" messages to not bee displayed.

      +
      Default
      +
      52
    • +
    • liveMessage

      +
      Description
      +

      "Live" message to display.

      +
      Default
      +
      Live!
    +
    + +
    + AutoTKWarn +

    AutoTKWarn

    +

    The AutoTkWarn plugin will automatically warn players with a message when they teamkill.

    +

    Options

    +
    • message

      +
      Description
      +

      The message to warn players with.

      +
      Default
      +
      Please apologise for ALL TKs in ALL chat!
    @@ -765,6 +630,141 @@ Grafana (NOT YET WORKING WITH V2):
    null
    +
    + DiscordRoundWinner +

    DiscordRoundWinner

    +

    The DiscordRoundWinner plugin will send the round winner to a Discord channel.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log admin broadcasts to.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    + +
    + ChatCommands +

    ChatCommands

    +

    The ChatCommands plugin can be configured to make chat commands that broadcast or warn the caller with present messages.

    +

    Options

    +
    • commands

      +
      Description
      +

      An array of objects containing the following properties:

      • command - The command that initiates the message.
      • type - Either warn or broadcast.
      • response - The message to respond with.
      • ignoreChats - A list of chats to ignore the commands in. Use this to limit it to admins.

      +
      Default
      +
      [
      +  {
      +    "command": "squadjs",
      +    "type": "warn",
      +    "response": "This server is powered by SquadJS.",
      +    "ignoreChats": []
      +  }
      +]
    +
    + +
    + DiscordAdminCamLogs +

    DiscordAdminCamLogs

    +

    The DiscordAdminCamLogs plugin will log in game admin camera usage to a Discord channel.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to log admin camera usage to.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • color

      +
      Description
      +

      The color of the embed.

      +
      Default
      +
      16761867
    +
    + +
    + DiscordRcon +

    DiscordRcon

    +

    The DiscordRcon plugin allows a specified Discord channel to be used as a RCON console to run RCON commands.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      ID of channel to turn into RCON console.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • permissions

      +
      Description
      +

      +
      Default
      +
      {}
    • Example
      +
      {
      +  "123456789123456789": [
      +    "AdminBroadcast",
      +    "AdminForceTeamChange",
      +    "AdminDemoteCommander"
      +  ]
      +}
      +
    • prependAdminNameInBroadcast

      +
      Description
      +

      Prepend admin names when making announcements.

      +
      Default
      +
      false
    +
    + +
    + TeamRandomizer +

    TeamRandomizer

    +

    The TeamRandomizer can be used to randomize teams. It's great for destroying clan stacks or for social events. It can be run by typing, by default, !randomize into in-game admin chat

    +

    Options

    +
    • command

      +
      Description
      +

      The command used to randomize the teams.

      +
      Default
      +
      randomize
    +
    + +
    + SCBLInfo +

    SCBLInfo

    +

    The SCBLInfo plugin alerts admins when a harmful player is detected joining their server based on data from the Squad Community Ban List.

    +

    Options

    +
    • discordClient (Required)

      +
      Description
      +

      Discord connector name.

      +
      Default
      +
      discord
    • +
    • channelID (Required)

      +
      Description
      +

      The ID of the channel to alert admins through.

      +
      Default
      +
    • Example
      +
      667741905228136459
      +
    • threshold

      +
      Description
      +

      Admins will be alerted when a player has this or more reputation points. For more information on reputation points, see the Squad Community Ban List's FAQ

      +
      Default
      +
      6
    +
    +
    ## Statement on Accuracy diff --git a/config.json b/config.json index a94ffcc..9043cc9 100644 --- a/config.json +++ b/config.json @@ -33,25 +33,10 @@ }, "plugins": [ { - "plugin": "DiscordRoundWinner", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "plugin": "DiscordAdminCamLogs", + "plugin": "DiscordSubsystemRestarter", "enabled": false, "discordClient": "discord", - "channelID": "", - "color": 16761867 - }, - { - "plugin": "DiscordDebug", - "enabled": false, - "discordClient": "discord", - "channelID": "", - "events": [] + "role": "" }, { "plugin": "DiscordChat", @@ -65,18 +50,11 @@ ] }, { - "plugin": "IntervalledBroadcasts", - "enabled": false, - "broadcasts": [], - "interval": 300000 - }, - { - "plugin": "DiscordServerStatus", + "plugin": "DiscordAdminBroadcast", "enabled": false, "discordClient": "discord", - "messageIDs": [], - "updateInterval": 60000, - "disableStatus": false + "channelID": "", + "color": 16761867 }, { "plugin": "DiscordAdminRequest", @@ -90,6 +68,75 @@ "pingDelay": 60000, "color": 16761867 }, + { + "plugin": "DiscordServerStatus", + "enabled": false, + "discordClient": "discord", + "messageIDs": [], + "updateInterval": 60000, + "disableStatus": false + }, + { + "plugin": "AutoKickUnassigned", + "enabled": true, + "warningMessage": "Join a squad, you are are unassigned and will be kicked", + "kickMessage": "Unassigned - automatically removed", + "frequencyOfWarnings": 30, + "unassignedTimer": 360, + "playerThreshold": 93, + "roundStartDelay": 900, + "ignoreAdmins": false, + "ignoreWhitelist": false + }, + { + "plugin": "DiscordDebug", + "enabled": false, + "discordClient": "discord", + "channelID": "", + "events": [] + }, + { + "plugin": "IntervalledBroadcasts", + "enabled": false, + "broadcasts": [], + "interval": 300000 + }, + { + "plugin": "DiscordTeamkill", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "color": 16761867, + "disableSCBL": false + }, + { + "plugin": "SeedingMode", + "enabled": true, + "interval": 150000, + "seedingThreshold": 50, + "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", + "liveEnabled": true, + "liveThreshold": 52, + "liveMessage": "Live!" + }, + { + "plugin": "AutoTKWarn", + "enabled": true, + "message": "Please apologise for ALL TKs in ALL chat!" + }, + { + "plugin": "DBLog", + "enabled": false, + "database": "mysql", + "overrideServerID": null + }, + { + "plugin": "DiscordRoundWinner", + "enabled": true, + "discordClient": "discord", + "channelID": "", + "color": 16761867 + }, { "plugin": "ChatCommands", "enabled": true, @@ -103,39 +150,12 @@ ] }, { - "plugin": "AutoTKWarn", - "enabled": true, - "message": "Please apologise for ALL TKs in ALL chat!" - }, - { - "plugin": "DiscordAdminBroadcast", + "plugin": "DiscordAdminCamLogs", "enabled": false, "discordClient": "discord", "channelID": "", "color": 16761867 }, - { - "plugin": "SeedingMode", - "enabled": true, - "interval": 150000, - "seedingThreshold": 50, - "seedingMessage": "Seeding Rules Active! Fight only over the middle flags! No FOB Hunting!", - "liveEnabled": true, - "liveThreshold": 52, - "liveMessage": "Live!" - }, - { - "plugin": "SCBLInfo", - "enabled": true, - "discordClient": "discord", - "channelID": "", - "threshold": 6 - }, - { - "plugin": "TeamRandomizer", - "enabled": true, - "command": "randomize" - }, { "plugin": "DiscordRcon", "enabled": false, @@ -145,36 +165,16 @@ "prependAdminNameInBroadcast": false }, { - "plugin": "DiscordTeamkill", + "plugin": "TeamRandomizer", + "enabled": true, + "command": "randomize" + }, + { + "plugin": "SCBLInfo", "enabled": true, "discordClient": "discord", "channelID": "", - "color": 16761867, - "disableSCBL": false - }, - { - "plugin": "AutoKickUnassigned", - "enabled": true, - "warningMessage": "Join a squad, you are are unassigned and will be kicked", - "kickMessage": "Unassigned - automatically removed", - "frequencyOfWarnings": 30, - "unassignedTimer": 360, - "playerThreshold": 93, - "roundStartDelay": 900, - "ignoreAdmins": false, - "ignoreWhitelist": false - }, - { - "plugin": "DiscordSubsystemRestarter", - "enabled": false, - "discordClient": "discord", - "role": "" - }, - { - "plugin": "DBLog", - "enabled": false, - "database": "mysql", - "overrideServerID": null + "threshold": 6 } ], "logger": {