Set up Fabric Exporter to monitor your server
Install and configure the exporter
Fabric Exporter Mod sends your server metrics to Prometheus for monitoring. Before starting, ensure Prometheus is installed on your monitoring machine.
1. Install the mod on your Fabric server
2. Start the server once to generate exporter.properties in your server directory
3. Open exporter.properties and note the server-port value (default is typically 9145)
4. Decide which network interface the exporter should listen on (use 0.0.0.0 for all interfaces, or a specific IP)
Connect Prometheus to your exporter
1. On your Prometheus machine, open the config file: sudo nano /etc/prometheus/prometheus.yml
2. Locate the scrape_configs: section
3. Add a new job:
`yaml
- job_name: 'minecraft'
static_configs:
- targets: ['YOUR_SERVER_IP:YOUR_PORT']
`
Replace YOUR_SERVER_IP with your server's address and YOUR_PORT with the port from step 3.
4. Save and restart Prometheus: sudo systemctl restart prometheus
5. Verify in Prometheus web UI that the target shows as "UP"