Coder Social home page Coder Social logo

cubxity / unifiedmetrics Goto Github PK

View Code? Open in Web Editor NEW
395.0 3.0 33.0 6.81 MB

Fully-featured metrics collection agent for Minecraft servers. Supports Prometheus and InfluxDB. Dashboard included out-of-box.

License: GNU Lesser General Public License v3.0

Kotlin 97.06% Java 2.94%
influxdb grafana bukkit spigot minecraft metrics velocity api prometheus prometheus-exporter

unifiedmetrics's Introduction

UnifiedMetrics

License Workflow Status Maven Central Discord

UnifiedMetrics is a fully-featured free and open-source metrics collection plugin for Minecraft servers. This project is licensed under GNU LGPLv3.

Grafana Dashboard Dashboard included out-of-box! Click here for live preview!

Features

  • Platform-agnostic & compatible with popular platforms. Get the same metrics and features on any supported platform.
  • Monitor your server in real-time with Prometheus/InfluxDB and provided Grafana dashboards.
  • High performance metric collection. Low to none performance impact on the server's performance.
  • Free and open-source. The code is free and open for anyone to audit and contribute to.

Compatibility

Server:

  • 1.8+ Spigot servers (includes Spigot-based forks)
  • 1.16+ Fabric servers
  • Minestom
  • Velocity
  • BungeeCord

Metrics:

  • Prometheus
  • InfluxDB

Getting started

Read the wiki for instructions on how to get started.

Metrics

Table of metrics (click to show)
Collector Description Platform Default
systemGc Garbage collection duration and freed bytes All true
systemMemory Memory used, committed, max and init All true
systemProcess CPU load, seconds, and process start time All true
systemThread Current, daemon, started, and peak thread count All true
events Login, join, quit, chat, and ping event counter All true
server Plugins count and player counts All true
tick Tick duration histogram Bukkit, Minestom true
world World entities, players, and chunks count Bukkit, Minestom true

Special Thanks

Bloom Host has kindly provided UnifiedMetrics with development servers. Bloom has server splitting built-in, which makes it extremely easy to build your monitoring stack. Get high performance servers at Bloom by using this link.

Bloom logo

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

YourKit Logo

Building from source

Instructions (click to show)

Requirements:

  • JDK 8+ (16+ for Fabric, 17+ for Minestom)
  • Git (Optional)

To build UnifiedMetrics, you need to obtain the source code first. You can download the source from GitHub or use the Git CLI.

$ git clone https://github.com/Cubxity/UnifiedMetrics && cd UnifiedMetrics

Open a terminal in the cloned directory and run the following command. The following command will build all subprojects.

$ ./gradlew assemble -x signArchives

-x signArchives is required to skip signing, unless you have signing set up

To build a specific subproject, you can prefix it with the subproject path. For example:

$ ./gradlew :unifiedmetrics-platform-bukkit:assemble -x signArchives

The output artifacts can be found in subproject/build/libs.

API

Maven Central Sonatype Nexus (Snapshots)

Instructions (click to show)

Examples

Example plugins can be found under examples directory.

Gradle (Kotlin)

repositories {
    mavenCentral()

    // Snapshots repository (only required for -SNAPSHOT versions)
    maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
    // Replace this with the desired version
    compileOnly("dev.cubxity.plugins", "unifiedmetrics-api", "0.3.6")
}

Usage

Add :unifiedmetrics-api as a dependency (compileOnly/provided). Prefer using platform's service manager if possible.

import dev.cubxity.plugins.metrics.api.UnifiedMetricsProvider

/* ... */

val api = UnifiedMetricsProvider.get()

unifiedmetrics's People

Contributors

clrxbl avatar cubxity avatar djtheredstoner avatar itsmemac avatar itsnicecraft avatar noahvdaa avatar portlek avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

unifiedmetrics's Issues

Support PAPI for custom metrics

Describe the feature you would like to see.

Being able to use PAPI values for custom metrics

I'm using https://www.spigotmc.org/resources/view-distance-tweaks-1-14-1-18.75164/ on my servers and would love to see the render/simulation distance over time vs MSPT

I'm sure there would be other great values in PAPI once I would start digging into them.

How would you like to see this implemented?

I think where this might be more complicated than I initially thought is around some PAPI values being "per world" or "per X" - and likely wanting to either support a list that gets enumerated and emitted together, or some other way to provide different PAPI keys, but emit them as a single metric with tags

e.g. given %viewdistancetweaks_simulation_distance_<world>% it could possibly be satisfied with custom config like this:

name: viewdistancetweaks_simulation_distance
papi: viewdistancetweaks_simulation_distance_<world>
values: 
  world: [world,world_the_end,world_nether]
tags:
  world: <world>

Where it would basically be

// compute all permutations of key/value combinations within the `values` dict
// iterate each of these and read PAPI value, generate metric, emit tags
// replacing `<world>` with each possible value in `values.world`  across `papi` and `tags`

Note

Maybe a v1 would just support a single permutation (e.g. world) to keep it simple, and likely to satisfy 90%+ of the PAPI idea s I have

Log client types of users.

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

A Minecraft client sends a string to the server which contains the client type (forge/fabric/optifine/vanilla/etc), version, and list of mods installed if applicable. I've listed an open source plugin below that does this.

This should be logged, it would be useful to see what's the most common client or what's the most common version (if you run ViaVersion for example). Currently no Minecraft metrics logger like PLAN support this, but I feel like this would give Unified Metrics an edge over the alternatives.

It would be nice if this was logged and you could visualize it with a chart on Grafana.

Client Detector Plugin: https://www.spigotmc.org/resources/clientdetector-client-mod-detection-forge-mod-detection-clientcontrol.90375/

How would you like to see this implemented?

Logs client info into Prometheus database.

Additional information to this request.

No response

Error reading Prometheus: An error occurred within the plugin

Is there an existing issue for this bug?

  • I have searched the existing issues before opening this bug report.

Current Behavior

I setup everything according to your tuto, but I try to us it on the grafana I host locally on docker.
When I try to setup the data source, I add the ip "0.0.0.0:9100" (wich I can go to and read metrics) but when I try to save, I have thie error : "Error reading Prometheus: An error occurred within the plugin"

Expected Behavior

I should have a message saying "Data source is working".

Server type

Fabric

Server Version

1.19.3

Other Mods / Plugins in your server

Dynmap, fabric api, fabric carpet, fabric installer, fabric language kotlin, lithium, phosphore, sodium, unifiedmetrics

Error log

logger=data-proxy-log userId=1 orgId=1 uname=admin path=/api/datasources/proxy/2/api/v1/status/buildinfo remote_addr=192.168.1.10 referer=http://192.168.1.10:3000/datasources/edit/dNXlnQ04z/ t=2023-02-07T20:15:40.835278235Z level=error msg="Proxy request failed" err="dial tcp 0.0.0.0:9100: connect: connection refused"

logger=context userId=1 orgId=1 uname=admin t=2023-02-07T20:15:40.835341166Z level=error msg="Request Completed" method=GET path=/api/datasources/proxy/2/api/v1/status/buildinfo status=502 remote_addr=192.168.1.10 time_ms=1 duration=1.47335ms size=0 referer=http://192.168.1.10:3000/datasources/edit/dNXlnQ04z/ handler=/api/datasources/proxy/:id/*

logger=context userId=1 orgId=1 uname=admin t=2023-02-07T20:15:40.920678424Z level=error msg="Internal server error" error="[plugin.downstreamError] failed to query data: Post "http://0.0.0.0:9100/api/v1/query\": dial tcp 0.0.0.0:9100: connect: connection refused" remote_addr=192.168.1.10 traceID=

logger=context userId=1 orgId=1 uname=admin t=2023-02-07T20:15:40.920728514Z level=error msg="Request Completed" method=POST path=/api/ds/query status=500 remote_addr=192.168.1.10 time_ms=1 duration=1.390618ms size=116 referer=http://192.168.1.10:3000/datasources/edit/dNXlnQ04z/ handler=/api/ds/query

More information

I don't know what to do to fix this. Can anyone help me ?

Support Influx 1.8

This is a bit of an unfortunate situation I'm in..

I would like to get the metrics for Influx 1.8, so no buckets etc. since not all my other metric collectors are ready to upgrade to Influx 2.x

I guess one could solve this by using UnifiedMetrics in Prometheus "mode" once that is implemented and then use telegraf to grab the Prometheus data for collection to Influx 1.8

Or is there already support for the "old" Influx 1.8 behaviour?

Tick event does not fire on 1.18-pre1

The tick event does not seem to be fired on 1.18-pre1. minecraft_tick_duration_seconds_count is at a constant 0.

Environment
Version: 0.3.3 (Fabric)
Minecraft: 1.18-pre1
Java: 17

It would be nice to have support for modpacks

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Hi it would be nice to have support for modpacks i.e. who is a modpack creator like I would like to collect data from modpack users like modpack version Operating System Version, Java Version in use, Launcher, Country from where it is used and also the Client language they use, plus you have higher FPS numbers achieved

How would you like to see this implemented?

It would be cool to implement it for fabric from 1.8.9 to 1.20.x so all versions of fabric so you can cover everything like my modpack and with the following versions: 1.18.2, 1.19.4, 1.20.1 and in the works 1.20.2, 1.20.3, 1.20. 4 would be handy to be able to monitor everything i.e. RAM, OS, CPU, GPU, Modpack Version, Fabric Version, Java Version, java flags, Minecraft Version, Client Language, State from where it is used, Laucnher used, Highest FPS and Lowest FPS reached let's say like an average of these and also Automatic Crash Reporting so we can help them

Additional information to this request.

I hope it will be accepted wholeheartedly and a god thing that I know you will surely be able to do, I have improved the things to add in comparison to the description so the functions are put better in the section "How would you like to see this implemented?"

Spigot 1.17 - java.lang.IllegalStateException: Asynchronous Chunk getEntities call

Doesn't work with 1.17 spigot and any 1.17 fork, gives below error:

java.lang.IllegalStateException: Asynchronous Chunk getEntities call!
at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:16) ~[patched_1.17.jar:git-Tuinity-"8482a76"]
at net.minecraft.server.level.WorldServer.getEntities(WorldServer.java:2318) ~[patched_1.17.jar:git-Tuinity-"8482a76"]
at org.bukkit.craftbukkit.v1_17_R1.CraftWorld.getEntities(CraftWorld.java:1172) ~[patched_1.17.jar:git-Tuinity-"8482a76"]
at dev.cubxity.plugins.metrics.bukkit.metric.world.WorldCollector.collect(WorldCollector.kt:33) ~[?:?]
at dev.cubxity.plugins.metrics.api.metric.MetricKt.collect(Metric.kt:40) ~[?:?]
at dev.cubxity.plugins.metrics.api.metric.MetricsManagerKt.collect(MetricsManager.kt:38) ~[?:?]
at dev.cubxity.plugins.metrics.influx.InfluxMetricsDriver$scheduleTasks$1.run(InfluxMetricsDriver.kt:68) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
at java.lang.Thread.run(Thread.java:831) [?:?]

Appreciate if you could update it to work with latest version, thanks!

Velocity: Login event goes to join counter

Is there an existing issue for this bug?

  • I have searched the existing issues before opening this bug report.

Current Behavior

@Subscribe
fun onLogin(event: PreLoginEvent) {
joinCounter.inc()
}
@Subscribe
fun onConnect(event: PlayerChooseInitialServerEvent) {
joinCounter.inc()
}

Currently Login events count as join events.

Expected Behavior

Login should increment respective counter

Server type

Velocity

Server Version

3.2.0-SNAPSHOT

Other Mods / Plugins in your server

N/A

Error log

No response

More information

No response

Tracking for player joins and new player joins

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Previously used ServerStatistics by MrDienns and it tracked player joins and new player joins. This is important for us to see how many players are joining in a period of time, how many are new players, etc.

How would you like to see this implemented?

Whenever a new player joins, it is tracked by UnifiedMetrics and pushed as a single data point.

Additional information to this request.

No response

[Fabric] Carpet mod conflict with MSPT calculation

Issue : incorrect MSPT reporting to prometheus due to conflict with carpet mod and unified metrics

Server version : Fabric 1.17.1 (Latest)
Plugin version : unifiedmetrics platform fabric 0.3.2 (Latest)
Carpet version : fabric carpet 1.4.47 (Latest)

Mods in server : fabric api @0.40.1 , fabric language kotlin @1.6.3 , unifiedmetrics @0.3.2, carpet @1.4.47

Detailed Analysis :

The issue is with incorrect MSPT being forwarded to prometheus when carpet mod is present in the server.

Having carpet mod in server sets the MSPT to 1.00 min as per screenshot attached below and without carpet mod, the MSPT is
sent without any issues.

The issue starts to show up in grafana 2 minutes after the server startup is done

With Carpet Mod added to server
with carpet

Without Carpet Mod added to server
without carpet

How to replicate the issue

  1. Add unifiedmetrics and carpet mod to /mods folder
  2. Add job to prometheus server
  3. Start server
  4. wait for 2 minutes
  5. Check grafana for MSPT

Magma Support / java 8

Hey, would it be possible to build the project with java 8? Unfortunately, Magma does only support java 8.

InfluxDB v1.6 Error occured during writing of data

Is there an existing issue for this bug?

  • I have searched the existing issues before opening this bug report.

Current Behavior

Does not insert data, errors out (see log below).

Expected Behavior

Should insert data into the database

Server type

Spigot (includes Spigot-based forks)

Server Version

1.8.9

Other Mods / Plugins in your server

N/A

Error log

14:41:38 INFO]: [UnifiedMetrics] Loading UnifiedMetrics v0.3.6
[14:41:38 INFO]: [UnifiedMetrics] Enabling UnifiedMetrics v0.3.6
[14:41:38 INFO]: [UnifiedMetrics] Initializing driver 'influx'.
[14:41:38 INFO]: [UnifiedMetrics] Driver 'influx' initialized (388 ms).
[--- Server initializes further here ---]
[14:41:40 INFO]: Done (1,686s)! For help, type "help" or "?"
[14:41:41 ERROR]: The error occurred during writing of data
dev.cubxity.plugins.metrics.libs.com.influxdb.exceptions.NotFoundException: null
at dev.cubxity.plugins.metrics.libs.com.influxdb.internal.AbstractRestClient.responseToError(AbstractRestClient.java:120) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at dev.cubxity.plugins.metrics.libs.com.influxdb.internal.AbstractRestClient.toInfluxException(AbstractRestClient.java:98) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at dev.cubxity.plugins.metrics.libs.com.influxdb.client.internal.AbstractWriteClient.lambda$new$12(AbstractWriteClient.java:180) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableDoFinally$DoFinallySubscriber.onNext(FlowableDoFinally.java:84) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.drain(FlowableConcatMapMaybe.java:284) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.onNext(FlowableConcatMapMaybe.java:137) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.mixed.FlowableConcatMapSingle$ConcatMapSingleSubscriber.drain(FlowableConcatMapSingle.java:279) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.mixed.FlowableConcatMapSingle$ConcatMapSingleSubscriber.innerSuccess(FlowableConcatMapSingle.java:179) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.mixed.FlowableConcatMapSingle$ConcatMapSingleSubscriber$ConcatMapSingleObserver.onSuccess(FlowableConcatMapSingle.java:317) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:64) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:64) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableCollectSingle$CollectSubscriber.onComplete(FlowableCollectSingle.java:119) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.subscribers.BasicFuseableSubscriber.onComplete(BasicFuseableSubscriber.java:120) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.subscribers.BasicFuseableConditionalSubscriber.onComplete(BasicFuseableConditionalSubscriber.java:119) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableGroupBy$State.checkTerminated(FlowableGroupBy.java:692) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableGroupBy$State.drainNormal(FlowableGroupBy.java:626) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableGroupBy$State.drain(FlowableGroupBy.java:559) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableGroupBy$State.onComplete(FlowableGroupBy.java:549) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableGroupBy$GroupedUnicast.onComplete(FlowableGroupBy.java:474) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableGroupBy$GroupBySubscriber.onComplete(FlowableGroupBy.java:213) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.processors.UnicastProcessor.checkTerminated(UnicastProcessor.java:430) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.processors.UnicastProcessor.drainRegular(UnicastProcessor.java:314) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.processors.UnicastProcessor.drain(UnicastProcessor.java:397) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.processors.UnicastProcessor.onComplete(UnicastProcessor.java:487) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableWindowBoundarySupplier$WindowBoundaryMainSubscriber.drain(FlowableWindowBoundarySupplier.java:254) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableWindowBoundarySupplier$WindowBoundaryMainSubscriber.innerNext(FlowableWindowBoundarySupplier.java:166) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableWindowBoundarySupplier$WindowBoundaryInnerSubscriber.onNext(FlowableWindowBoundarySupplier.java:316) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.processors.PublishProcessor$PublishSubscription.onNext(PublishProcessor.java:360) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.processors.PublishProcessor.onNext(PublishProcessor.java:243) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.tryEmit(FlowableFlatMap.java:282) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableFlatMap$InnerSubscriber.onNext(FlowableFlatMap.java:668) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.subscribers.SerializedSubscriber.onNext(SerializedSubscriber.java:100) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableWindowTimed$WindowExactBoundedSubscriber.drainLoop(FlowableWindowTimed.java:498) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.operators.flowable.FlowableWindowTimed$WindowExactBoundedSubscriber$ConsumerIndexHolder.run(FlowableWindowTimed.java:579) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.Scheduler$Worker$PeriodicTask.run(Scheduler.java:479) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) [unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
[--- Error repeats here over and over ---]

More information

Is it possible that the organisation has to be set for the plugin but is irrelevant for the v1.6 of influx and that this gets confused?

Prometheus TLS support

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Listening on TLS for use in mTLS connections between exporter<->Prometheus.

How would you like to see this implemented?

Looks like it was implemented in the Prometheus client library already: https://github.com/prometheus/client_java/pull/695/files#diff-5f905372eab4e7163cbb36288fbb52c5e76b6e723693d169e37290ed4595789d

Additional information to this request.

No response

Add somewhere the meaning of each metric we scrap

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

It would be nice to know what each metric we scrap means (ex: MSPT = MilliSeconds Per Tick), maybe even a little bit more elaborated with more in depth meaning and what to expect as value :
It's the amount of time a tick takes to process. If it's higher than 50, the game cannot process 20 ticks in a second and things start to slow down.

How would you like to see this implemented?

It all could be in the README, in the wiki, on the Grafana dashboard (tool tip, etc) or anywhere.

Additional information to this request.

No response

Grafana dashboard - wrong metric for Daemons graph

Is there an existing issue for this bug?

  • I have searched the existing issues before opening this bug report.

Current Behavior

Treads and Daemons graphs currently displays same metric jvm_threads_current_count

Expected Behavior

Treads graph should display jvm_threads_current_count, Daemons graph should display jvm_threads_daemon_count

Use server name from server.properties on bukkit

A lot of plugins use server.properties server name as primary server name. It makes it easier to manage, since if we ever need to change server name we are doing it in one place, without getting into plugin's config files.
Since it niche feature and for some using separate name in plugin's config would be more flexible can we have a true false switch that makes server.properties use of server.properties name?

I have a lot of servers that need to me moved around and sometimes change their names. Going in UM config file every time would be a pain :)

Also not relevant to the feature request: How can I change instance name when using UM dashboard? It uses IPs as identifiers. Is there a label for that? (using Prometheus)

InfluxDB config template not created

Is there an existing issue for this bug?

  • I have searched the existing issues before opening this bug report.

Current Behavior

Influx DB Driver .yml file is not created in "/plugins/unifiedmetrics/driver/" folder.
Only "prometheus.yml" is shown.

Expected Behavior

Config file should be created containing config defaults for using InfluxDB.

Server type

Fabric

Server Version

Velocity 1.20.1

Other Mods / Plugins in your server

  • azlink
  • bStats
  • luckperms
  • Negativity
  • SlashServer

Error log

No error log, plugin loaded OK on default config:

[19:25:46 INFO] [unifiedmetrics]: Initializing driver 'prometheus'.
[19:25:46 INFO] [unifiedmetrics]: Driver 'prometheus' initialized (317 ms).

More information

No response

[Fabric] Incorrect Chunks calculation

Issue : Chunks loaded is recorded incremental and not accurate

Server version : Fabric 1.17.1 (Latest)
Plugin version : unifiedmetrics platform fabric 0.3.2 (Latest)
Carpet version : fabric carpet 1.4.47 (Latest)

Mods in server : fabric api @0.40.1 , fabric language kotlin @1.6.3 , unifiedmetrics @0.3.2

Detailed Analysis :

The chunks loaded are calculated in incremental order and not accurate (Doesn't account the unloaded chunks and remove them from stats)

Tested the same with ServerStats mod and it reported the chunks correctly without any issues.

Spigot servers in the same dashboard reports correct chunks loaded with unloaded chunks accounted to the stats.

UnifiedMetrics - Fabric (Inaccurate chunks loaded)
fabric chunks - unified

UnifiedMetrics - Spigot (Correct chunks loaded)
spigot chunks - unified

ServerStats - Fabric (Correct chunks loaded)
fabric chunks - stats

Above screenshot for both fabric stats are from same instance and time inverval

Add geolocation support

Similar to the Player Analytics plugin, it would be great if you could implement a player geolocation feature (most likely as an extension for UM)

It could show average ping for each country (bottom) and how many unique players have ever joined and from what countries (left). This could also potentially be displayed in a world map (right) showing the geographical distribution of players around the world - this might be handy along with this for the geolocation lookup database.

Thanks :)

Not compatible with newest version of Minestom

Is there an existing issue for this bug?

  • I have searched the existing issues before opening this bug report.

Current Behavior

The extension currently crashes on startup because Minestom has since changed the logger definition for extensions.

See here: https://github.com/Minestom/Minestom/blob/master/src/main/java/net/minestom/server/extensions/Extension.java#L67

Which was changed in this commit: Minestom/Minestom@d7e958f

Expected Behavior

It should be updated to the newest logging of Minestom

Server type

Spigot (includes Spigot-based forks)

Server Version

1.19.2

Other Mods / Plugins in your server

None

Error log

Exception in thread "main" java.lang.NoSuchMethodError: 'org.slf4j.Logger dev.cubxity.plugins.metrics.minestom.bootstrap.UnifiedMetricsMinestomExtension.getLogger()'
        at Ext_UnifiedMetrics//dev.cubxity.plugins.metrics.minestom.bootstrap.UnifiedMetricsMinestomBootstrap.<init>(UnifiedMetricsMinestomBootstrap.kt:48)
        at Ext_UnifiedMetrics//dev.cubxity.plugins.metrics.minestom.bootstrap.UnifiedMetricsMinestomExtension.initialize(UnifiedMetricsMinestomExtension.kt:26)
        at java.base/java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:655)
        at net.minestom.server.extensions.ExtensionManager.gotoInit(ExtensionManager.java:127)
        at net.minestom.server.ServerProcessImpl.start(ServerProcessImpl.java:216)
        at net.minestom.server.MinecraftServer.start(MinecraftServer.java:322)
        at net.minestom.server.MinecraftServer.start(MinecraftServer.java:327)
        at com.dyescape.server.node.lobby.LobbyServer.start(server.kt:41)
        at com.dyescape.server.node.lobby.LobbyNode.start(main.kt:32)
        at com.dyescape.server.node.lobby.MainKt$main$1.invokeSuspend(main.kt:24)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at com.dyescape.server.node.lobby.MainKt.main(main.kt:9)
        at com.dyescape.server.node.lobby.MainKt.main(main.kt)

More information

Tested using commit aebf72de90 from Minestom

No response

TPS not being reported and TPS/MSPT graphs not working

Is there an existing issue for this bug?

  • I have searched the existing issues before opening this bug report.

Current Behavior

Hi all.

Neat plugin you have here. The visualization in Grafana is great and it was easy to set up.

I'm running into a bug where the TPS (Mean) value is not being reported at all, and the TPS and MSPT graphs are empty:
image

All UnifiedMetrics configs were left to their default values.
I tried looking into the reporting endpoint manually but didn't really understand the data, or possibly some data was missing.

Expected Behavior

The TPS (Mean value) should be updated with the server's live TPS.
The graphs should be updated with the correct data.

Server type

Fabric

Server Version

1.18

Other Mods / Plugins in your server

Bluemap
Fabric API 0.43.1 + 1.18
Fabric Language Kotlin 1.6.4 + Kotlin 1.5.30
LazyDFU 0.1.2
NotEnoughCrashes 4.1.3

Error log

No response

More information

No response

Configuration save error causes a different error to emit

Is there an existing issue for this bug?

  • I have searched the existing issues before opening this bug report.

Current Behavior

Unified Metrics was not working on 1.19.2 server.

Expected Behavior

Nothing.

Server type

Spigot (includes Spigot-based forks)

Server Version

1.19.2

Other Mods / Plugins in your server

N/A

Error log

[13:13:53 ERROR]: Error occurred while enabling UnifiedMetrics v0.3.6 (Is it up to date?)
java.lang.IllegalStateException: The UnifiedMetrics plugin is not loaded.
at dev.cubxity.plugins.metrics.common.plugin.AbstractUnifiedMetricsPlugin.getApiProvider(AbstractUnifiedMetricsPlugin.kt:44) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at dev.cubxity.plugins.metrics.common.plugin.AbstractUnifiedMetricsPlugin.enable(AbstractUnifiedMetricsPlugin.kt:55) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at dev.cubxity.plugins.metrics.bukkit.bootstrap.UnifiedMetricsBukkitBootstrap.onEnable(UnifiedMetricsBukkitBootstrap.kt:53) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:542) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.19.2.jar:git-Paper-166]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:479) ~[paper-1.19.2.jar:git-Paper-166]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:279) ~[paper-1.19.2.jar:git-Paper-166]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1126) ~[paper-1.19.2.jar:git-Paper-166]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-166]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[13:13:53 INFO]: [UnifiedMetrics] Disabling UnifiedMetrics v0.3.6
[13:13:53 ERROR]: Error occurred while disabling UnifiedMetrics v0.3.6 (Is it up to date?)
java.lang.IllegalStateException: The UnifiedMetrics plugin is not loaded.
at dev.cubxity.plugins.metrics.common.plugin.AbstractUnifiedMetricsPlugin.getApiProvider(AbstractUnifiedMetricsPlugin.kt:44) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at dev.cubxity.plugins.metrics.common.plugin.AbstractUnifiedMetricsPlugin.disable(AbstractUnifiedMetricsPlugin.kt:71) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at dev.cubxity.plugins.metrics.bukkit.UnifiedMetricsBukkitPlugin.disable(UnifiedMetricsBukkitPlugin.kt:37) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at dev.cubxity.plugins.metrics.bukkit.bootstrap.UnifiedMetricsBukkitBootstrap.onDisable(UnifiedMetricsBukkitBootstrap.kt:57) ~[unifiedmetrics-platform-bukkit-0.3.6.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:399) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:579) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:374) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:542) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.19.2.jar:git-Paper-166]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:479) ~[paper-1.19.2.jar:git-Paper-166]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:279) ~[paper-1.19.2.jar:git-Paper-166]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1126) ~[paper-1.19.2.jar:git-Paper-166]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-166]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

More information

No response

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Retry-After: unexpected status code 503

Warning

Renovate failed to look up the following dependencies: Failed to look up maven package com.mojang:minecraft, Failed to look up maven package com.github.minestom.minestom:Minestom.

Files affected: platforms/fabric/build.gradle.kts, platforms/minestom/build.gradle.kts


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/preview.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/checkout v4
  • actions/setup-java v4
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/checkout v4
  • actions/setup-java v4
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.9.22
  • org.jetbrains.kotlin.kapt 1.9.22
  • org.jetbrains.kotlin.plugin.serialization 1.9.22
  • com.github.johnrengelman.shadow 8.1.1
api/build.gradle.kts
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.7.3
  • org.jetbrains.kotlinx:kotlinx-serialization-core 1.6.2
common/build.gradle.kts
  • com.charleskorn.kaml:kaml 0.56.0
core/build.gradle.kts
drivers/influx/build.gradle.kts
  • com.influxdb:influxdb-client-java 6.12.0
drivers/prometheus/build.gradle.kts
  • io.prometheus:simpleclient_httpserver 0.16.0
  • io.prometheus:simpleclient_pushgateway 0.16.0
platforms/bukkit/build.gradle.kts
  • com.destroystokyo.paper:paper-api 1.16.5-R0.1-SNAPSHOT
platforms/bungee/build.gradle.kts
  • net.md-5:bungeecord-api 1.20-R0.1
platforms/fabric/build.gradle.kts
  • fabric-loom 1.4.5
  • com.mojang:minecraft 1.17.1
  • net.fabricmc:fabric-loader 0.15.3
  • net.fabricmc.fabric-api:fabric-api 0.46.1+1.17
  • net.fabricmc:fabric-language-kotlin 1.10.17+kotlin.1.9.22
platforms/minestom/build.gradle.kts
  • com.github.minestom.minestom:Minestom 2cdb3911b0
  • com.github.minestom.minestom:Minestom 2cdb3911b0
platforms/velocity/build.gradle.kts
  • com.velocitypowered:velocity-api 3.1.1
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.5

  • Check this box to trigger a request for Renovate to run again on this repository

Unrecognized java version, even though it's Java 11

Getting this error while using Paper 1.12.2 and java 11 (ghcr.io/pterodactyl/yolks:java_11)

org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: dev/cubxity/plugins/metrics/bukkit/bootstrap/UnifiedMetricsBukkitBootstrap has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 55.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[server.jar:git-Paper-77cce8236]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[server.jar:git-Paper-77cce8236]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) ~[server.jar:git-Paper-77cce8236]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.java:318) ~[server.jar:git-Paper-77cce8236]
        at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:222) ~[server.jar:git-Paper-77cce8236]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[server.jar:git-Paper-77cce8236]
        at java.lang.Thread.run(Unknown Source) [?:?]

Better documentation for developing custom collectors

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Improve the documentation for the API used to create custom collectors

How would you like to see this implemented?

In the wiki or maybe as a JavaDoc

Additional information to this request.

No response

Config reset to default after plugin load

Hi,

the UM config is being reset to default every time after i started the server. So i have to enter it every time before restarting the server. Also when my influxdb docker is restarting, it looses connection and seems to reload the default config then and crashing the server due this.

Uptime gauge

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

A metric that tracks how long the server has been running would be great. At the moment I'm using minecraft_tick_duration_seconds_count / 20 for that, but that'll be inaccurate if TPS falls below 20.

Use cases:

  • I have a script that restarts the server twice per day. Occasionally there's an out of band restart, and I don't want to automatically restart the server again half an hour later.
  • There's also an alert for if the restart for some reason doesn't happen.

How would you like to see this implemented?

The simplest implementation would be a static gauge that just stores the POSIX timestamp from server startup.

Slightly more convenient would be to subtract the current time from the startup time at scrape-time.

Additional information to this request.

No response

Minestom NoSuchMethodError (getUpdateManager)

Is there an existing issue for this bug?

  • I have searched the existing issues before opening this bug report.

Current Behavior

On the latest Minestom build, MinecraftServer.getUpdateManager() has been removed thus throwing NSME.
(com.github.Minestom:Minestom:5b699e0375)

Expected Behavior

TickCollection.kt updated and not throwing NSME

Server type

Minestom

Server Version

1.18.1

Other Mods / Plugins in your server

None.

Error log

WARN - An error occurred whilst registering metric: java.lang.NoSuchMethodError: 'net.minestom.server.UpdateManager net.minestom.server.MinecraftServer.getUpdateManager()'

Full stack trace:
https://www.toptal.com/developers/hastebin/odomoqurac.properties

More information

No response

Influx Tags

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Would be awsome to have an ability to add tags to the metrics

How would you like to see this implemented?

A map of tags that would be applied to Influx metrics pushed by server in driver configuration

Additional information to this request.

No response

Add a subdomain tracking feature

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

I would like to see the statistics on what join addresses players use when they join the server. This will help me see which vote-sites get me the most players and which vote-sites bring me very few players.

How would you like to see this implemented?

image
Something like these but more user friendly. It should have a button that lets me check-all or uncheck-all. It should let me be able to see the join addresses over time and the recent join addresses (So I can see if some vote-sites have been declining in bringing players to the server recently).

image
image
This is also another plugin that is unfortunately only command based, but it has some very nifty features. These extra features don't necessarily need to be added for what I'm trying to do but it would improve what I'm trying to do a bit more. If you had these features accessible via web-browser, you would undoubtedly have the best public plugin for this sort of stuff by far

It would be cool if there was a thing that had a pie chart or a bar chart that showed where all the new players from [INSERT TIME PERIOD] came from. For example, a bar chart showing that 300 new players joined for the first time today. The bar chart then shows the proportion of what join addresses those players used to join.

Additional information to this request.

image
Not really necessary for me to add this but yeah this too.

Docker error loading agent.yml config file

I am attempting to run the Grafana docker image from the wiki guide, but the image is stuck constantly restarting with this error

2021-08-17T16:55:04.057681333Z 2021-08-17 16:55:04.057346 I | error loading config file /etc/agent-config/agent.yml: error reading config file: open /etc/agent-config/agent.yml: not a directory

I attempted to create that directory in etc but I keep getting the error. I can also confirm I have the correct agent.yml file in ~/.docker/grafana. Any ideas?

InfluxDB v2 configuration

I see InfluxDB v2 support was added/fixed in a pre-release a month ago, but an InfluxDB v2 configuration guide is not yet available.

There's not many differences, as I'm sure you're aware, but some notes for v2 in the current Influx driver wiki page would be helpful.

The main thing I'm wondering is how I can specify the token? This option doesn't seem to work since, if specified, some influx.toml fields (notably username and password) are reset to default on start.
Also, how does it know whether to use the /api/v2 endpoint or not?

Does this even truly support InfluxDB v2, or should v1 auth compatibility and DBRP mappings be used when running v2?

[Feature Request] Disk usage stats

Request : Disk usages for the minecraft server

Is there an existing feature request for this? : No

Describe the feature you would like to see
Stats showing the disk used by the complete server or the world files alone would be great to have in metrics for grafana visualization.

The stats shown can mount on the following

  • World folder
  • Complete root

Per Player Statistics

Per player statistics so we can take a look at their economy, and other interesting stats we can port from Minecraft!

Network based metrics

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Average player ping with history. Useful for detecting networking issues in production or monitor routing changes on large server networks.

How would you like to see this implemented?

Basically the same way as the mspt feature is, but with average player network ping.

Additional information to this request.

No response

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.