Spark REST

Creates a REST Endpoint to show metrics using Spark

Spark-REST

Spark-REST is a lightweight Minecraft Forge 1.20.1 mod that exposes server performance metrics — provided by the Spark profiler — through a simple REST API.
Designed for server administrators who want to monitor TPS, MSPT, CPU usage, and other performance data using external dashboards, bots, or monitoring tools.


🚀 Features

  • Built-in HTTP server that exposes live performance metrics
  • Retrieves data directly from Spark
  • Metrics include: TPS (10s, 1m, 5m, 15m), MSPT, CPU usage, etc…
  • Fully configurable port and endpoint
  • Extremely lightweight and safe for production servers

📦 Requirements

  • Minecraft Forge 1.20.1
  • Spark profiler installed on the server (created by Lucko)
  • Java 17 or higher

Note: Spark-REST does not include Spark. You must install Spark separately.


⚙️ Installation

  1. Download spark-rest.jar
  2. Place it in your server’s /mods/ folder
  3. Ensure the Spark mod is also installed
  4. Start the server to generate the configuration file

📝 Configuration

  • After the first launch, the configuration file is created at:
  • config/spark_rest-common.toml
  • Example:
    • [general] port = 8080 endpoint = "metrics" enabled = true

🔗 REST API

  • Access your metrics from any browser, bot, or dashboard:
  • http://{server-ip}:{port}/{endpoint};
  • Example:
  • http://localhost:8080/metrics
  • Example JSON response:
    • > { "tps_10s": 20.0, "tps_1m": 19.95, "tps_5m": 19.87, "tps_15m": 19.76, "mspt_1m": 12.4, "cpu": 45.2 }

FAQ

  • Spark-REST returns no metrics or errors
            Make sure Spark is installed and running — Spark-REST depends on Spark’s API.
  • The port is already in use
            Change the port value in the config file.

👤 Author


🙌 Credits

  • This mod is powered by performance data provided by the Spark profiler, created by Lucko.
    Spark-REST is not affiliated with the original Spark project but depends on its API to function.

📜 License


The Spark REST Team

profile avatar
Owner
  • 1
    Projects
  • 91
    Downloads