commit 6e4af30f0eded1f80a867ea3954611711f914441 Author: Johnnynator Date: Sat Oct 10 20:16:23 2026 +0200 Add jsonp Stats Hub Endpoint diff --git a/jsonp-Stats-Hub-Endpoint.md b/jsonp-Stats-Hub-Endpoint.md new file mode 100644 index 0000000..1fa9730 --- /dev/null +++ b/jsonp-Stats-Hub-Endpoint.md @@ -0,0 +1,146 @@ +The Hub opens a `/status` http endpoint on port 9001 by default: + +Following configuration options exist: +- `jsonp_listenPort`: Configures the Port this service listens +- `jsonp_maxConnections`: Max concurrent connections that can query the port +- `hub_statusReportFile`: Path to a file that this is getting written (or a URL send to) on a regular basis +- `hub_statusReportInterval`: Interval for former + +The Data can be fetched with a Get request to `/status` and `key=1337k3yHURPdurp` as a query parameter, e.g. `curl -s http://100.93.46.21:9001/status?key=1337k3yHURPdurp` +It also accepts the param `callback=` which wraps the json into `();` + +Example output: +```json +{ + "ver": "1.99.0.167293 (Oct 9 2026)", + "cpu": 0.000, + "noDS": 0, + "gs": 1, + "zi": 2, + "svcs": [ + { + "type": "ST_SHARD", + "sysload": 0.000, + "listens": 3802, + "ssh": 2222, + "tql": 1, + "mode": 3 + }, + { + "type": "ST_AUTHENTICATOR", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 0 + }, + { + "type": "ST_MATCHMAKER", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 1 + }, + { + "type": "ST_GAME_REWARD_DISPENCER", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 0 + }, + { + "type": "ST_CONFIG_SERVER", + "sysload": 0.010, + "listens": 0, + "ssh": 2222, + "mode": 0 + }, + { + "type": "ST_CHAT_SERVER", + "sysload": 0.003, + "listens": 3815, + "ssh": 2222, + "mode": 0 + }, + { + "type": "ST_LOAD_BALANCER", + "sysload": 0.000, + "listens": 3801, + "ssh": 2222, + "mode": 0 + }, + { + "type": "ST_QUEST_SERVER", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 3 + }, + { + "type": "ST_ZONE_COORDINATOR", + "sysload": 0.002, + "listens": 0, + "ssh": 2222, + "mode": 0 + }, + { + "type": "ST_UNIVERSE", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 1 + }, + { + "type": "ST_LEADERBOARD_SERVER", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 1 + }, + { + "type": "ST_ACHIEVEMENT_SERVER", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 3 + }, + { + "type": "ST_CLAN_SERVER", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 1 + }, + { + "type": "ST_LOBBY_SERVER", + "sysload": 0.075, + "listens": 0, + "ssh": 2222, + "mode": 1 + }, + { + "type": "ST_TOURNAMENT", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 1 + }, + { + "type": "ST_ADVENTURE_SERVER", + "sysload": 0.000, + "listens": 0, + "ssh": 2222, + "mode": 3 + }, + { + "type": "ST_SCRIPTS_SERVER", + "sysload": 0.100, + "listens": 0, + "ssh": 2222, + "mode": 1 + } + ], + "maintenance": 0, + "hub_state": 0, + "hub_updating_stage": 0 +} +``` \ No newline at end of file