Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display players nicknames in metrics when more than 0 players online #19

Open
a-camacho opened this issue Jun 14, 2022 · 2 comments
Open

Comments

@a-camacho
Copy link

Hi guys,

Would it be possible to have a metric in Prometheus Exporter of MC-Monitor that lists nicknames of players connected.
It works perfectly to know how many users are connected, but I would love to be able to query "online players nicknames".

Thanks a lot !

@itzg
Copy link
Owner

itzg commented Jun 14, 2022

It looks the server ping response does include a "sample" of players currently online. I'm not sure what constitutes a samples-amount, but whatever is provided back I can have exposed as a playerOnline metric.

@itzg itzg moved this to To do in Docker Minecraft Aug 5, 2022
@VladimirKuletski
Copy link

VladimirKuletski commented Aug 15, 2022

It seems it gives random extract of users (10 entities or something like this).

  • Should be good for small servers.
  • Might provide inconsistent results for overcrowded ones. Each pull you might get "unique" usernames

P.S. My kid asked for the same functionality 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

3 participants