SRCDS Gameserver Prometheus exporter.
Container Image available from:
Container Image Tags:
GIT_TAG- Each Git tags/ releases is built and published.
If you have any issues with a game, please create an issue containing the RCON output of status command and we'll see what we can do to fix compatibility.
Each server in the config file can set a mode to control how it is queried (see srcds.example.yml):
| Mode | Description |
|---|---|
RCON |
Default. Queries the server via RCON (status command). |
ServerQuery |
Queries the server via the Source Server Query protocol. |
A2S |
Queries the server via the Valve A2S protocol. Requires the --a2s flag to be set, and does not use rconPassword. Player metrics won't have a SteamID, ping or packet loss, as A2S doesn't expose them. |
A collector is collecting certain metrics. Which collectors are enabled is controlled by the --collectors.enabled flag.
| Name | Description |
|---|---|
playercount |
Current player count |
map |
Current map played |
| Name | Description |
|---|---|
players |
Report all players by with their Steam ID label as a metric. |
Create the srcds_exporter config file (see srcds.example.yml for an example). The config file can be named whatever you want, the path to the config must be passed to the srcds_exporter through the -config.file=FILE_PATH flag (default: ./srcds.yaml (current directoy file srcds.yaml)).
Then just run the srcds_exporter binary, through Docker (don't forget to add a mount so the config is available in the container), directly or by having it in your PATH.
To get a list of all available flags, use the --help flag (e.g., srcds_exporter --help).
Example output:
$ srcds_exporter --help
Usage of srcds_exporter:
--a2s Enable A2S query support (opt-in, required for servers configured with mode: A2S).
--collectors.enabled string Comma separated list of active collectors (default "map,playercount")
--collectors.print If true, print available collectors and exit.
--config.file string Config file to use. (default "./srcds.yaml")
--log-level string Set log level (default "INFO")
--version Show version information
--web.listen-address string The address to listen on for HTTP requests (default ":9137")
--web.telemetry-path string Path the metrics will be exposed under (default "/metrics")
pflag: help requested
exit status 2