Giter Site home page Giter Site logo

soloplugins-pocketmine / pmmp-prometheus-exporter Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 0.0 1.15 MB

A Time-Series DB, Prometheus Exporter for PocketMine-MP

Shell 0.71% PHP 99.29%
pmmp pocketmine-mp prometheus grafana plugin pmmp-plugin prometheus-exporter tsdb pocketmine-mp-plugin pmmp-servers

pmmp-prometheus-exporter's Introduction

pmmp-prometheus-exporter

A data exporter for monitoring PocketMine-MP server.


Download


How it works?

Create a thread and run HTTP server. By default, server bind to address 0.0.0.0:9655. Prometheus request to each node(In this case pmmp-prometheus-exporter) for gathering metrics data. Thread will request metrics data to plugin (in Main Thread) and return data which gathered by plugin. Finally, data is send to Prometheus.


Reference: Prometheus architecture

Prometheus-Architecture


So what should I do to setup monitoring system?

First, you have to install Prometheus + Grafana

After finished installation, add this plugin to plugins folder.

When server started, plugin will open prometheus exporter on 9655 port.


Second, register the exporter on prometheus.yml.

scrape_configs:
  - job_name: 'pmmp'
    static_configs:
      - targets: ['<server-ip>:9655']

This is an example using Prometheus + Grafana.

Grafana-Example


Metrics List

Metric Description Enabled(default)
pmmp_memory_heap_bytes Memory usage of heap true
pmmp_memory_main_thread_bytes Memory usage of main thread true
pmmp_memory_maximum_bytes Maximum size of system memory true
pmmp_memory_total_bytes Total size of memory true
pmmp_network_download_bytes Network download traffic usage true
pmmp_network_upload_bytes Network upload traffic usage true
pmmp_player_online_count Count of online players true
pmmp_player_total_count Total count of players (Online+Offline) true
pmmp_thread_count PocketMine Thread count true
pmmp_ticks_per_second Indicates how much server lag spikes. (TPS) true
pmmp_tick_usage How much tick using true
pmmp_world_chunk_loaded Loaded chunk count true
pmmp_world_disk_usage_bytes Disk usage of world true
pmmp_world_entity_count Count of entity true
pmmp_world_loaded Currently loaded world true
pmmp_world_player_count How many players in world true
pmmp_world_tick_rate Tick rate time(millisecond) of world true

pmmp-prometheus-exporter's People

Contributors

solo5star avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pmmp-prometheus-exporter's Issues

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.