|
|
3 years ago | |
|---|---|---|
| templates | 3 years ago | |
| .gitignore | 3 years ago | |
| GDCSST.sql | 3 years ago | |
| LICENSE | 3 years ago | |
| README.md | 3 years ago | |
| backend.go | 3 years ago | |
| frontend.go | 3 years ago | |
| gdcsst.go | 3 years ago | |
| go.mod | 3 years ago | |
| go.sum | 3 years ago | |
| helpers.go | 3 years ago | |
| structs.go | 3 years ago |
Digital Combat Simulator Server Tracker written in Go
The goal of GDCSST is to capture server information from the DCS website, store and visualize it in a human readable format.
To run this use any recent versions of the following:
This step is easy straightforward, either install one from scratch or reuse an existing instance and give it a new DB for gdcsst.
Go to https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en, register and download GeoLite2-Country_20yymmdd.tar.gz. Unpack it and chuck the .mmdb-file in the same folder of the next step.
Copy the binary (you may need to make it with go build .) and the template/ folder to some place nice and comfy where it can run from.
Set the following environmental variables:
Login credentials to login at www.digitalcombatsimulator.com and get the list of servers
DCS_SERVER_TRACKER_ED_USERDCS_SERVER_TRACKER_ED_PASSRedis server, port and db #
DCS_SERVER_TRACKER_REDIS_IPDCS_SERVER_TRACKER_REDIS_PORTDCS_SERVER_TRACKER_PASSWORDDCS_SERVER_TRACKER_REDIS_DBPoint this to where your GeoLite2-Country.mmdb is stored
DCS_SERVER_TRACKER_GEOIP2_FILEFinally, chuck these environments in a shell-script of a service file and then run GDCSST binary. Once running curl/browse to host:port/metrics to see if all goes well, or check the application output.
Install Prometheus and configure a job to scrape GDCSST.
scrape_configs:
- job_name: "dcstracker"
static_configs:
- targets: ["localhost:9200"]
Download and compile the binary from https://github.com/lomik/prometheus-png/ or run the Docker image:
docker run --rm -p 8080:8080 lomik/prometheus-png:latest -prometheus "http://127.0.0.1:9090/"
Pick the right port and point to the right prometheus installation.