Inactive [ADMN/DEV] MineJMX v1.2.1 - Minecraft Server Statistics Exported Via JMX [1000]

Discussion in 'Inactive/Unsupported Plugins' started by dkhenry, Jul 15, 2011.

  1. Offline

    dkhenry

    NOTE: This plugin is not hosted on BukkitDev
    http://dev.bukkit.org/server-mods/minejmx/
    I will not be updating the information here any more

    MineJMX - Minecraft Server Statistics Exported Via JMX

    Version: v1.2.1
    This plugin allows a server admin to gather Statistics on their minecraft server
    These statistics are exported through JMX. Meaning you get all the JVM level
    statistics as well as the minecraft specific statistics. This can then be imported
    into a monitoring application

    Features:
    • Java VM Stats ( threads , memory usage , CPU usage )
    • Minecraft Server Level Stats ( total number of blocks placed , .... )
    • Minecraft Player Level Stats ( Kills , Deaths , Number of Things placed
    Plugin is hosted on GitHub https://github.com/dkhenry/Minecraft-JMX-Plugin
    You can download the most recent compiled jar here https://github.com/downloads/dkhenry/Minecraft-JMX-Plugin/MineJMX.jar
    Historical releases of the Plugin are available at http://dkhenry.com/minecraft
    *Right now historical binary releases are not hosted.

    Any Server Administrator who is interested can have their Server added to my Instance of performanceondemand.com
    Send me an PM and I will get you set up with access. It will give you nice graphs and reports from these stats

    Installation & Configuration:

    Just drop the .jar file in your plugins directory. the plugin takes care of starting the PlatformMbean Server.

    On first run it will make a MineJMX.properties file. Edit this file and change the username , password and port

    You can then connect to the JMX serving using JConsole MX4J or any other JMX client
    The default connection string is
    service:jmx:rmi:///jndi/rmi://<Your IP>:9999/jmxrmi

    Notes:

    If your server is hosted behind a NAT you will need to add an additional field to the configuration file. the hostname field needs to be set to your public IP address. This option is only supported in 1.2.1+

    Changelog:
    Version 1.2.1
    • Updated to newest version of Bukkit
    Version 1.1.1
    • Minor BugFixes
    Version 1.1.0
    • Added support for Server Ticks
    • Added Support for Server Lag
    • Added Support for lots of Non Player things
    • Moved where we are storing some of the NPE Stats
    • Added Support for Environmental Deaths on players and NPE ( For anyone using a MobSpawner )
    • Various Bugfixs
    Version 1.0.1
    • Added Support for Slimes
    • Added Initial Support for distance traveled
    • Added support for Mobs Killed by Enviroment
    Version 1.0.0
    • Added support for more metrics
    • Added a Persistence Layer with SQLite to have counter values survive Server Reboots
    • Move Build system to Maven ( Not really relevant to anyone but developers )
    • Added Block Decay and Spread Stats
    • Fixed Various Counter Bugs
    Version 0.0.2
    • Better support for Block Level Stasticics
    • Bug Fixes
    • Switched some of the counters to 64Bits
    Version 0.0.1
    • Initial Release ( Supports Most Interesting Metrics )
     
  2. Offline

    sprayk

    An example of a monitoring application anyone with the JDK would have is JConsole (mentioned in the OP). It will accept the connection string mentioned at the bottom of the OP. Not sure how to run it on Windows, but on Linux/OSX you should be able to run jconsole on the command line.
     
  3. Offline

    dkhenry

    0.0.2 Released.

    Attaching an Example Graph that I created from the server I am testing this on. View attachment 4890

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  4. Offline

    sprayk

    Is that RRD tool?
     
  5. Offline

    dkhenry

    Nope. Although if you wrote JMX Functionality RRD Tool might be able to make something like this.
     
  6. Offline

    q8p

    Can't get it to work when running on a headless Ubuntu server and an OSX Client

    Properties
    Code:
    minecraft@minecraft:~/minecraft/plugins$ cat MineJMX.properties
    #Autogenerated Config File
    #Thu Jul 21 20:09:07 CEST 2011
    port=9999
    password=passwd
    ip=10.0.1.11
    username=admin
    Netstat on server
    Code:
    minecraft@minecraft:~/minecraft/plugins$ netstat -a | grep 9999
    tcp6       0      0 [::]:9999               [::]:*                  LISTEN     
    Telnet from client
    Code:
    telnet 10.0.1.11 9999
    Trying 10.0.1.11...
    Connected to 10.0.1.11.
    Escape character is '^]'.
    fsdfsd
    Connection closed by foreign host.
    Log
    Code:
    2011-07-21 20:27:29 [INFO] MineJMX: Using Configured IP of: 10.0.1.11
    2011-07-21 20:27:29 [INFO] Registering JMX Server On: service:jmx:rmi:///jndi/rmi://10.0.1.11:9999/jmxrmi
    2011-07-21 20:27:30 [INFO] The MineJMX Plugin has been enabled.
    I think everything looks ok, but I can't connect using 'jconsole' to connect with 'Remote Process': service:jmx:rmi:///jndi/rmi://10.0.1.11:9999/jmxrmi

    Any thoughts?
     
  7. Offline

    dkhenry

    What version of the plugin did you grab ?

    Also with jconsole are you entering the right username and password ?

    Looking at what you have the only thing I can see that looks amiss is your netstat -a returns a ipv6 address. We are about to put out a v1.0.0 release that we have been testing with 1.7.3 so if it is still giving you problems grab that version from the file server and give it a shot.
     
  8. Offline

    q8p

    I took the latest binary 0.0.2. I'll try again when the 1.0.0 version binary is available. Thanks!
     
  9. Offline

    dkhenry

    I just uploaded the v1.0.0 binary You should be able to fetch it from the website.
     
  10. Offline

    q8p

    Unfortunately no luck with the new version. I'm not an ipv6 expert; don't know what the problem could be. I also don't know how JMX communicates... Maybe there's a problem finding the jconnect process from the server? Maybe I can enable some debug logging? Please let me know how to dig into this. (I have not much free time left this week, so response times may vary ;-)

    One other small thing: (Almost) all bukkit plugins put configuration / database files in a sub directory, but MineJMX doesn't. Maybe something for a next release.
     
  11. Offline

    dkhenry

    So I just ran a test on a v1.0.0 server using a Mac. It seems to connect fine which tells me it is probbably on your server side. What version of Ubuntu are you running and what is the result of

    ifconfig
    ping <your FQDN>

    Also I have filed a Issue on GitHub to move the Configuraiton to its own directory. We should be able to get to it for v1.1.0
     
  12. Offline

    q8p

    I'm using Ubuntu 11.04. Investigating this I found: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6209663 that contains:

    Code:
    Analysis of a network trace seems to show that the remote part sends 127.0.0.1 as IP address.
    Analysis of a network trace taken on 'lo' (on the client) shows that the jconsole tries to connect to a port that is not open on the client (because it is open on the server).
    
    It might be related to the /etc/hosts file and the hostname to IP conversion...
    
    I found the culprit and a workaround: my /etc/hosts was:
    127.0.0.1 localhost localhost.localdomain server4
    
    Changed that to
    127.0.0.1 localhost localhost.localdomain
    192.168.0.230 server4
    fixed the problem....
    
    so I changed my /etc/hosts to:
    Code:
    127.0.1.1    localhost
    10.0.1.11    minecraft
    (needed to restart minecraft) and it works!
     
  13. Offline

    dkhenry

    Awesome I hope you find it useful. Let me know if you have suggestions for anything else to monitor and check back ere as we are iterating rapidly and should have new releases frequently. v1.0.1 should be out soon
     
  14. Offline

    q8p

    I like it, but I could use some additional statistics:
    - number of logged in users
    - lag (int, like lagmeter)
    - global number of events / minute
    - global number of blok mutations / minute
    - per user: logged in (Boolean)
    - per user: number of events / minute
    - per user: number of blok mutations / minute

    My goal is to find the trigger for lag.

    One more question: what kind of jmx client do you use? I'm looking for a (web-)front end that I can customize with graphs.
     
  15. Offline

    dkhenry

    I have access to a Enterprise grade Network Monitoring tool that I use to monitor my Network. the graph that I posted above was from it. I am going to get working on the Server tigs and Server lag today they should be out shortly.

    For the other ones. Right now everything is exported as a counter so to get the rates you need to do some math client side. I did it this way since I wanted the data export to be as lightweight as possible also since the tool i use does this math I personally didn't have extra value by exporting the rates and its more accurate for long term polling. I will see about adding rates as indicators. As long as they don't cause too much load It shouldn't be an issue.
     
  16. Offline

    dkhenry

    v1.0.1 is up on the website. We should have v.1.1.0 up by the end of today
     
  17. Offline

    dkhenry

    v1.1.0 is up on the website. Looking for input as to what to add to v.1.2.0
     
  18. Offline

    q8p

    I've installed the latest version, Functionality looks good, but there is an issue with the performance of 'saving'. It currently takes 26 seconds to save, which results in a timeout of my shutdown script.

    Could you give access to 'performanceondemand.com'? I'm looking for a web-based jmx client and can't find a good one.
     
  19. Offline

    dkhenry

    I will PM you the username and password to access it.

    v1.1.1 is out, it fixes a few minor bugs

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  20. Offline

    dkhenry

    So here is the reason I made this plugin. A complete server Report including A top ten list for builders , miners ,fighters and explorers. As well as server stats for total activity. Ohh by the way I can do this across All the server I admin in one report, and players on multiple servers get their stats aggregated.

    http://dkhenry.com/minecraft/GiganReport.pdf
     
  21. Offline

    Jackzilla88

    I'm looking into this (and other statistics plugins) but it appears as if dkhenry.com isn't loading. Is the link broken?
     
  22. Offline

    dkhenry

    Yeah the server which resides in my basement decided this weekend was a good time to corrupt ram. I got a backup up for now , but its spotty. You can always grab the plug in from github if dkhenry.com is down. I am working on replacing the server and it should be up shortly
     
  23. Offline

    nacs

    Seems the dkhenry site is down?
     
  24. Offline

    Le_minaw

    I can't dowload it, dkhenry need password and a username...
     
  25. Offline

    dkhenry

  26. Offline

    DekDaru

    This is a great plugin!
    I have a suggestion.
    How about an option to see daily user count?
    How many people log on in a configurable amount of time? or just 24 hours?

    This would help with servers wanting to know wether or not they should advertise and improve gameplay for people to stay.
    Thanks,
    -DekDaru-
     
  27. Offline

    dkhenry

    Sure if you could file a request on Github, Development has slowed now , but once the API becomes official we will be making lots of changes.
     
  28. Offline

    Rawnkin

    Thanks for the plugin! I have a couple questions:

    (first off, I couldn't get Jconsole to connect, so I just downloaded the database that minejmx creates to mine the data there - does this even work correctly?)

    • How often does the plugin update the database? It's gathering statistics but I know some of them are not accurate (number of powered rails placed, for example).
    • In what format are the 'times' calculated? it appears to be ms, but I can't really tell for sure.
    • Can I get any support actually connecting to the plugin via jconsole? I found a config.yml (in plugins/MineJMX) that I edited with a new username/password and with my server's ip, but when I try to connect via Jconsole it just says it doesn't connect successfully. I am admittedly new at a lot of this and not sure where to go to get it working.
    Thanks for your help! I'm excited to use this plugin - I love the stats it gathers.
     
  29. Offline

    dkhenry

    Well you can just pull down the sqlite DB , but it only updates on server restart. its really just around to provide persistence for the counters, but for your questions

    1. On server restart
    2. they are unix timestamps in milliseconds
    3. Sure. You need to modify the comfig.yaml file and give it a port and your servers IP address. You will also need to make sure you have your server in its own hosts file ( /etc/hosts on most linuxes ). Then you should be able to connect to it with jconsole by using

    servername:port

    and entering your username and password.You can test if its open by using telnet you might have some firewall issues prevents connectivity. If you can't get it working I will need some info like what the network setup looks like ( is this a server on a local network or are you connecting to it remotely through a NAT/Firewall ) what OS your running and what version of the plugin your running. Also there is some debug output in your log file that would be helpful. It tells you where MineJMX is listening that would be helpful as well.
     
  30. Offline

    Rawnkin

    dk, thanks a ton for your responses. I restarted the server and the db looks a lot more accurate now :)

    My minecraft server is hosted by a provider, not one I am hosting myself, which limits my access to things like where the server is located, etc. I don't really have access to NAT/Firewall information either. I'm running MineJMX 1.2.1, I believe.

    Honestly, if i can get the updated db when I restart the server, that's plenty for me. I don't need a lot of sophisticated tracking, I just want to be able to mine some cool data (like the fact that in 6 1/2 days, we've mined 120,000 blocks) to show my users. I really appreciate the plugin, it works great!
     

Share This Page