diff --git a/7cavChat.txt b/7cavChat.txt deleted file mode 100644 index bb80912..0000000 --- a/7cavChat.txt +++ /dev/null @@ -1,68 +0,0 @@ -Jarvis — Today at 8:23 PM -@EagleTrooper let's use this instead -to save blowing up the recruiters notifications -on recruitment -EagleTrooper — Today at 8:23 PM -Yeah keep the recruitment clean. I understand Im a recruiter / NCO / admin for the community in involved in. -Alright, -I am working on developing a dashboard that gives historical stats with our server as well as our missions that run Performance / FPS / Memory Usage / etc. During my research i came across your groups Repo and it appears that you are doing something very similar to what I wanted to do. I did read through just to get an idea unfortunately there was some gaps in the implementation and i was hoping to speak to someone about how it was done with your group as well as if they would be so kind as to provide pointers and insight so that I may implement something very similar. -Jarvis — Today at 8:26 PM -Do you know how to setup a Grafana/InfluxDB stack? -EagleTrooper — Today at 8:27 PM -Already have it setup (Background in IT and Cloud Network Engineering). -Sweetwater.I — Today at 8:27 PM -u can see our dashboard here if u wanna see what cavmetrics extension is outputting. -https://metrics.7cav.us/d/NED-gV3Mz/arma3?orgId=1&refresh=10s -Jarvis — Today at 8:28 PM -It's basically just arma -> influx -> grafana -Sweetwater.I — Today at 8:28 PM -but yeah, influxdb+grafana is what we do -Jarvis — Today at 8:28 PM -The cavmetrics addon you see is the arma extension -EagleTrooper — Today at 8:28 PM -Yep understood the workflow and that was very clear. I believe the piece im missing or dont understand is the dll creation / implementation -Jarvis — Today at 8:28 PM -If you know influx/grafana, you're 2/3rds of the way there - -Just git clone the cavmetrics repo -EagleTrooper — Today at 8:29 PM -I believe it was the Arma-Influx? -That was the piece that i was not clear on. Unless i was misunderstanding it still required a compiled DLL -Jarvis — Today at 8:29 PM -the a3_influx dll is inside of the git repo -so == a DLL but linux -we run our servers on linux -EagleTrooper — Today at 8:30 PM -Unfortuantly it looks like its a .so -Sweetwater.I — Today at 8:30 PM -use the arma-influx repo to build the extension -EagleTrooper — Today at 8:30 PM -Yeah we have windows :/ -Sweetwater.I — Today at 8:30 PM -cavmetrics is what we called the packaged extension. -on the repo -Jarvis — Today at 8:30 PM -https://github.com/7Cav/Arma-Influx -GitHub -GitHub - 7Cav/Arma-Influx: Arma Extension for sending metrics to In... -Arma Extension for sending metrics to InfluxDB. Contribute to 7Cav/Arma-Influx development by creating an account on GitHub. - -Just compile that for dll -it's an arma ext written in go -Liber.N — Today at 8:31 PM -Cavmetrics is an arma addon thats calls to arma influx extension -Jarvis — Today at 8:31 PM -you'll need to change the makefile on that repo tho -EagleTrooper — Today at 8:32 PM -does it need to be labeld armago? or a3influx? -If that is what your referring to then it appears i do have an understanding of it and something else is missing outside of my imediate understanding and may not have anything you can provide input on. I will review the implementation again and see if I can get any further. -I do appreciate the input and help. -Jarvis — Today at 8:35 PM -no probs, it's a long road but found it worth it in the end - -https://metrics.7cav.us/ -Specifically - https://metrics.7cav.us/d/NED-gV3Mz/arma3?orgId=1&refresh=10s -EagleTrooper — Today at 8:36 PM -I will take a look! Keep on Keeping on and again I appreciate the friendly response! -Jarvis — Today at 8:36 PM -You'll need to update these for your influx db host - https://github.com/7Cav/cav_metrics/blob/dev/%40CavMetrics/addons/CavMetrics/functions/fn_send.sqf#L9-L12 \ No newline at end of file diff --git a/@RangerMetrics/addons/RangerMetrics/functions/callbackHandlers/fn_callbackHandler.sqf b/@RangerMetrics/addons/RangerMetrics/functions/callbackHandlers/fn_callbackHandler.sqf index ce21b03..61092d9 100644 --- a/@RangerMetrics/addons/RangerMetrics/functions/callbackHandlers/fn_callbackHandler.sqf +++ b/@RangerMetrics/addons/RangerMetrics/functions/callbackHandlers/fn_callbackHandler.sqf @@ -31,7 +31,6 @@ try { switch (_function) do { case "deinitExtension": { - diag_log format ["RangerMetrics: deinitExtension: %1", _response]; // Our first call is deinitExtension. When we received a single "true" value, we can then run init processes for the extension connections. if ((_response select 0) isEqualTo true) then { "RangerMetrics" callExtension "initExtension"; @@ -46,6 +45,39 @@ switch (_function) do { // Load settings [_function, _response] call RangerMetrics_callback_fnc_loadSettings; }; + case "extensionReady": { + // deinitialize existing captures + if (!isNil "RangerMetrics_allMEH") then { + { + private _handle = missionNamespace getVariable _x; + if (isNil "_handle") then {continue}; + private _EHName = (_x splitString "_") select 2; + removeMissionEventHandler [_EHName, _handle]; + missionNamespace setVariable [_x, nil]; + } forEach RangerMetrics_allMEH; + }; + + if (!isNil "RangerMetrics_allCBA") then { + { + private _handle = missionNamespace getVariable _x; + if (isNil "_handle") then {continue}; + private _EHName = (_x splitString "_") select 2; + [_EHName, _handle] call CBA_fnc_removeEventHandler; + missionNamespace setVariable [_x, nil]; + } forEach RangerMetrics_allCBA; + }; + + if (!isNil "RangerMetrics_allServerPoll") then { + { + private _handle = missionNamespace getVariable _x; + if (isNil "_handle") then {continue}; + terminate _handle; + missionNamespace setVariable [_x, nil]; + } forEach RangerMetrics_allServerPoll; + }; + + call RangerMetrics_fnc_initCapture; + }; default { _response call RangerMetrics_fnc_log; }; diff --git a/@RangerMetrics/addons/RangerMetrics/functions/callbackHandlers/fn_loadSettings.sqf b/@RangerMetrics/addons/RangerMetrics/functions/callbackHandlers/fn_loadSettings.sqf index d78a667..cf22d36 100644 --- a/@RangerMetrics/addons/RangerMetrics/functions/callbackHandlers/fn_loadSettings.sqf +++ b/@RangerMetrics/addons/RangerMetrics/functions/callbackHandlers/fn_loadSettings.sqf @@ -16,10 +16,12 @@ if (_function isEqualTo "loadSettingsJSON") exitWith { ] call RangerMetrics_fnc_log; if (isServer) then { - RangerMetrics_serverProfileName = profileName; - publicVariable "RangerMetrics_serverProfileName"; + missionNamespace setVariable [ + "RangerMetrics_serverProfileName", + profileName, + true + ]; }; - call RangerMetrics_fnc_initCapture; }; switch (_data select 0) do { diff --git a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_initCapture.sqf b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_initCapture.sqf index b962310..13cd015 100644 --- a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_initCapture.sqf +++ b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_initCapture.sqf @@ -69,7 +69,7 @@ false; } else { missionNamespace setVariable [ - ("RangerMetrics" + "_CBAEH_" + _settingName), + ("RangerMetrics" + "_CBAEH_" + _handleName), _handle ]; true; @@ -81,24 +81,24 @@ -private _meh = allVariables missionNamespace select { +RangerMetrics_allMEH = allVariables missionNamespace select { _x find (toLower "RangerMetrics_MEH_") == 0 }; -private _cba = allVariables missionNamespace select { +RangerMetrics_allCBA = allVariables missionNamespace select { _x find (toLower "RangerMetrics_CBAEH_") == 0 }; -private _serverPoll = allVariables missionNamespace select { +RangerMetrics_allServerPoll = allVariables missionNamespace select { _x find (toLower "RangerMetrics_serverPoll_") == 0 }; -[format ["Mission event handlers: %1", _meh]] call RangerMetrics_fnc_log; -[format ["CBA event handlers: %1", _cba]] call RangerMetrics_fnc_log; -[format ["Server poll handles: %1", _serverPoll]] call RangerMetrics_fnc_log; +[format ["Mission event handlers: %1", RangerMetrics_allMEH]] call RangerMetrics_fnc_log; +[format ["CBA event handlers: %1", RangerMetrics_allCBA]] call RangerMetrics_fnc_log; +[format ["Server poll handles: %1", RangerMetrics_allServerPoll]] call RangerMetrics_fnc_log; -RangerMetrics_initialized = true; -RangerMetrics_run = true; -["RangerMetrics_run", true] remoteExecCall ["setVariable", 0]; +missionNamespace setVariable ["RangerMetrics_initialized", true, true]; +missionNamespace setVariable ["RangerMetrics_run", true, true]; + // start sending diff --git a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_log.sqf b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_log.sqf index ed89547..d0e23e8 100644 --- a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_log.sqf +++ b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_log.sqf @@ -1,4 +1,4 @@ -params [["_text","Log text invalid"], ["_type","INFO"]]; +params [["_text","Log text invalid"], ["_logType","DEBUG"]]; if (typeName _this != "ARRAY") exitWith { diag_log format ["RangerMetrics: Invalid log params: %1", _this]; @@ -6,18 +6,19 @@ if (typeName _this != "ARRAY") exitWith { if (typeName _text != "STRING") exitWith { diag_log format ["RangerMetrics: Invalid log text: %1", _this]; }; -if (typeName _type != "STRING") exitWith { +if (typeName _logType != "STRING") exitWith { diag_log format ["RangerMetrics: Invalid log type: %1", _this]; }; -if (_type isEqualTo "DEBUG") then { - if (!RangerMetrics_debug) exitWith {}; -}; +if ( + _logType == "DEBUG" && + !(missionNamespace getVariable ["RangerMetrics_debug", false]) +) exitWith {}; private _textFormatted = format [ "[%1] %2: %3", RangerMetrics_logPrefix, - _type, + _logType, _text]; if(isServer) then { diff --git a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_postInit.sqf b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_postInit.sqf index 3276a13..66ddae5 100644 --- a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_postInit.sqf +++ b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_postInit.sqf @@ -20,7 +20,7 @@ RangerMetrics_recordingSettings = createHashMap; [format ["Instance name: %1", profileName]] call RangerMetrics_fnc_log; [format ["CBA detected: %1", RangerMetrics_cbaPresent]] call RangerMetrics_fnc_log; -["Initializing v0.1"] call RangerMetrics_fnc_log; +["Initializing v0.0.2"] call RangerMetrics_fnc_log; // Create listener - extension calls are async, so we need to listen for the response addMissionEventHandler [ diff --git a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_queue.sqf b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_queue.sqf index f1df452..1af80b3 100644 --- a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_queue.sqf +++ b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_queue.sqf @@ -21,7 +21,17 @@ if (_tagContext find "world" > -1) then { _tags pushBack ["string", "world", toLower worldName]; }; if (_tagContext find "server" > -1) then { - _tags pushBack ["string", "connectedServer", RangerMetrics_serverProfileName]; + private _serverProfile = missionNamespace getVariable [ + "RangerMetrics_serverProfileName", + "" + ]; + if (_serverProfile isNotEqualTo "") then { + _tags pushBack [ + "string", + "connectedServer", + _serverProfile + ]; + }; }; private _outTags = _tags apply { diff --git a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_startServerPoll.sqf b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_startServerPoll.sqf index 581c298..79f0b25 100644 --- a/@RangerMetrics/addons/RangerMetrics/functions/core/fn_startServerPoll.sqf +++ b/@RangerMetrics/addons/RangerMetrics/functions/core/fn_startServerPoll.sqf @@ -12,16 +12,41 @@ if (_interval == 0) exitWith { [_code] call CBA_fnc_execNextFrame; }; - -private _handle = [{ - params ["_args", "_idPFH"]; - _args params ["_refName", "_code"]; - - [_code] call CBA_fnc_execNextFrame; - -}, _interval, _this] call CBA_fnc_addPerFrameHandler; - +// run a constant scheduled loop +private _runnerVar = "RangerMetrics" + "_serverPollRunner_" + _refName; +missionNamespace setVariable [_runnerVar, scriptNull]; +private _spawnParams = [_refName, _code, _interval, _runnerVar]; +private _handle = _spawnParams spawn { + params ["_refName", "_code", "_interval", "_runnerVar"]; + while {true} do { + if (scriptDone ( + missionNamespace getVariable _runnerVar + )) then { + private _handle = [] spawn _code; + missionNamespace setVariable [ + _runnerVar, + _handle + ]; + }; + // sleep _interval; + sleep 2; + }; +}; missionNamespace setVariable [ "RangerMetrics" + "_serverPoll_" + _refName, _handle -]; \ No newline at end of file +]; + +// USE PFH +// private _handle = [{ +// params ["_args", "_idPFH"]; +// _args params ["_refName", "_code"]; + +// [_code] call CBA_fnc_execNextFrame; + +// }, _interval, _this] call CBA_fnc_addPerFrameHandler; + +// missionNamespace setVariable [ +// "RangerMetrics" + "_serverPoll_" + _refName, +// _handle +// ]; \ No newline at end of file diff --git a/@RangerMetrics/settings.example.json b/@RangerMetrics/settings.example.json index 9e28a05..3773736 100644 --- a/@RangerMetrics/settings.example.json +++ b/@RangerMetrics/settings.example.json @@ -5,116 +5,97 @@ "token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX_AUTH_TOKEN_XXXXXXXXXXXXXXXXXXXXXXXXXXX", "org": "ORG_NAME" }, - "arma3": { - "refreshRateMs": 1000, - "debug": false - }, "timescaledb": { "enabled": false, "connectionUrl": "postgresql://user:pass@host.com:5432", "databaseName": "ranger_metrics", "description": "TimescaleDB is an open-source time-series database built on Postgres. The extension will connect to the maintenance database (postgres) first and create the database it will control with desired name, then shift connections to the newly created database to create the schema and conduct write operations." }, + "arma3": { + "refreshRateMs": 1000, + "debug": false + }, "recordingSettings": { - "serverPerformance": { - "name": "serverPerformance", - "enabled": true, - "serverOnly": false, - "intervalMs": 1000, - "bucket": "server_performance", - "measurement": "fps", - "description": "SERVER/HC POLL. Tracks average and minimum FPS. Polled on server (and HC) at specified interval." - }, - "runningScripts": { - "name": "runningScripts", - "enabled": true, - "serverOnly": false, - "intervalMs": 1000, - "bucket": "server_performance", - "measurement": "running_scripts", - "description": "SERVER/HC POLL. Tracks the number of scripts running on the server (and HC). Polled on specified interval." - }, - "entityCount": { - "name": "entityCount", - "enabled": true, - "serverOnly": false, - "intervalMs": 20000, - "bucket": "server_performance", - "measurement": "n/a", - "description": "SERVER/HC POLL. Tracks the number of entities on the server. Polled on server (and HC) at specified interval as well as on EntityCreated/EntityRespawned/EntityKilled events. Measurement is static, [entities_local, entities_remote, entities_global]." - }, - "playerPerformance": { - "name": "playerPerformance", - "enabled": true, - "serverOnly": true, - "intervalMs": 3000, - "bucket": "player_performance", - "measurement": "network", - "description": "SERVER POLL. User network performance. Tracks average ping, average bandwidth, and desync. Polled by the server at specified interval. Not tracked from headless client." - }, - "serverTime": { - "name": "serverTime", - "enabled": true, - "serverOnly": true, - "intervalMs": 10000, - "bucket": "mission_data", - "measurement": "server_time", - "description": "SERVER POLL. Tracks the server time. Always server-only. Runs at specified interval." - }, - "weather": { - "name": "weather", - "enabled": true, - "serverOnly": true, - "intervalMs": 300000, - "bucket": "mission_data", - "measurement": "weather", - "description": "SERVER POLL. Tracks the weather on the server. Always server-only. Runs at specified interval." - }, - "viewDistance": { - "name": "viewDistance", - "enabled": true, - "serverOnly": true, - "intervalMs": 300000, - "bucket": "mission_data", - "measurement": "view_distance", - "description": "SERVER POSTINIT, MPEnded. Tracks the view distance on the server. Always server-only. Runs at specified interval." - }, - "runningMission": { - "name": "runningMission", - "enabled": true, - "serverOnly": true, - "intervalMs": 0, - "bucket": "mission_data", - "measurement": "running_mission", - "description": "SERVER POSTINIT, MPEnded. Tracks the name of the mission running on the server. Always server-only. Runs at the start (and tries at end) of the mission." - }, - "playerStatus": { - "name": "playerStatus", - "enabled": true, - "serverOnly": true, - "intervalMs": 0, - "bucket": "player_data", - "measurement": "client_state", - "description": "EH. Tracks players' clientstateNumber, adminState, and profileName on connect/disconnect to server and to mission, as well as when these values change." - }, - "playerIdentity": { - "name": "playerIdentity", - "enabled": true, - "serverOnly": true, - "intervalMs": 0, - "bucket": "player_data", - "measurement": "player_identity", - "description": "EH. Tracks players' identity on connect/disconnect to server and to mission, as well as when these values change." - }, - "CBAEventHandlers": { - "milsimServerEfficiency": { - "name": "milsimServerEfficiency", + "serverPolls": [ + { + "name": "serverPerformance", + "enabled": true, + "serverOnly": false, + "intervalMs": 1000, + "bucket": "server_performance", + "measurement": "fps", + "description": "SERVER/HC POLL. Tracks average and minimum FPS. Polled on server (and HC) at specified interval." + }, + { + "name": "runningScripts", + "enabled": true, + "serverOnly": false, + "intervalMs": 1000, + "bucket": "server_performance", + "measurement": "running_scripts", + "description": "SERVER/HC POLL. Tracks the number of scripts running on the server (and HC). Polled on specified interval." + }, + { + "name": "entityCount", + "enabled": true, + "serverOnly": false, + "intervalMs": 20000, + "bucket": "server_performance", + "measurement": "n/a", + "description": "SERVER/HC POLL. Tracks the number of entities on the server. Polled on server (and HC) at specified interval as well as on EntityCreated/EntityRespawned/EntityKilled events. Measurement is static, [entities_local, entities_remote, entities_global]." + }, + { + "name": "playerPerformance", "enabled": true, "serverOnly": true, - "bucket": "server_performance", - "measurement": "milsim_server_efficiency", + "intervalMs": 1000, + "bucket": "player_performance", + "measurement": "network", + "description": "SERVER POLL. User network performance. Tracks average ping, average bandwidth, and desync. Polled by the server at specified interval. Not tracked from headless client." + }, + { + "name": "serverTime", + "enabled": true, + "serverOnly": true, + "intervalMs": 10000, + "bucket": "mission_data", + "measurement": "server_time", + "description": "SERVER POLL. Tracks the server time. Always server-only. Runs at specified interval." + }, + { + "name": "weather", + "enabled": true, + "serverOnly": true, + "intervalMs": 120000, + "bucket": "mission_data", + "measurement": "weather", + "description": "SERVER POLL. Tracks the weather on the server. Always server-only. Runs at specified interval." + }, + { + "name": "viewDistance", + "enabled": true, + "serverOnly": true, + "intervalMs": 120000, + "bucket": "mission_data", + "measurement": "view_distance", + "description": "SERVER POSTINIT, MPEnded. Tracks the view distance on the server. Always server-only. Runs at specified interval." + }, + { + "name": "runningMission", + "enabled": true, + "serverOnly": true, + "intervalMs": 0, + "bucket": "mission_data", + "measurement": "running_mission", + "description": "SERVER POSTINIT, MPEnded. Tracks the name of the mission running on the server. Always server-only. Runs at the start (and tries at end) of the mission." + } + ], + "CBAEventHandlers": [ + { + "name": "milsimServerEfficiency", + "enabled": true, "description": "EVENTHANDLER. Tracks the efficiency of the server." } - } + ] } } \ No newline at end of file diff --git a/README.md b/README.md index 9f4d4a4..a341acf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,57 @@ -# RangerMetrics based off of CAV-Metrics +# RangerMetrics - Arma3 InfluxDB Metrics -Ranger Metrics is used to submit information from the Arma3 Instance to the Influx Database. This uses the ArmaInflux Version complied to a DLL to communicate. \ No newline at end of file +Ranger Metrics is used to submit information from the Arma3 Instance to the Influx Database. This uses the ArmaInflux Version complied to a DLL to communicate. + +--- + +## Setup + +### Settings.json + +Configure the options in settings.json. + +As of v0.0.2, metrics are captured on a recurring loop in the scheduled environment with a two second pause to allow time. Whether to use CBA Per Frame Handlers that run metric collection less often and in the unscheduled environment has yet to be decided on, as it does lead to longer intervals that are more difficult to graph precisely. + +### InfluxDB + +InfluxDB is a time series database. It is used to store data points with a timestamp. + +#### Required Buckets + +- mission_data +- player_data +- player_performance +- server_events +- server_performance + +### Grafana + +Grafana is a dashboarding tool. It is used to display the data from InfluxDB. Import the dashboard from the json file in the root of this addon and set up your datasources appropriately. + +--- + +## Usage + +### Ingame + +#### Toggle Capture On/Off + +Running the following commands in Server Exec will toggle the capture on or off for the server and any Headless Clients. Capture loops will still occur but will exit almost immediately. + +Change the last parameter to false to ONLY target the server when run as Server Exec. + +*This may not apply to raw Event Handler data which goes under `server_events`* + +```sqf +// ON +missionNamespace setVariable ["RangerMetrics_run", true, true]; + +// OFF +missionNamespace setVariable ["RangerMetrics_run", false, true]; +``` + +#### Reload Settings.json and recreate all capture loops + +To reload everything while in a game, run `"RangerMetrics" callExtension "deinitExtension";` in Global Exec. This will disconnect any database connections and reset state. Running it Global Exec will cause any client with the addon to run it, which includes Headless Clients. + +When the extension is finished, it will notify Arma via a callback. The addon will then __automatically__ run `"RangerMetrics" callExtension "initExtension";` to reinitialize the extension, to include fetching the new settings, tearing down existing captures, and re-setting up captures with the new settings. diff --git a/grafana_dashboard.json b/grafana_dashboard.json new file mode 100644 index 0000000..c75ed99 --- /dev/null +++ b/grafana_dashboard.json @@ -0,0 +1,3237 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 40, + "panels": [], + "title": "Core Stats", + "type": "row" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dthms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 12, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"mission_data\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"server_time\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"serverTime\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> last()", + "refId": "A" + } + ], + "title": "Mission Time Elapsed", + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 120, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 30 + }, + { + "color": "purple", + "value": 60 + }, + { + "color": "green", + "value": 90 + }, + { + "color": "dark-green", + "value": 120 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 7, + "x": 4, + "y": 1 + }, + "id": 8, + "interval": "10s", + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": true, + "showThresholdMarkers": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"server_performance\")\r\n|> range(start: -1m)\r\n|> filter(fn: (r) => r[\"_measurement\"] == \"fps\")\r\n|> filter(fn: (r) => r[\"_field\"] == \"fps_avg\")\r\n|> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n|> group(columns: [\"profileName\", \"_field\"])\r\n|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n|> keep(columns: [\"_time\", \"profileName\", \"_field\", \"_value\"])\r\n|> map(fn: (r) => ({ r with _field: \"Avg FPS\" }))\r\n|> last()", + "refId": "fps_avg" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": false, + "query": "from(bucket: \"server_performance\")\r\n|> range(start: -1m)\r\n|> filter(fn: (r) => r[\"_measurement\"] == \"fps\")\r\n|> filter(fn: (r) => r[\"_field\"] == \"fps_min\")\r\n|> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n|> group(columns: [\"profileName\", \"_field\"])\r\n|> aggregateWindow(every: v.windowPeriod, fn: min, createEmpty: false)\r\n|> keep(columns: [\"_time\", \"profileName\", \"_field\", \"_value\"])\r\n|> map(fn: (r) => ({ r with _field: \"Min FPS\" }))\r\n|> last()", + "refId": "fps_min" + } + ], + "title": "Server & HC FPS", + "type": "gauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "last" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 38, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepAfter", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "green", + "value": 20 + }, + { + "color": "yellow", + "value": 75 + }, + { + "color": "red", + "value": 125 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 13, + "x": 11, + "y": 1 + }, + "id": 46, + "interval": "10s", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"running_scripts\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> keep(columns: [\"_time\", \"profileName\", \"_field\", \"_value\"])\r\n |> group(columns: [\"profileName\", \"_field\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)", + "refId": "RunningScripts" + } + ], + "title": "Running Scripts", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 4 + }, + "id": 38, + "interval": "10s", + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"players_alive\")\r\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\r\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\r\n |> group(columns: [\"side\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: false)", + "refId": "AlivePlayers" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": true, + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"players_dead\")\r\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n |> keep(columns: [\"_time\", \"_field\", \"_value\"])\r\n |> map(fn: (r) => ({ r with _field: \"Dead\" }))\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: false)\r\n |> last()\r\n", + "refId": "DeadPlayers" + } + ], + "title": "Alive Players", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Alive AI", + "binary": { + "left": "Total Units", + "operator": "-", + "reducer": "sum", + "right": "Total Players" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-RdYlGr" + }, + "mappings": [], + "max": 4000, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 0, + "y": 7 + }, + "id": 59, + "interval": "20s", + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"milsim_server_efficiency\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"milsim_raw_cps\")\r\n |> last()\r\n |> map(fn: (r) => ({ r with _field: \"CPS RAW\" }))", + "refId": "A" + } + ], + "title": "Milsim CPS Raw", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-RdYlGr" + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 2, + "y": 7 + }, + "id": 60, + "interval": "20s", + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"milsim_server_efficiency\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"milsim_cps\")\r\n |> last()\r\n |> map(fn: (r) => ({ r with _field: \"CPS\" }))", + "refId": "A" + } + ], + "title": "Milsim CPS", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed" + }, + "custom": { + "fillOpacity": 17, + "lineWidth": 1, + "spanNulls": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 13, + "x": 11, + "y": 8 + }, + "id": 48, + "interval": "5s", + "options": { + "alignValue": "right", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "mergeValues": true, + "rowHeight": 0.88, + "showValue": "always", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"mission_data\")\r\n |> range(start: -7d)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"running_mission\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> last()\r\n |> pivot(rowKey:[\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> keep(columns: [\"briefing_name\", \"mission_name\", \"mission_name_source\", \"on_load_name\", \"author\", \"server_name\", \"_time\", \"_value\"])\r\n", + "refId": "A" + } + ], + "title": "Running Mission", + "type": "state-timeline" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 11, + "x": 0, + "y": 11 + }, + "id": 33, + "interval": "5s", + "options": { + "calculate": true, + "calculation": { + "xBuckets": { + "mode": "count", + "value": "15" + }, + "yBuckets": { + "mode": "size", + "value": "" + } + }, + "cellGap": 3, + "cellValues": { + "unit": "none" + }, + "color": { + "exponent": 0.5, + "fill": "orange", + "mode": "opacity", + "reverse": true, + "scale": "linear", + "scheme": "PRGn", + "steps": 128 + }, + "exemplars": { + "color": "light-yellow" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": false + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "show": true, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "right", + "min": 0, + "reverse": false + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"server_performance\")\r\n|> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n|> filter(fn: (r) => r[\"_measurement\"] == \"fps\")\r\n|> filter(fn: (r) => r[\"_field\"] == \"fps_avg\")\r\n|> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n|> yield(name: \"avg\")", + "refId": "fps_avg" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": false, + "query": "from(bucket: \"server_performance\")\r\n|> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n|> filter(fn: (r) => r[\"_measurement\"] == \"fps\")\r\n|> filter(fn: (r) => r[\"_field\"] == \"fps_min\")\r\n|> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n|> aggregateWindow(every: v.windowPeriod, fn: min, createEmpty: false)\r\n|> yield(name: \"min\")", + "refId": "fps_min" + } + ], + "title": "Server FPS History", + "type": "heatmap" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [] + } + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "Groups" + }, + "properties": [ + { + "id": "displayName", + "value": "Groups" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 45 + }, + { + "color": "orange", + "value": 60 + }, + { + "color": "red", + "value": 100 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "Alive Units" + }, + "properties": [ + { + "id": "displayName", + "value": "Units (Alive)" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "light-yellow", + "value": 60 + }, + { + "color": "semi-dark-orange", + "value": 90 + }, + { + "color": "red", + "value": 100 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "Dead Units" + }, + "properties": [ + { + "id": "displayName", + "value": "Units (Dead)" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 60 + }, + { + "color": "orange", + "value": 90 + }, + { + "color": "red", + "value": 100 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "Vehicles" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#6ED0E0", + "value": 300 + }, + { + "color": "#EAB839", + "value": 500 + }, + { + "color": "red", + "value": 1000 + } + ] + } + }, + { + "id": "displayName", + "value": "Vehicles" + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "WeaponHolders" + }, + "properties": [ + { + "id": "displayName", + "value": "WeaponHolder Objects" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#6ED0E0", + "value": 300 + }, + { + "color": "#EAB839", + "value": 500 + }, + { + "color": "red", + "value": 1000 + } + ] + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 13, + "x": 11, + "y": 13 + }, + "id": 5, + "interval": "10s", + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": " from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"units_alive\")\r\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\r\n |> group(columns: [\"side\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)\r\n |> keep(columns: [\"_time\", \"_measurement\", \"_value\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)\r\n", + "refId": "Alive Units", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": false, + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"units_dead\")\r\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)\r\n |> keep(columns: [\"_time\", \"_measurement\", \"_value\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)\r\n", + "refId": "Dead Units" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"vehicles_total\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)\r\n |> keep(columns: [\"_time\", \"_measurement\", \"_value\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)\r\n", + "refId": "Vehicles", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"vehicles_weaponholder\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)\r\n |> keep(columns: [\"_time\", \"_measurement\", \"_value\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)\r\n\r\n", + "refId": "WeaponHolders", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"groups_total\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)\r\n |> keep(columns: [\"_time\", \"_measurement\", \"_value\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)", + "refId": "Groups", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Global Objects, Groups, Units", + "transformations": [ + { + "id": "configFromData", + "options": {} + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 36, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "GUER" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "WEST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CIV" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "EAST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 0, + "y": 16 + }, + "id": 57, + "interval": "10s", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": false, + "query": " from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"units_alive\")\r\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\r\n |> group(columns: [\"side\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: false)\r\n ", + "refId": "All Units Alive" + } + ], + "title": "[Global] Active Units", + "transformations": [ + { + "disabled": true, + "id": "calculateField", + "options": { + "alias": "Total", + "binary": { + "left": "Alive Units", + "operator": "-", + "reducer": "sum", + "right": "Alive Players" + }, + "mode": "reduceRow", + "reduce": { + "include": [ + "CIV", + "EAST", + "GUER", + "WEST" + ], + "reducer": "sum" + } + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "max" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Number of Units", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 9, + "y": 18 + }, + "id": 32, + "interval": "10s", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_local\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"units_alive\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)\r\n |> keep(columns: [\"_time\", \"profileName\", \"_field\", \"_value\"])\r\n |> map(fn: (r) => ({ r with _field: \"Alive\" }))\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)", + "refId": "AliveUnits", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": false, + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_local\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"units_dead\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)\r\n |> keep(columns: [\"_time\", \"profileName\", \"_field\", \"_value\"])\r\n |> map(fn: (r) => ({ r with _field: \"Dead\" }))\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)", + "refId": "DeadUnits" + } + ], + "title": "Units by Profile", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 750, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 18 + }, + "id": 63, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"player_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"network\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"avgPing\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> group(columns: [\"playerUID\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Player Ping", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "CIV" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "EAST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "GUER" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "WEST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 0, + "y": 21 + }, + "id": 65, + "interval": "10s", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": false, + "query": " from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"players_alive\")\r\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\r\n |> group(columns: [\"side\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: false)\r\n ", + "refId": "All Players Alive" + } + ], + "title": "[Global] Active Players", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 23 + }, + "id": 64, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"player_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"network\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"desync\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> group(columns: [\"playerUID\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Player Desync", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Number of Groups", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 9, + "y": 24 + }, + "id": 29, + "interval": "10s", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_local\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"groups_total\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)\r\n |> keep(columns: [\"_time\", \"profileName\", \"_value\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)", + "refId": "Groups", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Groups by Profile", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 12000, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 28 + }, + "id": 62, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"player_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"network\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"avgBandwidth\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> group(columns: [\"playerUID\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Player Bandwidth", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Number of Vehicles", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 9, + "y": 30 + }, + "id": 31, + "interval": "10s", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"server_performance\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_local\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"vehicles_total\" or r[\"_field\"] == \"vehicles_weaponholder\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)\r\n |> keep(columns: [\"_time\", \"profileName\", \"_value\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)", + "refId": "Vehicles", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Vehicles by Profile", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "align": "left", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "channel" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "#808080", + "index": 0, + "text": "Global" + }, + "1": { + "color": "light-blue", + "index": 1, + "text": "Side" + }, + "2": { + "color": "dark-yellow", + "index": 2, + "text": "Command" + }, + "3": { + "color": "green", + "index": 3, + "text": "Group" + }, + "4": { + "color": "light-yellow", + "index": 4, + "text": "Vehicle" + }, + "5": { + "color": "#ffffff", + "index": 5, + "text": "Direct" + }, + "16": { + "color": "#808080", + "index": 7, + "text": "System" + } + }, + "type": "value" + }, + { + "options": { + "from": 6, + "result": { + "color": "semi-dark-red", + "index": 6, + "text": "Custom" + }, + "to": 15 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 91 + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-text" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "from" + }, + "properties": [ + { + "id": "custom.width", + "value": 186 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "_time" + }, + "properties": [ + { + "id": "custom.width", + "value": 168 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 15, + "x": 9, + "y": 36 + }, + "id": 14, + "options": { + "footer": { + "countRows": false, + "fields": [ + "_value" + ], + "reducer": [ + "lastNotNull" + ], + "show": false + }, + "frameIndex": 0, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"server_events\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"HandleChatMessage\")\r\n |> filter(fn: (r) => r[\"connectedServer\"] == \"${Server}\")\r\n |> filter(fn: (r) => r._field == \"text\" or r._field == \"from\" or r._field == \"channel\")\r\n |> pivot(rowKey:[\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> keep(columns: [\"_time\", \"channel\", \"from\", \"name\", \"text\"])\r\n\r\n ", + "refId": "A" + } + ], + "title": "Chat Log", + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": true, + "field": "_time" + } + ] + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 44 + }, + "id": 6, + "panels": [], + "title": "Global Entity Counts", + "type": "row" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Alive CIV" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Alive EAST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Alive GUER" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Alive WEST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead CIV" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead EAST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead GUER" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead WEST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#3b3933fa", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 0, + "y": 45 + }, + "id": 9, + "interval": "10s", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": false, + "query": "from(bucket: \"server_performance\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\n |> filter(fn: (r) => r[\"_field\"] == \"units_alive\")\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\n |> map(fn: (r) => ({ r with _field: \"Alive\" }))\n |> keep(columns: [\"_time\", \"side\", \"_field\", \"_value\"])\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)", + "refId": "UnitsAlive" + } + ], + "title": "Global Alive Units By Side", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Alive CIV" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Alive EAST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Alive GUER" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Alive WEST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead CIV" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead EAST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead GUER" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead WEST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Dead" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#3b3933fa", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Vehicles CIV" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Vehicles EAST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Vehicles GUER" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Vehicles WEST" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 0, + "y": 51 + }, + "id": 44, + "interval": "10s", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": false, + "query": "from(bucket: \"server_performance\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\n |> filter(fn: (r) => r[\"_field\"] == \"vehicles_total\")\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\n |> map(fn: (r) => ({ r with _field: \"Vehicles\" }))\n |> keep(columns: [\"_time\", \"side\", \"_field\", \"_value\"])\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)", + "refId": "Vehicles" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": true, + "query": "from(bucket: \"server_state\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"entities_global\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"units_dead\")\r\n |> filter(fn: (r) => r[\"profileName\"] == \"${Server}\")\r\n |> map(fn: (r) => ({ r with _field: \"Dead\" }))\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n |> keep(columns: [\"_time\", \"_field\", \"_value\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: false)", + "refId": "UnitsDead" + } + ], + "title": "Global Vehicles By Side", + "transformations": [], + "type": "timeseries" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 57 + }, + "id": 54, + "panels": [], + "title": "Row title", + "type": "row" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 6, + "x": 0, + "y": 58 + }, + "id": 50, + "options": { + "displayLabels": [ + "percent", + "name", + "value" + ], + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"player_state\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"unit_loadout\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"primaryWeaponClass\")\r\n |> duplicate(column: \"_value\", as: \"primaryWeaponClass\")\r\n |> group(columns: [\"playerUID\", \"primaryWeaponClass\"])\r\n |> last()\r\n |> duplicate(column: \"playerUID\", as: \"countPlayers\")\r\n |> group(columns: [\"primaryWeaponClass\"])\r\n |> count(column: \"countPlayers\")\r\n |> group()\r\n // new field\r\n |> map (fn: (r) => ({ r with \"columnName\": \"Unit Count\" }))\r\n |> pivot(rowKey:[\"primaryWeaponClass\"], columnKey: [\"columnName\"], valueColumn: \"countPlayers\")\r\n |> sort(columns: [\"_value\"], desc: true)\r\n\r\n\r\n", + "refId": "A" + } + ], + "title": "Primary Weapons Equipped", + "type": "piechart" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 6, + "x": 6, + "y": 58 + }, + "id": 51, + "options": { + "displayLabels": [ + "percent", + "name", + "value" + ], + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"player_state\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"unit_loadout\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"currentWeaponClass\")\r\n |> duplicate(column: \"_value\", as: \"currentWeaponClass\")\r\n |> group(columns: [\"playerUID\", \"currentWeaponClass\"])\r\n |> last()\r\n |> duplicate(column: \"playerUID\", as: \"countPlayers\")\r\n |> group(columns: [\"currentWeaponClass\"])\r\n |> count(column: \"countPlayers\")\r\n |> group()\r\n // new field\r\n |> map (fn: (r) => ({ r with \"columnName\": \"Unit Count\" }))\r\n |> pivot(rowKey:[\"currentWeaponClass\"], columnKey: [\"columnName\"], valueColumn: \"countPlayers\")\r\n |> sort(columns: [\"_value\"], desc: true)\r\n\r\n\r\n", + "refId": "A" + } + ], + "title": "Current Weapons Equipped", + "type": "piechart" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 6, + "x": 12, + "y": 58 + }, + "id": 55, + "options": { + "displayLabels": [ + "percent", + "name", + "value" + ], + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"player_state\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"unit_loadout\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"handgunWeaponClass\")\r\n |> duplicate(column: \"_value\", as: \"handgunWeaponClass\")\r\n |> group(columns: [\"playerUID\", \"handgunWeaponClass\"])\r\n |> last()\r\n |> duplicate(column: \"playerUID\", as: \"countPlayers\")\r\n |> group(columns: [\"handgunWeaponClass\"])\r\n |> count(column: \"countPlayers\")\r\n |> group()\r\n // new field\r\n |> map (fn: (r) => ({ r with \"columnName\": \"Unit Count\" }))\r\n |> pivot(rowKey:[\"handgunWeaponClass\"], columnKey: [\"columnName\"], valueColumn: \"countPlayers\")\r\n |> sort(columns: [\"_value\"], desc: true)\r\n\r\n\r\n", + "refId": "A" + } + ], + "title": "Handgun Weapons Equipped", + "type": "piechart" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 70 + }, + "id": 2, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "hide": false, + "query": "from(bucket: \"recording-data\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"unitState\")\r\n |> filter(fn: (r) => r[\"side\"] == \"EAST\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"isAlive\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n |> yield(name: \"last\")", + "refId": "A" + } + ], + "title": "Panel Title", + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 6, + "x": 15, + "y": 70 + }, + "id": 52, + "options": { + "displayLabels": [ + "percent", + "name", + "value" + ], + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${Datasource}" + }, + "query": "from(bucket: \"player_state\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"unit_loadout\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"gogglesClass\")\r\n |> duplicate(column: \"_value\", as: \"gogglesClass\")\r\n |> group(columns: [\"playerUID\", \"gogglesClass\"])\r\n |> last()\r\n |> duplicate(column: \"playerUID\", as: \"countPlayers\")\r\n |> group(columns: [\"gogglesClass\"])\r\n |> count(column: \"countPlayers\")\r\n |> group()\r\n // new field\r\n |> map (fn: (r) => ({ r with \"columnName\": \"Unit Count\" }))\r\n |> pivot(rowKey:[\"gogglesClass\"], columnKey: [\"columnName\"], valueColumn: \"countPlayers\")\r\n |> sort(columns: [\"_value\"], desc: true)\r\n\r\n\r\n", + "refId": "A" + } + ], + "title": "Current Weapons Equipped", + "type": "piechart" + } + ], + "refresh": false, + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "IndigoFox", + "value": "IndigoFox" + }, + "datasource": { + "type": "influxdb", + "uid": "sOe5m_YVk" + }, + "definition": "import \"influxdata/influxdb/schema\"\r\n\r\nschema.tagValues(bucket: \"server_performance\", tag: \"connectedServer\")", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "Server", + "options": [], + "query": "import \"influxdata/influxdb/schema\"\r\n\r\nschema.tagValues(bucket: \"server_performance\", tag: \"connectedServer\")", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": [ + "CIV", + "EAST", + "GUER", + "WEST" + ], + "value": [ + "CIV", + "EAST", + "GUER", + "WEST" + ] + }, + "datasource": { + "type": "influxdb", + "uid": "sOe5m_YVk" + }, + "definition": "import \"influxdata/influxdb/schema\"\r\n\r\nschema.tagValues(bucket: \"server_performance\", tag: \"side\")", + "hide": 0, + "includeAll": false, + "label": "Side", + "multi": true, + "name": "Side", + "options": [], + "query": "import \"influxdata/influxdb/schema\"\r\n\r\nschema.tagValues(bucket: \"server_performance\", tag: \"side\")", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "IndigoInflux", + "value": "IndigoInflux" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "Datasource", + "options": [], + "query": "influxdb", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "2023-04-18T23:53:01.534Z", + "to": "2023-04-19T00:10:01.159Z" + }, + "timepicker": {}, + "timezone": "", + "title": "Arma 3 Server", + "uid": "c8WRiufVz", + "version": 65, + "weekStart": "" +} \ No newline at end of file