{"id":16927218,"url":"https://github.com/dirien/minecraft-prometheus-exporter","last_synced_at":"2025-12-25T13:01:55.733Z","repository":{"id":37209129,"uuid":"383757320","full_name":"dirien/minecraft-prometheus-exporter","owner":"dirien","description":"Minecraft Prometheus exporter","archived":false,"fork":false,"pushed_at":"2025-04-01T01:52:19.000Z","size":2199,"stargazers_count":98,"open_issues_count":10,"forks_count":15,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-04T23:08:55.745Z","etag":null,"topics":["go","hacktoberfest","metrics","minecraft","minectl","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dirien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-07T10:19:24.000Z","updated_at":"2025-04-01T01:51:51.000Z","dependencies_parsed_at":"2023-10-31T04:24:03.913Z","dependency_job_id":"bd5f961e-8ec0-47e6-859c-eb92d1a9f378","html_url":"https://github.com/dirien/minecraft-prometheus-exporter","commit_stats":{"total_commits":890,"total_committers":7,"mean_commits":"127.14285714285714","dds":0.1235955056179775,"last_synced_commit":"4a2959b082e28a5a4218bef24c376cbb5302f768"},"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fminecraft-prometheus-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fminecraft-prometheus-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fminecraft-prometheus-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fminecraft-prometheus-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirien","download_url":"https://codeload.github.com/dirien/minecraft-prometheus-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406085,"owners_count":20933803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","hacktoberfest","metrics","minecraft","minectl","prometheus","prometheus-exporter"],"created_at":"2024-10-13T20:33:22.616Z","updated_at":"2025-12-25T13:01:55.725Z","avatar_url":"https://github.com/dirien.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"###### ⚠️ Statistics are present only in Java Edition. Bedrock Edition has no equivalent of statistics in-game ⚠️\n\n# Minecraft Exporter for Prometheus\n\n![minecraft-exporter](https://dirien.github.io/minecraft-prometheus-exporter/img/minecraft-exporter.jpg)\n\n![Prometheus](https://img.shields.io/badge/Prometheus-E6522C?style=for-the-badge\u0026logo=Prometheus\u0026logoColor=white)\n![Minecraft](https://img.shields.io/badge/Minecraft-62B47A?style=for-the-badge\u0026logo=Minecraft\u0026logoColor=white)\n![Grafana](https://img.shields.io/badge/Grafana-F46800?style=for-the-badge\u0026logo=Grafana\u0026logoColor=white)\n![Docker](https://img.shields.io/badge/docker-2496ED?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n![Chaingard Images Static](https://img.shields.io/badge/chainguard_image_static-4445E7?style=for-the-badge\u0026logo=alpine-linux\u0026logoColor=white)\n![Helm](https://img.shields.io/badge/helm-0F1689?style=for-the-badge\u0026logo=helm\u0026logoColor=white)\n\n[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/minecraft-exporter\u0026style=for-the-badge)](https://artifacthub.io/packages/search?repo=minecraft-exporter)\n[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/minecraft-exporter-image\u0026style=for-the-badge)](https://artifacthub.io/packages/search?repo=minecraft-exporter-image)\n\n![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/dirien/minecraft-prometheus-exporter/Build%20Binary/main?logo=github\u0026style=for-the-badge)\n![GitHub](https://img.shields.io/github/license/dirien/minecraft-prometheus-exporter?style=for-the-badge)\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/dirien/minecraft-prometheus-exporter?style=for-the-badge)\n\nThis is a Prometheus Minecraft exporter, created as part of the [minectl 🗺](https://github.com/dirien/minectl) project.\n\nIt collects metrics from different sources of the game\n\n- RCON\n- NBT Files\n- Advancement file\n- Player stats file\n\n#### Getting started\n\nShort getting started guide with systemd unit file on ubuntu linux\n\n##### Create Systemd unit file\n\n```bash\ntee /etc/systemd/system/minecraft-exporter.service \u003c\u003cEOF\n[Unit]\nDescription=Minecraft Exporter\nWants=network-online.target\nAfter=network-online.target\n[Service]\nUser=minecraft_exporter\nGroup=minecraft_exporter\nType=simple\nExecStart=/usr/local/bin/minecraft-exporter \\\n  --mc.rcon-password=\u003crcon password if needed\u003e\n[Install]\nWantedBy=multi-user.target\nEOF\n```\n\n#### Install Minecraft Exporter\n\n```\nMINECRAFT_EXPORTER_VERSION=0.6.1\ncurl -sSL https://github.com/dirien/minecraft-prometheus-exporter/releases/download/v$MINECRAFT_EXPORTER_VERSION/minecraft-exporter_$MINECRAFT_EXPORTER_VERSION.linux-$ARCH.tar.gz | tar -xz\ncp minecraft-exporter /usr/local/bin\nchown minecraft_exporter:minecraft_exporter /usr/local/bin/minecraft-exporter\nsystemctl start minecraft-exporter.service\nsystemctl enable minecraft-exporter.service\n```\n\n#### RCON\n\nRCON is a protocol that can be used to remotely execute commands to your Minecraft server.\n\nTo enable rcon on your minecraft server add the following to the `java` field in your `minectl` manifest:\n\n```yaml\n    ...\n    java:\n      xmx: 2G\n      xms: 2G\n      rcon:\n        password: test\n        port: 25575\n        enabled: true\n        broadcast: true\n    edition: java\n      ...\n```\n\nSee [server config examples](https://github.com/dirien/minectl#server-config-) for details and usage of the minectl 🗺\nmanifest file.\n\nAlternatively you need to edit your server.properties on your server.\n\nBe sure that following flags are set for the `minecraft-exporter` binary:\n\n```bash\n--mc.rcon-address=\":25575\"  \n--mc.rcon-password=\u003crcon-password\u003e\n```\n\nor\n\n```bash\nexport MC_RCON_ADDRESS=\":25575\"\nexport MC_RCON_PASSWORD=\u003crcon-password\u003e\n```\n\n#### Files\n\nTo access the files, take care that the `minecraft-exporter` binary is started with the flag\n\nDetails for the specific stats can be found here -\u003e https://minecraft.fandom.com/wiki/Statistics\n\n```bash\n--mc.world=path/to/world\n```\n\nor\n\n```bash\nexport MC_WORLD=path/to/world\n```\n\n#### API\n\nDue to restrictions of the API from mojang `https://api.mojang.com/user/profiles/[uuid]/names` we switched to the\nproject of [Electroid](https://github.com/Electroid/mojang-api)\n\nMojang, the developers of Minecraft, provides multiple APIs for websites and servers to fetch identity information about\nusers. Requests do not accept authentication tokens, however they are heavily rate limited and fragmented among several\nendpoints. The purpose of this project is to package several of the most commonly used APIs into a single GET request\nwith no rate limiting and no need for client-side caching.\n\n### Usage ⚙\n\n```bash\nusage: minecraft-exporter [\u003cflags\u003e]\n\nFlags:\n  -h, --help                     Show context-sensitive help (also try --help-long and --help-man).\n      --web.config.file=\"\"       [EXPERIMENTAL] Path to configuration file that can enable TLS or authentication.\n      --web.telemetry-path=\"/metrics\"  \n                                 Path under which to expose metrics.\n      --web.listen-address=\":9150\"  \n                                 Address to listen on for web interface and telemetry.\n      --web.disable-exporter-metrics  \n                                 Disabling collection of exporter metrics (like go_*)\n      --mc.config-path=\"config.yml\"  \n                                 Path to YAML file with config.\n      --mc.world=\"/minecraft/world\"  \n                                 Path the to world folder\n      --mc.rcon-address=\":25575\"  \n                                 Address of the Minecraft rcon.\n      --mc.rcon-password=MC.RCON-PASSWORD  \n                                 Password of the Minecraft rcon.\n      --mc.name-source=\"mojang\"  How to retrieve names of players: offline, bukkit, mojang.\n      --mc.mod-server-stats=MC.MOD-SERVER-STATS  \n                                 Additional server stats for papermc, purpurmc, forge, or fabric.\n      --log.level=info           Only log messages with the given severity or above. One of: [debug, info, warn, error]\n      --log.format=logfmt        Output format of log messages. One of: [logfmt, json]\n      --version                  Show application version.\n```\n\n### Config 🔧\n\nYou can override CLI flags using config file. By default, `config.yml` located in the current directory is used. Path to\nconfig file can be changed using `--config-path` CLI flag.\n\n| Key in config file         | Equivalent CLI flag              | ENV variable                  | Description                                                           |\n|----------------------------|----------------------------------|-------------------------------|-----------------------------------------------------------------------|\n| `metrics-path`             | `--web.telemetry-path`           | WEB_TELEMETRY_PATH            | Path under which to expose metrics.                                   |\n| `listen-address`           | `--web.listen-address`           | WEB_LISTEN_ADDRESS            | Address to listen on for web interface and telemetry.                 |\n| `disable-exporter-metrics` | `--web.disable-exporter-metrics` | WEB_DISABLED_EXPORTER_METRICS | Disabling collection of exporter metrics (like go_*)                  |\n| `web-config`               | `--mc.config-path`               | MC_CONFIG_PATH                | Path to YAML file with config for the mc variables                    |\n| `world-path`               | `--mc.world`                     | MC_WORLD                      | Path to the world folder.                                             |\n| `rcon-address`             | `--mc.rcon-address`              | MC_RCON_ADDRESS               | Address for the Minecraft RCON.                                       |\n| `rcon-password`            | `--mc.rcon-password`             | MC_RCON_PASSWORD              | Password for the Minecraft RCON.                                      |\n| `name-source`              | `--mc.name-source`               | MC_NAME_SOURCE                | How to retrieve names of players: offline, bukkit, mojang.            |\n| `mod-server-stats`         | `--mc.mod-server-stats`          | MC_MOD_SERVER_STATS           | Set server for additional stats (papermc, purpurmc, forge, or fabric) |\n\n#### Disable exporter metrics\n\nWith the flag `--web.disable-exporter-metrics` you can disable collection of exporter metrics (like go_*). This is\nuseful if you want just see the minecraft metrics and not the exporter metrics.\n\n#### Disabling metrics\n\nTo disable certain metrics, just add corresponding key to `disabled-metrics` section with `true` value in your config\nfile. You should use keys that used by Minecraft to store players' stats.\n\n#### Example config (--mc.config-path/MC_CONFIG_PATH)\n\n```yaml\ndisabled-metrics:\n  minecraft:bred_animals: true # Disable \"minecraft_animals_bred_total\" metric\n  minecraft:creeper: true # Disable all metrics related with creepers\n  minecraft:custom: false # \"false\" values will be ignored, so this line does nothing\nlisten-address: ':9151' # Change address of web server. \"--web.listen-address\" will be ignored if this line is present here\n```\n\n### Known Issues ⚠️️\n\n`minecraft-exporter` is heavily dependent on the username of the player. If you are using mods like [EssentialsX](https://essentialsx.net/)\nand hide or change the default grouping of players, then `minecraft-exporter` will may not work properly.\n\n\u003e If you encounter any issues, please let me know by opening an GitHub issue in this repository.\n\n### Collectors 📊\n\nThe exporter collects a number of statistics from the server (with example of the labels):\n\n```bash\n# HELP minecraft_animals_bred_total The number of times the player bred two mobs\n# TYPE minecraft_animals_bred_total counter\nminecraft_animals_bred_total{player=\"ediri\"} 0\n# HELP minecraft_bells_rung_total The number of times the player rang a bell\n# TYPE minecraft_bells_rung_total counter\nminecraft_bells_rung_total{player=\"ediri\"} 0\n# HELP minecraft_blocks_mined_total Statistic related to the number of blocks a player mined\n# TYPE minecraft_blocks_mined_total counter\nminecraft_blocks_mined_total{block=\"birch_log\",namespace=\"minecraft\",player=\"ediri\"} 2\nminecraft_blocks_mined_total{block=\"clay\",namespace=\"minecraft\",player=\"ediri\"} 1\nminecraft_blocks_mined_total{block=\"coal_ore\",namespace=\"minecraft\",player=\"ediri\"} 16\nminecraft_blocks_mined_total{block=\"crafting_table\",namespace=\"minecraft\",player=\"ediri\"} 2\nminecraft_blocks_mined_total{block=\"dirt\",namespace=\"minecraft\",player=\"ediri\"} 19\nminecraft_blocks_mined_total{block=\"grass\",namespace=\"minecraft\",player=\"ediri\"} 38\nminecraft_blocks_mined_total{block=\"grass_block\",namespace=\"minecraft\",player=\"ediri\"} 18\nminecraft_blocks_mined_total{block=\"oak_leaves\",namespace=\"minecraft\",player=\"ediri\"} 5\nminecraft_blocks_mined_total{block=\"oak_log\",namespace=\"minecraft\",player=\"ediri\"} 11\nminecraft_blocks_mined_total{block=\"oak_planks\",namespace=\"minecraft\",player=\"ediri\"} 1\nminecraft_blocks_mined_total{block=\"oxeye_daisy\",namespace=\"minecraft\",player=\"ediri\"} 1\nminecraft_blocks_mined_total{block=\"seagrass\",namespace=\"minecraft\",player=\"ediri\"} 5\nminecraft_blocks_mined_total{block=\"spruce_leaves\",namespace=\"minecraft\",player=\"ediri\"} 11\nminecraft_blocks_mined_total{block=\"spruce_log\",namespace=\"minecraft\",player=\"ediri\"} 13\nminecraft_blocks_mined_total{block=\"stone\",namespace=\"minecraft\",player=\"ediri\"} 2\nminecraft_blocks_mined_total{block=\"tall_grass\",namespace=\"minecraft\",player=\"ediri\"} 1\nminecraft_blocks_mined_total{block=\"tall_seagrass\",namespace=\"minecraft\",player=\"ediri\"} 5\nminecraft_blocks_mined_total{block=\"vine\",namespace=\"minecraft\",player=\"ediri\"} 2\nminecraft_blocks_mined_total{block=\"wall_torch\",namespace=\"minecraft\",player=\"ediri\"} 1\n# HELP minecraft_cake_slices_eaten_total The number of times the player ate cake\n# TYPE minecraft_cake_slices_eaten_total counter\nminecraft_cake_slices_eaten_total{player=\"ediri\"} 0\n# HELP minecraft_cleaned_armors_total The number of times the player washed dyed leather armor with a cauldron\n# TYPE minecraft_cleaned_armors_total counter\nminecraft_cleaned_armors_total{player=\"ediri\"} 0\n# HELP minecraft_cleaned_banner_total The number of times the player washed a banner with a cauldron\n# TYPE minecraft_cleaned_banner_total counter\nminecraft_cleaned_banner_total{player=\"ediri\"} 0\n# HELP minecraft_damage_dealt_total The amount of damage the player has dealt of different types (in tenths of 1♥)\n# TYPE minecraft_damage_dealt_total counter\nminecraft_damage_dealt_total{player=\"ediri\",type=\"absorbed\"} 0\nminecraft_damage_dealt_total{player=\"ediri\",type=\"hit\"} 610\nminecraft_damage_dealt_total{player=\"ediri\",type=\"resisted\"} 0\n# HELP minecraft_damage_received_total The amount of damage the player has taken of different types (in tenths of 1♥)\n# TYPE minecraft_damage_received_total counter\nminecraft_damage_received_total{player=\"ediri\",type=\"absorbed\"} 0\nminecraft_damage_received_total{player=\"ediri\",type=\"blocked_by_shield\"} 0\nminecraft_damage_received_total{player=\"ediri\",type=\"resisted\"} 0\nminecraft_damage_received_total{player=\"ediri\",type=\"taken\"} 2295\n# HELP minecraft_deaths_total The number of times the player died\n# TYPE minecraft_deaths_total counter\nminecraft_deaths_total{player=\"ediri\"} 9\n# HELP minecraft_entities_killed_total Statistics related to the number of entities a player killed\n# TYPE minecraft_entities_killed_total counter\nminecraft_entities_killed_total{entity=\"pig\",player=\"ediri\"} 2\n# HELP minecraft_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which minecraft_exporter was built.\n# TYPE minecraft_exporter_build_info gauge\nminecraft_exporter_build_info{branch=\"\",goversion=\"go1.16.5\",revision=\"\",version=\"\"} 1\n# HELP minecraft_filled_cauldrons_total The number of times the player filled a cauldron with a water bucket\n# TYPE minecraft_filled_cauldrons_total counter\nminecraft_filled_cauldrons_total{player=\"ediri\"} 0\n# HELP minecraft_fish_caught_total The number of times the player caught fish\n# TYPE minecraft_fish_caught_total counter\nminecraft_fish_caught_total{player=\"ediri\"} 0\n# HELP minecraft_games_left_total The number of times the player clicked \"Save and quit to title\"\n# TYPE minecraft_games_left_total counter\nminecraft_games_left_total{player=\"ediri\"} 12\n# HELP minecraft_inspected_total The number of times the player inspected a dispenser, hopper or dropper\n# TYPE minecraft_inspected_total counter\nminecraft_inspected_total{entity=\"dispenser\",player=\"ediri\"} 0\nminecraft_inspected_total{entity=\"dropper\",player=\"ediri\"} 0\nminecraft_inspected_total{entity=\"hopper\",player=\"ediri\"} 0\n# HELP minecraft_interactions_total The number of times the player interacted with different entities\n# TYPE minecraft_interactions_total counter\nminecraft_interactions_total{entity=\"anvil\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"beacon\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"blast_furnace\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"brewingstand\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"campfire\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"cartography_table\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"crafting_table\",player=\"ediri\"} 10\nminecraft_interactions_total{entity=\"furnace\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"grindston\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"lectern\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"loom\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"smithing_table\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"smoker\",player=\"ediri\"} 0\nminecraft_interactions_total{entity=\"stonecutter\",player=\"ediri\"} 0\n# HELP minecraft_item_actions_total Statistics related to items and the number of times they were used, picked up, dropped or broken\n# TYPE minecraft_item_actions_total counter\nminecraft_item_actions_total{action=\"broken\",namespace=\"minecraft\",entity=\"wooden_axe\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"crafted\",namespace=\"minecraft\",entity=\"crafting_table\",player=\"ediri\"} 3\nminecraft_item_actions_total{action=\"crafted\",namespace=\"minecraft\",entity=\"oak_planks\",player=\"ediri\"} 32\nminecraft_item_actions_total{action=\"crafted\",namespace=\"minecraft\",entity=\"oak_wood\",player=\"ediri\"} 6\nminecraft_item_actions_total{action=\"crafted\",namespace=\"minecraft\",entity=\"spruce_planks\",player=\"ediri\"} 28\nminecraft_item_actions_total{action=\"crafted\",namespace=\"minecraft\",entity=\"stick\",player=\"ediri\"} 32\nminecraft_item_actions_total{action=\"crafted\",namespace=\"minecraft\",entity=\"torch\",player=\"ediri\"} 8\nminecraft_item_actions_total{action=\"crafted\",namespace=\"minecraft\",entity=\"wooden_axe\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"crafted\",namespace=\"minecraft\",entity=\"wooden_pickaxe\",player=\"ediri\"} 3\nminecraft_item_actions_total{action=\"crafted\",namespace=\"minecraft\",entity=\"wooden_shovel\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"dropped\",namespace=\"minecraft\",entity=\"porkchop\",player=\"ediri\"} 4\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"birch_log\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"coal\",player=\"ediri\"} 15\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"crafting_table\",player=\"ediri\"} 2\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"dirt\",player=\"ediri\"} 33\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"oak_log\",player=\"ediri\"} 11\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"oak_planks\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"oak_sapling\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"oxeye_daisy\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"porkchop\",player=\"ediri\"} 4\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"spruce_log\",player=\"ediri\"} 13\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"torch\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"picked_up\",namespace=\"minecraft\",entity=\"wheat_seeds\",player=\"ediri\"} 6\nminecraft_item_actions_total{action=\"used\",namespace=\"minecraft\",entity=\"crafting_table\",player=\"ediri\"} 3\nminecraft_item_actions_total{action=\"used\",namespace=\"minecraft\",entity=\"oak_planks\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"used\",namespace=\"minecraft\",entity=\"oxeye_daisy\",player=\"ediri\"} 1\nminecraft_item_actions_total{action=\"used\",namespace=\"minecraft\",entity=\"torch\",player=\"ediri\"} 2\nminecraft_item_actions_total{action=\"used\",namespace=\"minecraft\",entity=\"wooden_axe\",player=\"ediri\"} 52\nminecraft_item_actions_total{action=\"used\",namespace=\"minecraft\",entity=\"wooden_pickaxe\",player=\"ediri\"} 26\n# HELP minecraft_items_dropped_total The number of items the player dropped\n# TYPE minecraft_items_dropped_total counter\nminecraft_items_dropped_total{player=\"ediri\"} 1\n# HELP minecraft_items_enchanted_total The number of items the player enchanted\n# TYPE minecraft_items_enchanted_total counter\nminecraft_items_enchanted_total{player=\"ediri\"} 0\n# HELP minecraft_jumps_total The number of times the player jumped\n# TYPE minecraft_jumps_total counter\nminecraft_jumps_total{player=\"ediri\"} 406\n# HELP minecraft_killed_by_total Statistics related to the number of times a player was killed by entities\n# TYPE minecraft_killed_by_total counter\nminecraft_killed_by_total{entity=\"skeleton\",namespace=\"minecraft\",player=\"ediri\"} 1\nminecraft_killed_by_total{entity=\"zombie\",namespace=\"minecraft\",player=\"ediri\"} 7\n# HELP minecraft_mobs_killed_total The number of mobs the player killed\n# TYPE minecraft_mobs_killed_total counter\nminecraft_mobs_killed_total{player=\"ediri\"} 2\n# HELP minecraft_movement_meters_total The total distance the player traveled by different methods (ladders, boats, swimming etc.)\n# TYPE minecraft_movement_meters_total counter\nminecraft_movement_meters_total{means=\"aviate\",player=\"ediri\"} 0\nminecraft_movement_meters_total{means=\"boat\",player=\"ediri\"} 0\nminecraft_movement_meters_total{means=\"climb\",player=\"ediri\"} 0.16\nminecraft_movement_meters_total{means=\"crouch\",player=\"ediri\"} 0\nminecraft_movement_meters_total{means=\"fall\",player=\"ediri\"} 58.49\nminecraft_movement_meters_total{means=\"fly\",player=\"ediri\"} 55.14\nminecraft_movement_meters_total{means=\"horse\",player=\"ediri\"} 0\nminecraft_movement_meters_total{means=\"minecart\",player=\"ediri\"} 0\nminecraft_movement_meters_total{means=\"pig\",player=\"ediri\"} 0\nminecraft_movement_meters_total{means=\"sprint\",player=\"ediri\"} 0.17\nminecraft_movement_meters_total{means=\"strider\",player=\"ediri\"} 0\nminecraft_movement_meters_total{means=\"swim\",player=\"ediri\"} 0\nminecraft_movement_meters_total{means=\"walk\",player=\"ediri\"} 1411.7\nminecraft_movement_meters_total{means=\"walk_on_water\",player=\"ediri\"} 168.45\nminecraft_movement_meters_total{means=\"walk_under_water\",player=\"ediri\"} 156.92\n# HELP minecraft_noteblocks_played_total The number of times the player hit a note block\n# TYPE minecraft_noteblocks_played_total counter\nminecraft_noteblocks_played_total{player=\"ediri\"} 0\n# HELP minecraft_noteblocks_tuned_total The number of times the player tuned a note block\n# TYPE minecraft_noteblocks_tuned_total counter\nminecraft_noteblocks_tuned_total{player=\"ediri\"} 0\n# HELP minecraft_opened_barrels_total The number of times the player opened a barrel\n# TYPE minecraft_opened_barrels_total counter\nminecraft_opened_barrels_total{player=\"ediri\"} 0\n# HELP minecraft_opened_chests_total The number of times the player opened a chest\n# TYPE minecraft_opened_chests_total counter\nminecraft_opened_chests_total{player=\"ediri\"} 0\n# HELP minecraft_opened_enderchests_total The number of times the player opened an ender chest\n# TYPE minecraft_opened_enderchests_total counter\nminecraft_opened_enderchests_total{player=\"ediri\"} 0\n# HELP minecraft_play_time_ticks_total The number of ticks the player has played\n# TYPE minecraft_play_time_ticks_total counter\nminecraft_play_time_ticks_total{player=\"ediri\"} 0\n# HELP minecraft_player_online Players currently online (1 if player is online)\n# TYPE minecraft_player_online gauge\nminecraft_player_online{player=\"ediri\"} 1\n# HELP minecraft_player_stat Statistic related to the player: xp, current_xp, food_level, health, score, advancements\n# TYPE minecraft_player_stat gauge\nminecraft_player_stat{player=\"ediri\",stat=\"advancements\"} 53\nminecraft_player_stat{player=\"ediri\",stat=\"current_xp\"} 0\nminecraft_player_stat{player=\"ediri\",stat=\"food_level\"} 20\nminecraft_player_stat{player=\"ediri\",stat=\"health\"} 20\nminecraft_player_stat{player=\"ediri\",stat=\"score\"} 1\nminecraft_player_stat{player=\"ediri\",stat=\"xp\"} 1\n# HELP minecraft_players_killed_total The number of times the player killed a player\n# TYPE minecraft_players_killed_total counter\nminecraft_players_killed_total{player=\"ediri\"} 0\n# HELP minecraft_pots_flowered_total The number of times the player planted a plant in a flower pot\n# TYPE minecraft_pots_flowered_total counter\nminecraft_pots_flowered_total{player=\"ediri\"} 0\n# HELP minecraft_records_played_total The number of times the player played a music disc on a jukebox\n# TYPE minecraft_records_played_total counter\nminecraft_records_played_total{player=\"ediri\"} 0\n# HELP minecraft_shulker_boxes_cleaned_total The number of times the player washed a shulker box with a cauldron\n# TYPE minecraft_shulker_boxes_cleaned_total counter\nminecraft_shulker_boxes_cleaned_total{player=\"ediri\"} 0\n# HELP minecraft_shulker_boxes_opened_total The number of times the player opened a shulker box\n# TYPE minecraft_shulker_boxes_opened_total counter\nminecraft_shulker_boxes_opened_total{player=\"ediri\"} 0\n# HELP minecraft_sleep_in_bed_total The number of times the player slept in a bed\n# TYPE minecraft_sleep_in_bed_total counter\nminecraft_sleep_in_bed_total{player=\"ediri\"} 0\n# HELP minecraft_sneak_time_ticks_total The number of ticks the player has spent sneaking\n# TYPE minecraft_sneak_time_ticks_total counter\nminecraft_sneak_time_ticks_total{player=\"ediri\"} 0\n# HELP minecraft_talked_to_villagers_total The number of times the player spoke with a villager (opened the trading GUI)\n# TYPE minecraft_talked_to_villagers_total counter\nminecraft_talked_to_villagers_total{player=\"ediri\"} 0\n# HELP minecraft_targets_hit_total The number of times the player shot a target block\n# TYPE minecraft_targets_hit_total counter\nminecraft_targets_hit_total{player=\"ediri\"} 0\n# HELP minecraft_time_since_death_ticks_total The number of ticks since the player's last death\n# TYPE minecraft_time_since_death_ticks_total counter\nminecraft_time_since_death_ticks_total{player=\"ediri\"} 24217\n# HELP minecraft_time_since_rest_ticks_total The number of ticks since the player's last rest (used to spawn phantoms)\n# TYPE minecraft_time_since_rest_ticks_total counter\nminecraft_time_since_rest_ticks_total{player=\"ediri\"} 24238\n# HELP minecraft_world_time_ticks_total The number of ticks the player has been in the world\n# TYPE minecraft_world_time_ticks_total counter\nminecraft_world_time_ticks_total{player=\"ediri\"} 159695\n# HELP minecraft_traded_with_villagers_total The number of times the player traded with a villager\n# TYPE minecraft_traded_with_villagers_total counter\nminecraft_traded_with_villagers_total{player=\"ediri\"} 0\n# HELP minecraft_triggered_raids_total The number of times the player triggered a raid\n# TYPE minecraft_triggered_raids_total counter\nminecraft_triggered_raids_total{player=\"ediri\"} 0\n# HELP minecraft_triggered_trapped_chests_total The number of times the player opened a trapped chest\n# TYPE minecraft_triggered_trapped_chests_total counter\nminecraft_triggered_trapped_chests_total{player=\"ediri\"} 0\n# HELP minecraft_used_cauldrons_total The number of times the player took water from cauldrons with glass bottles\n# TYPE minecraft_used_cauldrons_total counter\nminecraft_used_cauldrons_total{player=\"ediri\"} 0\n# HELP minecraft_won_raids_total The number of times the player won a raid\n# TYPE minecraft_won_raids_total counter\nminecraft_won_raids_total{player=\"ediri\"} 0\n```\n\n#### Metrics for specific mods\n\nTo export the metrics for a specific mod, you can set the flag: `--mc.mod-server-stats=forge|papermc|fabric` or use the\nenvironment variable `MC_MOD_SERVER_STATS`.\n\n**Note:** Fabric requires the [Fabric TPS](https://modrinth.com/mod/fabric-tps) mod.\n\n#### Forge\n\n`minecraft-exporter` exports mean TPS and mean tick time for every dimension and of course the overall mean TPS and mean\ntick time.\n\nAdditionally, you will get the total numbers of active entities on the server per dimension.\n\n```bash\n# HELP minecraft_ticktime_ms The overall mean tick time in the server (milliseconds)\n# TYPE minecraft_ticktime_ms gauge\nminecraft_ticktime_ms 0.38\n# HELP minecraft_tps The overall mean ticks per second in the server\n# TYPE minecraft_tps gauge\nminecraft_tps 20\n# HELP minecraft_dimension_ticktime_ms The mean tick time in a certain dimension (milliseconds)\n# TYPE minecraft_dimension_ticktime_ms gauge\nminecraft_dimension_ticktime_ms{dimension=\"overworld\",namespace=\"minecraft\"} 0.37\nminecraft_dimension_ticktime_ms{dimension=\"the_end\",namespace=\"minecraft\"} 0.002\nminecraft_dimension_ticktime_ms{dimension=\"the_nether\",namespace=\"minecraft\"} 0.004\n# HELP minecraft_dimension_tps The number of ticks per second in a certain dimension\n# TYPE minecraft_dimension_tps gauge\nminecraft_dimension_tps{dimension=\"overworld\",namespace=\"minecraft\"} 20\nminecraft_dimension_tps{dimension=\"the_end\",namespace=\"minecraft\"} 20\nminecraft_dimension_tps{dimension=\"the_nether\",namespace=\"minecraft\"} 20\n# HELP minecraft_active_entities The number and type of an active entity on the server\n# TYPE minecraft_active_entities gauge\nminecraft_active_entities{entity=\"bat\",namespace=\"minecraft\"} 15\nminecraft_active_entities{entity=\"bee\",namespace=\"minecraft\"} 7\nminecraft_active_entities{entity=\"chest_minecart\",namespace=\"minecraft\"} 15\nminecraft_active_entities{entity=\"chicken\",namespace=\"minecraft\"} 8\nminecraft_active_entities{entity=\"cod\",namespace=\"minecraft\"} 9\nminecraft_active_entities{entity=\"cow\",namespace=\"minecraft\"} 12\nminecraft_active_entities{entity=\"creeper\",namespace=\"minecraft\"} 12\nminecraft_active_entities{entity=\"dolphin\",namespace=\"minecraft\"} 1\nminecraft_active_entities{entity=\"drowned\",namespace=\"minecraft\"} 1\nminecraft_active_entities{entity=\"enderman\",namespace=\"minecraft\"} 6\nminecraft_active_entities{entity=\"falling_block\",namespace=\"minecraft\"} 1\nminecraft_active_entities{entity=\"item\",namespace=\"minecraft\"} 13\nminecraft_active_entities{entity=\"pig\",namespace=\"minecraft\"} 12\nminecraft_active_entities{entity=\"pufferfish\",namespace=\"minecraft\"} 6\nminecraft_active_entities{entity=\"rabbit\",namespace=\"minecraft\"} 1\nminecraft_active_entities{entity=\"sheep\",namespace=\"minecraft\"} 17\nminecraft_active_entities{entity=\"skeleton\",namespace=\"minecraft\"} 28\nminecraft_active_entities{entity=\"spider\",namespace=\"minecraft\"} 6\nminecraft_active_entities{entity=\"squid\",namespace=\"minecraft\"} 5\nminecraft_active_entities{entity=\"tropical_fish\",namespace=\"minecraft\"} 8\nminecraft_active_entities{entity=\"zombie\",namespace=\"minecraft\"} 19\n```\n\n#### PaperMC\n\n`minecraft-exporter` exports the TPS from the last 1m, 5m, and 15m as histogram.\n\n```bash\n# HELP minecraft_tps_bucket The ticks per second histogram in PaperMC/PurpurMC\n# TYPE minecraft_tps_bucket histogram\nminecraft_tps_bucket_bucket{le=\"1\"} 20\nminecraft_tps_bucket_bucket{le=\"5\"} 20\nminecraft_tps_bucket_bucket{le=\"15\"} 20\nminecraft_tps_bucket_bucket{le=\"+Inf\"} 3\nminecraft_tps_bucket_sum 60\nminecraft_tps_bucket_count 3\n```\n\n#### PurpurMC\n\nTo get in `PurpurMC` TPS in a form `minecraft-exporter` can read it you need to enable `overrideTpsCommand` in the \n`spark` configuration file. Check the [spark docs](https://spark.lucko.me/docs/Configuration#overridetpscommand) for\ndetails on how to do this.\n\n`minecraft-exporter` exports the TPS from the last 5s (here written in 0.08 minute), 1m, 5m, and 15m as histogram.\n\n```bash\n# HELP minecraft_tps_bucket The ticks per second histogram in PaperMC/PurpurMC\n# TYPE minecraft_tps_bucket histogram\nminecraft_tps_bucket_bucket{le=\"0.08\"} 20\nminecraft_tps_bucket_bucket{le=\"1\"} 20\nminecraft_tps_bucket_bucket{le=\"5\"} 20\nminecraft_tps_bucket_bucket{le=\"15\"} 20\nminecraft_tps_bucket_bucket{le=\"+Inf\"} 4\nminecraft_tps_bucket_sum 80\nminecraft_tps_bucket_count 4\n```\n\n### Libraries \u0026 Tools 🔥\n\n- https://github.com/Jeffail/gabs\n- https://github.com/alecthomas/kingpin\n- https://github.com/Tnze/go-mc\n- https://github.com/prometheus/exporter-toolkit\n- https://github.com/goreleaser\n- https://github.com/Electroid/mojang-api\n\n### Legal Disclaimer 👮\n\nThis project is not affiliated with Mojang Studios, XBox Game Studios, Double Eleven or the Minecraft brand.\n\n\"Minecraft\" is a trademark of Mojang Synergies AB.\n\nOther trademarks referenced herein are property of their respective owners.\n\n### Stargazers over time 🌟\n\n[![Stargazers over time](https://starchart.cc/dirien/minecraft-prometheus-exporter.svg)](https://starchart.cc/dirien/minecraft-prometheus-exporter) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirien%2Fminecraft-prometheus-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirien%2Fminecraft-prometheus-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirien%2Fminecraft-prometheus-exporter/lists"}