#minecraft-server #prometheus-exporter #scraper #rcon #file #yaml

app minecraft-prometheus-exporter

A prometheus exporter for minecraft servers

3 stable releases

1.1.0 Sep 19, 2021
1.0.1 Sep 13, 2021

#21 in #rcon

MPL-2.0 license

25KB
414 lines

minecraft-prometheus-exporter

A scraper for Prometheus for minecraft (1.13+) servers.

Usage

First, enable rcon on your minecraft server, by setting the following values in server.properties:

rcon.port=<port>
rcon.password=<password>
enable-rcon=true

Then, create a configuration file. An example configuration file is provided in config.yml. Then run the program with the path to that file as the first argument e.g. ./target/release/minecraft-server-exporter config.yml.

This program runs an http server, which Prometheus then polls. An example Prometheus configuration is provided:

scrape_configs:
  - job_name: "minecraft"
    scrape_timeout: 30s
    static_configs:
      - targets: ["localhost::9001"]

Available under the Mozilla Public Licence, version 2.0

Dependencies

~26–43MB
~699K SLoC