A lightweight Forge mod for Minecraft 1.20.1, created by JonayKB, that exposes server performance metrics from the Spark profiler through a simple REST API.
This mod is intended for server administrators who want to monitor TPS, MSPT, CPU usage, and more using external dashboards or monitoring tools.
- Exposes Spark performance data over HTTP.
- Returns TPS (10s, 1m, 5m, 15m), MSPT, and CPU usage.
- Customizable port and endpoint.
- Optional enable/disable through configuration.
- Extremely lightweight and safe to use.
- Minecraft Forge 1.20.1
- Spark mod installed on the server
- Java 17+
⚠️ Spark-REST does not include Spark. You must install Spark separately.
- Download
spark-rest.jar. - Place it in your server's
/mods/folder. - Ensure that Spark is also installed.
- Start the server to generate the configuration file.
After the first launch, a config file is generated at:
config/spark_rest-common.toml
[general]
port = 8080
endpoint = "metrics"
enabled = true
| Setting | Description | Default |
|---|---|---|
port |
Port on which the HTTP server runs | 8080 |
endpoint |
Path used for exposing the metrics | metrics |
enabled |
Enables or disables the REST API | true |
Once the server is running, Spark-REST exposes metrics at:
http://<your-server-ip>:<port>/<endpoint>
http://localhost:8080/metrics
{
"tps_10s": 20.0,
"tps_1m": 19.95,
"tps_5m": 19.87,
"tps_15m": 19.76,
"mspt_1m": 12.4,
"cpu": 45.2
}A: Ensure the Spark mod is installed. Spark-REST depends on Spark's API.
A: Change the port value in the config file.
JonayKB
If you enjoy the mod, feel free to report issues or suggest improvements!