rebelcore/minecraft-exporter
435
Prometheus exporter for Minecraft metrics exposed in Go with pluggable metric collectors.
If you are new to Prometheus and minecraft_exporter there is
a simple step-by-step guide.
The minecraft_exporter listens on HTTP port 9940 by default.
See the --help output for more options.
Coming Soon!
The minecraft_exporter is designed to monitor your Minecraft players real time locations.
For situations where containerized deployment is needed, you will need to set the RCON address flag to use the docker container hostname.
docker run -d \
-p 9940:9940 \
rebelcore/minecraft-exporter:latest \
--rcon.address=minecraft:25575
For Docker compose, similar flag changes are needed.
---
services:
minecraft_exporter:
image: rebelcore/minecraft-exporter:latest
container_name: minecraft_exporter
command:
- '--rcon.address=minecraft:25575'
ports:
- 9940:9940
restart: unless-stopped
There is varying support for collectors. The tables below list all existing collectors.
Collectors are enabled by providing a --collector.<name> flag.
Collectors that are enabled by default can be disabled
by providing a --no-collector.<name> flag.
To enable only some specific collector(s),
use --collector.disable-defaults --collector.<name> ....
| Name | Description |
|---|---|
| player | Exposes player username, dimension, XP, and coordinates in real time. |
| system | Exposes if the Minecraft server is online or not. |
The minecraft_exporter will expose all metrics from enabled collectors
by default. This is the recommended way to collect metrics to avoid errors.
For advanced use the minecraft_exporter can be passed an optional list
of collectors to filter metrics. The collect[] parameter may be used
multiple times. In Prometheus configuration you can use this syntax under
the scrape config.
params:
collect[]:
- foo
- bar
This can be useful for having different Prometheus servers collect specific metrics from nodes.
Prerequisites:
glibc-static package.Building:
git clone https://github.com/rebelcore/minecraft_exporter.git
cd minecraft_exporter
make build
./minecraft_exporter <flags>
To see all available configuration flags:
./minecraft_exporter --help
make test
EXPERIMENTAL
The exporter supports TLS via a new web configuration file.
./minecraft_exporter --web.config.file=web-config.yml
See the exporter-toolkit web-configuration for more details.
Content type
Image
Digest
sha256:5fef92e80…
Size
12.7 MB
Last updated
about 1 year ago
docker pull rebelcore/minecraft-exporter:v1.0.3