Closed SquidDev closed 4 years ago
Having had a prod at this, I'm really not sure there's a way to do it elegantly. Given the dynamic nature of computers, we'd need to register and unregister MBeans an awful lot, which is pretty vile.
I've added global statistics in the following commit. As mentioned above, there's not really a "nice" way of doing per-computer metrics (short of dynamically registering beans, or just returning an Int -> Long
map), so that will be ignored for now.
Minecraft 1.16 now provides a JMX monitoring interface:
We should hook into this system and expose beans for all the various tracking fields. This should make the existing prometheus exporter largely redundant, as people can just drop in one of the many existing JMX → Prometheus ones.