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

    vapid2323

    I am looking to get some help,

    I really want this as I think it will help me track down some issues but VisualVM hates me :)

    Code:
    2012-04-11 11:10:46 [INFO] MineJMX: Using Minecraft Server hostname of: 207.244.153.118
    2012-04-11 11:10:46 [INFO] MineJMX: Using Configured IP of: 207.244.153.118
    2012-04-11 11:10:46 [INFO] Registering JMX Server On: service:jmx:rmi:///jndi/rmi://207.244.153.118:9999/jmxrmi
    2012-04-11 11:10:47 [INFO] Restoring : this:server:playTime:0,blocksPlaced:0,blocksDestroyed:0,blocksSpread:0,blocksDecayed:0,itemsCrafted:0,playersKilled:0,npesKilled:0,playerDistanceMoved:0.0
    2012-04-11 11:10:47 [INFO] Restoring : this:performance:serverTicks:54880,runningTasks:0,pendingTasks:0,ticksPerSecondAverage:13,ticksPerSecondInstantious:19,serverLag:0
    Its running and everything's great in the firewall:

    Code:
    tcp6      0      0 :::9999                :::*                    LISTEN
    
    I am going to walk away for a little and come back to this, I don't know whats up, the firewall allows connections for everything else and I am fine getting ports to open so it makes no sense that its not working. VisualVM just fails to connect every time, but I can telnet via that port. So any ideas, or things I might look at?
     
  3. Offline

    dkhenry

    I would check your hostfile and make sure you have your IP resolved. JMX gets a little wonky if it can't resolve hostnames.

    Also your netstat line looks a little different then mine here is mine

    tcp 0 0 :::9999 :::* LISTEN

    Java is all IPv6 by default so It shouldn't matter that its listing the IPv6 address, I would double check the hostfile I would bet thats where the problem is.
     
  4. Offline

    vapid2323

    Hey thanks for that, I have posted up on the Ubuntu forum looking to get peoples thoughts on my host file but I cant get anyone to take a look. I assume that's because its a question they are tired of getting :)

    Can you help me figure out if my hosts file is proper?

    The config I would like to use in the plugin:

    Code:
    ip: 207.244.153.118
    hostname: BukkitServer
    My hosts file:
    Code:
    127.0.0.1 BukkitServer localhost.localdomain localhost
    207.244.153.118    BukkitServer vapidflats.com
    Granted I don't truly understand what the hosts file is even for (yes even after reading tutorials) I have all my domains sent to the IP of the server why cant you just use IPs... Anyhow at this point I am at a dead end of my knowledge, and apparently also my ability to get away with googling my problems. Any help you can provide would be great!
     
  5. Offline

    dkhenry

    With that host file and MineJMX config you will have to connect to the server using this kind of line

    Code:
        BukkitSever:9999
    
    You normally want to have only one hostname and make it the FQDN of the server, So in your case you might want to make it BukkitServer.vapidflats.com and set up your DNS to resolve that name correctly from the outside world ( or just set it in your home machines hosts file ) . Then your servers hosts file should look like this

    Code:
    127.0.0.1 BukkitServer.vapidflats.com localhost.localdomain localhost
    ::1 BukkitServer.vapidflats.com localhost.localdomain localhost
     
    207.244.153.118 BukkitServer.vapidflats.com
    
    You also want to modify /etc/hostname to set the correct hostname and dnsdomainname. If your not connectin through a NAT then leave the hostname filed blank in the MineJMX config.
     
  6. Offline

    vapid2323

    Ok just to be sure we are not missing anything i have updated my hosts file as you have posted and BukkitServer.vapidflats.com will send you to my server. Now my server has never run DNS locally, my colocation provider takes care of all that for me, all I do it direct traffic to my server with a Class A record on my domains. apache then catches that and directs them to the needed locations.

    Also I am working with VisualVM (not sure if that's the issue) to connect to the server remotely, I hope that one was clear but wanted to be sure.

    I have even removed the firewall to see if that was part of the problem, are you running your monitoring remotely? If so what program are you using? Perhaps that might be my issue.

    Whoa, I got it to work!

    Its something to do with my firewall

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

    dkhenry

    updating your DNS would just allow you to reach the server remotely with the FQDN. If your connecting remotly you must be able to reach your server on what it thinks its hostname is. So if your server thinks its BukkitServer.vapidflats.com then you need to have some way to resolve that to the ip.


    Once you have that try using jconsole to connect to the server. You will need to use the username and password in your minejmx config file. Also verify from the remote host you can telnet to the correct port. After that you would need to start using tcpdmp and Wireshark to figure out more.

    Cool. If you see anything you think should be changed let me know.

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

    dark_hunter

Share This Page