/www

This is a repository for the A3Armory website.

Primary LanguagePHPOtherNOASSERTION

#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)

    scoreboard

    (Shows the statistics about players currently active on the server)

  • Leaderboard (/leaderboard)

    leaderboard

    (Shows same data as the scorebaord, but for the top 1000 players within the last month)

  • Player count (/playercount_history)

    player_count

    (Shows the player count over the last 7 days)

  • Vehicle count (/vehiclecount_history)

    vehicle_count

    (Shows the player count over the last 7 days)

  • Object count (/objectcount_history)

    object_count

    (Shows the object count over the last 7 days)

Requirements

  1. Apache HTTP Server
  2. PHP 5.1.6 or newer
  3. CouchDB database (with A3Wasteland data)
  4. ElasticSearch (with propper indexes created)
  5. 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#

  1. Upload the entire repository contents into a directory in your web-server
  2. Edit the application/config/globals.php to point to your CouchDB database, and ElasticSearch indexes.

#Setting up the ElasticSearch indexes#

  1. 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

  1. 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.

  1. Create the A3Wasteland indexes

    1. If you are on Windows, open up Git Bash, (if you are on Linux, just open a new terminal)
    2. 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.
    3. 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 property script.groovy.sandbox.enabled: true and then restarting it.