srcds_exporter icon indicating copy to clipboard operation
srcds_exporter copied to clipboard

Rework Source server information querying to use A2S instead of RCON

Open sappykun opened this issue 11 months ago • 1 comments

I would like to propose that this library start using A2S queries instead of RCON commands to gather its data, or at least provide an option to do so.

I help manage a TF2 server with some other admins. One of them is using this container to gather statistics on how often certain maps are played, etc.

Every 5 seconds or so, the server console gets sent a status command, which dumps a paragraph of information in the server console. Since I use the console quite a bit to recompile and test Sourcemod plugins, this constant spam is incredibly annoying to work with, and I've had to tell the other admin to turn off the exporter.

I am not entirely sure what information this project gathers and displays, but the information you get from an A2S query is mostly the same as the output of status, minus the edict count.

For example, here is an equivalent Python library that allows for A2S queries: https://github.com/Yepoleb/python-a2s (Demo)

Pros of A2S:

  • Doesn't spam the console with status command output
  • Works on any Source/Goldsrc server, regardless of mod (I believe some other Steam games might support A2S as well, but I can't confirm at this time)
  • Doesn't require authentication on the server's side
  • Doesn't require setting an rcon password

Cons of A2S:

  • Doesn't report the edict count

sappykun avatar Mar 20 '24 22:03 sappykun

@sappykun Sorry for the late response.

There seems to be this package available for using A2S with Golang https://github.com/rumblefrog/go-a2s

I would have to see when I have time to implement A2S as a secondary "connection type" option. Adding help wanted label if anyone wants to look into this.

galexrt avatar May 30 '24 11:05 galexrt