JMX monitoring for CC: Tweaked
SquidDev opened this issue · 2 comments
Minecraft 1.16 now provides a JMX monitoring interface:
A new flag
enable-jmx-monitoring
has been added to the server.properties file which if set to true will expose an MBean with the Object namenet.minecraft.server:type=Server
and two attributesaverageTickTime
andtickTimes
exposing the tick times in milliseconds
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.
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.