Aquila

Game metrics and player counts

Report players, serve your own Prometheus metrics, and graph them per fleet.

The console graphs each fleet's players and capacity, plus up to eight of your own game metrics. fleets.v1.GetFleetMetrics returns the same series.

Player counts

There are two ways for a server to report its players:

  • Through the SDK. Call SetPlayers(count, capacity) whenever a player joins or leaves. With the Agones SDK, Alpha().SetPlayerCapacity and PlayerConnect do the same.
  • Through metrics. For a server without the SDK, name the gauges on its metrics endpoint that hold the count and the capacity:
{
  "metrics": { "port": 9100 },
  "players": { "count": "players_online", "capacity": "players_max" }
}

The fleet's player graph is the sum over its servers.

Your own metrics

Serve a Prometheus endpoint from the game, on a container port of its own, and add it to the fleet template:

{ "metrics": { "port": 9100, "path": "/metrics" } }

The path defaults to /metrics. The port must not be one of the game's TCP ports, and it is never public.

Aquila scrapes every server every 30 seconds and stores each metric with a game_ prefix, so match_rounds_total becomes game_match_rounds_total. A scrape fails when the endpoint does not answer, serves more than 100 series, or answers with more than 64 KiB. GetFleetMetrics reports how many servers' last scrape failed.

Charts

Pick up to eight metrics to graph, in the console or with SetFleetCharts, by name without the game_ prefix. The console lists every metric the fleet's servers serve.

Metric name ends inGraphed as
_totalA counter: its rate per second across the fleet, over 5 minutes
anything elseA gauge: its average over the fleet's servers

Graphs cover the last hour, day or week.

On this page