A Prometheus based metrics exporter for ACEmulator servers
- Real-time on-demand Metrics: Allows your prometheus server to collect metrics output from ACEmulator
- 
Prerequisites - .NET 8.0 runtime
- ACEmulator server installation, version 1.71.4694 or higher required
- Prometheus server installation
 
- 
Installation Steps - Download the latest release zip file from the releases page
- Extract the zip file to your ACEmulator server's Modsdirectory
- Ensure the extracted folder is named ACE.Mods.Metrics
- Ensure the plugin is enabled in your ACEmulator server configuration
- Restart your ACEmulator server or reload mods using /mod fcommand from console or in-game.
 
Located in grafana\provisioning\dashboards you will find ACE_NET_runtime_metrics_dashboard.json which is a sample dashboard for use with this mod.
Additionally, this repo has a docker compose stack found at docker-compose.yml to easily demo the plugin and dashboard.
To use the demo:
- 
Clone this repo to easily download all needed files. 
- 
Initialize the docker stack with the following command: docker compose run --rm ace-init- This will download Dats and Mods for the server to use and place them in the correct locations
- You can choose to do this manually by
- Placing your DAT files in a directory called Dats
- Any Mods, including this one, in to the Modsdirectory using a subfolder for each mod, seperately.
 
- Placing your DAT files in a directory called 
 
- 
Start the docker stack with the following command: docker compose up -d- This will download, create required directories, auto configure, and start the following services:
- ace-db
- mysql:8.0configured to use- mysql-dataas its data directory
- You can change some defaults found in the docker.envfile
 
- ace-prometheus
- prom/prometheus:latestconfigured to use- prometheus-dataas its data directory and its configuration at- prometheus
- Accessible at http://localhost:9090/
 
- ace-grafana
- grafana/grafana-enterprise:latestconfigured to use- grafana-dataas its data directory and its configuration at- grafana/provisioning
- Accessible at http://localhost:3000/ and the dashboard located at http://localhost:3000/d/RHbwEa8mzACE3/ace-net-runtime-metrics
 
- ace-server
- acemulator/ace:latestconfigured to use- Config,- Content,- Dats,- Logsand- Modsfor data and configuration.
- You can change some defaults found in the docker.envfile
- The server will download and install the latest database on first start up, and will be set to make the first account connected an Admin.
 
 
- ace-db
 
- This will download, create required directories, auto configure, and start the following services:
- 
To stop the docker stack, use the following command: docker compose down
Edit Settings.json to customize the plugin behavior:
{
  "Host": "127.0.0.1",
  "Port": 9200,
  "Url": "metrics/",
  "UseHTTPs": false
}You can change these options below, but we do recommend the defaults be left as-is and instead use a reverse proxy to securely expose the metrics data
- Host: IP Address to bind listener to (default: "127.0.0.1")
- Port: Port to bind listener to (default: 9200)
- Url: Base path that metrics are published to (default: "metrics/")
- UseHTTPs: Use SSL on metrics server (default: false)
Plugin not loading:
- Check that the plugin is in the correct Mods directory
- Verify .NET 8.0 is installed
- Check server logs for error messages
Settings not loading:
- Ensure Settings.json is properly formatted
- Check for JSON syntax errors
- Verify file permissions
- .NET 8.0 Runtime
- ACEmulator Server (with mod support)
- Lib.Harmony bundled with ACEmulator (for patching)
- ACE.Shared library bundled with this plugin
- Prometheus libraries bundled with this plugin