Git Product home page Git Product logo

prometheusexporter's Introduction

Minecraft Prometheus Exporter

A Sponge plugin which exports Minecraft server stats for Prometheus.

Quick Start

Drop the the plugin jar into your servers mods directory and start your server.

After startup, the Prometheus metrics endpoint should be available at localhost:9225/metrics (assuming localhost is the server hostname).

The metrics port can be customized in the plugin's config file (a default config will be created after the first use).

Prometheus config

Add the following job to the scrape_configs section of your Prometheus configuration:

Single Server

- job_name: 'minecraft'
  static_configs:
    - targets: ['localhost:9225']

Multiple Server

  - job_name: 'minecraft'
    static_configs:
      - targets: ['localhost:9225']
        labels:
          group: 'server1'
      - targets: ['localhost:9226']
        labels:
          group: 'server2'
      - targets: ['localhost:9226']
        labels:
          group: 'server3'

In the grafana json add {group="serverX"} to each search query.

Import Grafana Dashboard

  1. Navigate to Grafana -> Dashboards -> Import
  2. Paste in or upload minecraft-grafana.json
  3. Update "JVM Memory Used" to reflect your server max memory (Default 8G)
  4. Edit (bottom right widget) -> Options -> Gauage -> Max

Available metrics

These are the stats that are currently exported by the plugin.

Label Description
mc_players_total Online and Max Online players
mc_tps Overall tps
mc_loaded_chunks_total Chunks loaded per world
mc_players_online_total Online players per world
mc_entities_total Entities loaded per world
mc_tile_entities_total Tile Entities loaded per world
mc_jvm_memory JVM memory usage

prometheusexporter's People

Contributors

phit avatar sladkoff avatar zaquestion avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.