作者:rebot | 分类:模组
Minecraft 版本: 26.1
平台: fabric
标签: utility
Fabric mod that adds a Prometheus exporter with general metrics of your server.
It's a server-side mod that exposes metrics of your Fabric server in Prometheus format.
So, it requires you to have at least Prometheus installed to collect provided metrics.
I recommend also using Grafana to visualize data.
If you want to get TPS and MSPT metrics, you should also install Spark as mod for your Fabric server.
Here is a list of metrics that are collected by FabricExporter.
You can disable any of these metrics in config.
| Prometheus name | Description | Config property | Collected by |
|---|---|---|---|
minecraft_loaded_chunks |
Amount of currently loaded chunks on server | enable-loaded-chunks |
Minecraft |
minecraft_total_loaded_chunks |
Amount of total loaded chunks on server | enable-total-loaded-chunks |
Minecraft |
minecraft_mspt |
Count of milliseconds per tick (MSPT) | enable-mspt |
Spark |
minecraft_tps |
Count of ticks per second (TPS) | enable-tps |
Spark |
minecraft_players_online |
Amount of currently online players on your server | enable-players-online |
FabricExporter |
minecraft_entities |
Amount of currently loaded entities on your server | enable-entities |
FabricExporter |
minecraft_handshakes |
Count of handshake requests | enable-handshakes |
FabricExporter |
To use this mod you should have at least Fabric server and Prometheus installed.
mods folder.config/exporter.properties, ensure that server-port value is an open port that can be accessed by your Prometheus and change it if required./etc/prometheus/prometheus.yml by default).sudo nano /etc/prometheus/prometheus.yml
scrape_configs section.127.0.0.1 with address of your server and 25585 with port specified in server-port property in exporter.properties file.
sudo service prometheus restart
If you want to use Grafana, you can use my dashboard as template.
I assume that you have already created a Prometheus data source in Grafana.
So, let's import dashboard for FabricExporter.
Create -> Import tab.14492 in "Import via grafana.com" field and click "Load".After your server starts, FabricExporter will create exporter.properties file in the config folder.
You should use this file to configure the mod.
In this file you can see some general settings and metrics settings.
| Property | Description | Default value |
|---|---|---|
server-port |
Port on what the web server will listen for requests | 25585 |
update-interval |
Interval between gauge metrics updates in milliseconds | 1000 |
use-spark |
If set to false, FabricExporter will be independent from Spark |
true |
You can disable any metric that registered via MetricRegistry (all metrics by default) using exporter.properties file.
Names of properties consist of enable and metric name without prefix and _ replaced with -.
For example, if you want to disable minecraft_players_online, you should set enable-players-online to false.
You can also see list of available properties in "Exposed metrics" section.
If you can't find property for some metrics, you can manually add it.
All metrics are enabled by default.
MIT license. Read more in LICENSE
请登录后举报
暂无评论,抢个沙发吧~