mc-monitor icon indicating copy to clipboard operation
mc-monitor copied to clipboard

Display players nicknames in metrics when more than 0 players online

Open a-camacho opened this issue 3 years ago • 2 comments

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 !

a-camacho avatar Jun 14 '22 11:06 a-camacho

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 avatar Jun 14 '22 13:06 itzg

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 👍🏻

VladimirKuletski avatar Aug 15 '22 17:08 VladimirKuletski