2019-10-26 16:00:27 +02:00
|
|
|
# minecraft-exporter
|
2019-10-26 16:20:05 +02:00
|
|
|
|
2022-02-21 09:20:29 +01:00
|
|
|
This is a prometheus minecraft exporter
|
|
|
|
|
2019-10-26 16:20:05 +02:00
|
|
|
This exporter reads minecrafts nbt files, the advancements files and can optionally connect via RCON to your minecraft server.
|
|
|
|
|
2022-02-21 09:20:29 +01:00
|
|
|
To use it mount your world to /world in the container
|
2019-10-26 16:20:05 +02:00
|
|
|
|
2022-02-21 09:20:29 +01:00
|
|
|
RCON connection is used to get online Players
|
2021-12-10 09:53:30 +01:00
|
|
|
On Forge Servers enable FORGE_SERVER to get tps information
|
2021-12-10 09:51:27 +01:00
|
|
|
On Paper Servers enable PAPER_SERVER to get tps information
|
2019-10-26 16:20:05 +02:00
|
|
|
|
2022-02-21 09:20:29 +01:00
|
|
|
To enable rcon on your minecraft server add the following to the server.properties file:
|
2019-10-26 16:20:05 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
broadcast-rcon-to-ops=false
|
|
|
|
rcon.port=25575
|
|
|
|
rcon.password=Password
|
|
|
|
enable-rcon=true
|
|
|
|
```
|
|
|
|
|
2022-02-21 09:20:29 +01:00
|
|
|
> Note: Broadcast RCON to ops is disabled, to avoid ops receiving spam whilst ingame.
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
# Environment Variables
|
|
|
|
|
|
|
|
| Name | Default | Description |
|
|
|
|
| ------------- | ------- | ------------------------------------------------- |
|
|
|
|
| RCON_HOST | `None` | Host of the RCON server |
|
|
|
|
| RCON_PORT | `None` | Port RCON is hosted on |
|
|
|
|
| RCON_PASSWORD | `None` | RCON Password for access |
|
|
|
|
| HTTP_PORT | `8000` | Port to host on, in case of using outside docker* |
|
2019-10-26 16:20:05 +02:00
|
|
|
|
2022-02-21 09:20:29 +01:00
|
|
|
> * Or other cases where you have limited control of port mappings, eg Pterodactyl.
|
|
|
|
|
|
|
|
---
|
2019-10-26 16:20:05 +02:00
|
|
|
|
|
|
|
# Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
docker run -e RCON_HOST=127.0.0.1 \
|
|
|
|
-e RCON_PORT=25575 \
|
|
|
|
-e RCON_PASSWORD="Password" \
|
2020-05-09 20:23:23 +02:00
|
|
|
-e FORGE_SERVER="True" \
|
2021-12-10 09:51:27 +01:00
|
|
|
-e PAPER_SERVER="True" \
|
2020-03-27 21:56:05 +01:00
|
|
|
-e DYNMAP_ENABLED="True" \
|
2019-10-26 16:20:05 +02:00
|
|
|
-p 8000:8000 \
|
|
|
|
-v /opt/all_the_mods_3/world:/world \
|
|
|
|
joshi425/minecraft_exporter
|
|
|
|
```
|
|
|
|
|
|
|
|
# Metrics
|
|
|
|
|
|
|
|
```
|
|
|
|
blocks_mined
|
|
|
|
blocks_picked_up
|
|
|
|
player_deaths
|
|
|
|
player_jumps
|
|
|
|
cm_traveled
|
|
|
|
player_xp_total
|
|
|
|
player_current_level
|
|
|
|
player_food_level
|
|
|
|
player_health
|
|
|
|
player_score
|
|
|
|
entities_killed
|
|
|
|
damage_taken
|
|
|
|
damage_dealt
|
|
|
|
blocks_crafted
|
|
|
|
player_playtime
|
|
|
|
player_advancements
|
|
|
|
player_slept
|
|
|
|
player_used_crafting_table
|
2020-01-11 18:25:36 +01:00
|
|
|
player_quests_finished # support for betterquesting
|
2020-05-09 20:07:07 +02:00
|
|
|
mc_custom # for 1.15
|
2019-10-26 16:20:05 +02:00
|
|
|
```
|
2022-02-21 09:20:29 +01:00
|
|
|
|
|
|
|
The following Metrics are only exported if RCON is configured:
|
|
|
|
|
2019-10-26 16:20:05 +02:00
|
|
|
```
|
|
|
|
dim_tps
|
|
|
|
dim_ticktime
|
|
|
|
overall_tps
|
|
|
|
overall_ticktime
|
2019-10-30 18:37:33 +01:00
|
|
|
player_online
|
2019-10-26 16:20:05 +02:00
|
|
|
```
|
|
|
|
|
2022-02-21 09:20:29 +01:00
|
|
|
The following Metrics are exposed if Dynmap Support is enabled:
|
2020-03-27 21:56:05 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
dynmap_tile_render_statistics
|
|
|
|
dynmap_chunk_loading_statistics_count
|
|
|
|
dynmap_chunk_loading_statistics_duration
|
|
|
|
```
|
|
|
|
|
2022-02-21 09:20:29 +01:00
|
|
|
The following Metrics are exposed if PAPER_SERVER is enabled:
|
2021-12-10 09:51:27 +01:00
|
|
|
```
|
|
|
|
tps_1m
|
|
|
|
tps_5m
|
|
|
|
tps_15m
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2019-10-26 16:20:05 +02:00
|
|
|
# Dashboards
|
|
|
|
|
|
|
|
In the folder dashboards you'll find grafana dashboards for these metrics, they are however incomplete and can be expanded
|
2019-10-26 17:13:00 +02:00
|
|
|
or use the following dasboards:
|
|
|
|
|
2020-03-27 22:41:43 +01:00
|
|
|
https://grafana.com/grafana/dashboards/11993
|
2020-03-27 22:41:10 +01:00
|
|
|
https://grafana.com/grafana/dashboards/11994
|