Skip to content

Logs and Metrics

Liam Robinson edited this page Nov 8, 2026 · 1 revision

Logs and Metrics

The log

The server writes every line to its console (standard output) and to logs/server.log in the data folder. At 16 MiB the file is renamed to server.log.1 and a new one begins, so the log never takes more than 32 MiB. Each place in the code that logs may write at most 20 lines a second (with a burst of 100); lines over that are counted, not written, so a flood cannot fill the disk. Chat lines are always logged, with the sender's short player id.

A line looks like this:

2026-11-07T21:27:10.294723Z  INFO avalanche_server::app: listening on 127.0.0.1:27650 (UDP and TCP); identity key 2ab0af4786b427b0076ea6386ac69110456e3e30c8c904048ccb052ea33ebe1a

Lines worth knowing:

Line Meaning
made data/identity.key (keep it; it is never replaced) the first start made the keys
listening on …; identity key … the server is up; the key operators compare when they pin it
instance 1 on <drop>: its rules loaded in 218 ms a round instance's level is ready
chat: <name>: <text> a chat line (chat: the server: … for say)
banned: …, muted: …, acl: … an operator's decision, with who made it
rcon <operator id>: "<command>": done (1 lines) a remote console command
resources: … resources starting, stopping, failing to read
stopping: 0 rounds under way end within 60 s a graceful stop began

On a systemd service the same lines also go to the journal: journalctl -u avalanche-server.

status

The console's status (see Server Console) prints the uptime and tick times, joins and refusals, traffic, chat, each instance's round, the validation's counts per check, discovery, resources, blocklists and every connected rider.

The HTTP endpoints

The server's TCP port answers a few read-only requests anyone may make, each rate-limited per address:

Request Answer
GET /info the server's details as JSON: name, description, players and maximum, password or not, mode, drop or map, rules, identity key, resources summary, region, tags, icon
GET /players the connected players' names as JSON
GET /resources the resources' manifest the game downloads from

For example GET /info on a fresh server:

{"info_version":6,"name":"Metrics Test","description":"","protocol_version":12,"api_level":0,"build":"project-avalanche/0.3.0","players":0,"max_players":16,"password":false,"mode":"freeride","drop":"exp_alps_vorassay_drop_3","map":null,"rewinds":"on","ghosts":false,"ghost_style":"character","identity_key":"221f5abaee803771242eebc2502cf315890923cf3008dd6b80b08cac6818b549","resources":{"content_id":"17c3ab65958cff79e484b101e753b0f818d6c135cae083e2abd6104c3a41010c","client_mods":"presentation","client_scripts":true,"count":0,"download":0,"manifest":"1ee5f39fde40ac62292bd348a95c62a949ef751543f3a2e3e975cb6992f7cf33","manifest_bytes":381},"region":"eu-central","tags":["race"],"icon":""}

Prometheus metrics

[metrics]
enabled = true
allow = ["127.0.0.1", "::1"]

GET /metrics on the game port then answers in Prometheus's text format, only to the addresses in allow (at most 32 addresses or ranges). Point a Prometheus scrape job at http://<server>:27450/metrics. No label carries a player's key, address or name.

Metric Type What
ssxa_tick_p50_seconds, ssxa_tick_p99_seconds gauge median and 99th percentile tick time over the last 30 s (the server ticks 30 times a second)
ssxa_players, ssxa_max_players gauge connected players, slots
ssxa_instance_players, ssxa_instance_round gauge per instance: players, round number
ssxa_client_sent_bytes_per_second, ssxa_client_received_bytes_per_second histogram each client's traffic
ssxa_client_rtt_seconds, ssxa_client_jitter_seconds histogram each client's round trip and jitter
ssxa_joins_accepted_total, ssxa_join_refusals_total counter joins, refusals by code
ssxa_sessions_total, ssxa_kicks_total counter sessions begun, connections the server ended
ssxa_validation_total counter the run checks' outcomes per check
ssxa_chat_lines_total, ssxa_chat_refusals_total, ssxa_chat_floods_total counter chat
ssxa_traffic_bytes_total counter UDP payload bytes
ssxa_http_requests_total counter HTTP requests answered and refused by a limit
ssxa_rcon_commands_total counter remote console commands run and refused
ssxa_bans, ssxa_mutes gauge entries in bans.toml
ssxa_blocklist_entries, ssxa_blocklist_applied, ssxa_blocklist_age_seconds gauge the followed blocklists
ssxa_script_seconds_total counter server script time per resource

Clone this wiki locally