#A3W Stats# This is a stats visualization framework for Arma 3 Wasteland servers that use the sock-rpc-stats fork for persistence.
The framework works with stats saved in a CouchDB database, and indexed using ElasticSearch.
Features:
-
Live Scoreboard (/scoreboard)
(Shows the statistics about players currently active on the server)
-
Leaderboard (/leaderboard)
(Shows same data as the scorebaord, but for the top 1000 players within the last month)
-
Player count (/playercount_history)
(Shows the player count over the last 7 days)
-
Vehicle count (/vehiclecount_history)
(Shows the player count over the last 7 days)
-
Object count (/objectcount_history)
(Shows the object count over the last 7 days)
- Apache HTTP Server
- PHP 5.1.6 or newer
- CouchDB database (with A3Wasteland data)
- ElasticSearch (with propper indexes created)
- Make sure that your web server machine is able to reach the machine(s) where CouchDB, and ElasticSearch are running (if they are on different machines).
#Seitting up the web-framework#
- Upload the entire repository contents into a directory in your web-server
- Edit the
application/config/globals.php
to point to your CouchDB database, and ElasticSearch indexes.
#Setting up the ElasticSearch indexes#
- Install the the ElasticSearch CouchDB river plugin
./bin/plugin --install couchdb-river --url https://github.com/A3Armory/www/releases/download/v0.0.1/elasticsearch-river-couchdb-2.4.2-micovery.zip
(Note this is a custom version of the ES CouchDB River Plugin that allows for saving document revisions/history) 2. Install the Kopf plugin
Since you are going to be managing, and working with ElasticSearch, you should also install the Kopf plugin to help you manage ES.
./bin/plugin --install lmenezes/elasticsearch-kopf/1.4.3
You can access Kopf at http://localhost:9200/_plugin/kopf
- Install Git Bash (Windows only)
If you are in Windows, you should install MsyGit. It comes with Git bash, where you can use the "curl" command line utility to talk to ElasticSearch.
-
Create the A3Wasteland indexes
- If you are on Windows, open up Git Bash, (if you are on Linux, just open a new terminal)
- Grab the contents of this file, and paste it in the terminal. Note that all the curl commands in the file assume your database is named "a3w", if you have a different name, make sur to modify it in the file before running the commands.
- If you are using ElasticSearch 1.4.3, Groovy scripting is disabled by default, you'll have to enable it by modifing the
config/elasticsearch.yaml
and adding the following propertyscript.groovy.sandbox.enabled: true
and then restarting it.