[WIP] Mineload - The server admins best friend

Discussion in 'WIP and Development Status' started by Timatooth, Apr 30, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Timatooth

    [​IMG]
    Hi everyone,

    I've been working a plugin to generate bukkit performance data suitable for a web page or mobile device for a while now and feel like its 'almost completely usable' in terms of features. Currently all my work is being done on a web interface to display the data nicely in the browser. The web interface also takes advantage of the fantastic JSONAPI plugin by Alec Gorge.

    On its own the plugin does very little
    All you get is a simple XML response from a extremely simple HTTP class I wrote. Secured with a simple password GET field.

    HTML:
    <server>
      <motd>An empty Minecraft Server</motd>
      <playercount>0</playercount>
      <maxplayers>20</maxplayers>
      <totalplayers>0</totalplayers>
      <memoryused>228</memoryused>
      <maxmemory>3925</maxmemory>
      <jvmversion>1.7.0_21</jvmversion>
      <osname>Linux</osname>
      <osversion>3.9.0-generic</osversion>
      <cwd>/storage/personals/tim.sullivan/b</cwd>
      <bukkitversion>1.5.1-R0.2</bukkitversion>
      <tps>20.0</tps>
      <heartbeat ticktime="1000">737</heartbeat>
      <tx>1907874301</tx>
      <rx>12835321023</rx>
      <generated>2.0</generated>
    </server>
    The Web Interface
    I have used as little PHP-specific code as possible to make it easy to port the web interface into an internal webserver if desired. In other words: if you want the web interface to be part of the plugin, it would be very easy to switch that (if by popular demand) much like how dynmap works with its internal web server.

    What does the interface do thus far?
    * Therapeutically watch live updating gauges for server vital signs, slots free, network usage, tick rate, memory used etc.
    * See/Stalk online players in a table and perform kick/ban operations.
    * Edit plugin config YAML files in a visual text editor. No more laggy SSH connections or tedious config change uploads to your server.
    * Browse player inventories and perform what I call "Reverse CNS" [Reverse Chest Name System] :D if you have LWC to see the contents and locations of their stuff for a specific player name. Creepy right?
    * Real time server console. Uses the new WebSockets API which should work on new versions of Firefox | Chrome | Safari | and... IE10 [theoretically... but I haven't Windows to test on]
    * Browse your installed plugins in a handy table with version information. Very useful to see if you're a version behind in something installed.

    Screenshots - Dashboard
    [​IMG]

    Realtime Console Viewer Screenshot (open)

    [​IMG]

    Plugin version table (open)

    [​IMG]

    Online Player Viewer (open)

    Players were hard coded for testing. I improvised in getting their coordinates and IP addresses :p.
    [​IMG]

    Player Inventories and Reverse chest lookup (LWC) (open)

    [​IMG]


    Plugin config YAML editor (open)

    [​IMG]


    The latest plugin version is 0.0.5 on bukkitdev and the web interface screenshots are currently of the LATEST changes on my GitHub repository which you can download as a ZIP file (look for Zip icon thingy on the github page) and try out on your web server. It's currently at version pre-v0.0.6. The actual 0.0.6 will be published through the usual bukkit process.
    Edit 21st May 2012 - Plugin and web v0.0.6 has been released on BukkitDev

    I would really appreciate someone letting me know how it performs on a large server as I don't have production server with players to test/improve on it. :rolleyes:

    Mineload BukkitDev Page for downloads
    http://dev.bukkit.org/server-mods/mineload/

    Check out and "Star" the code on Github
    https://github.com/Timatooth/Mineload

    Installing
    -Install JSONAPI plugin if you want to use the extended features in the screenshots.
    -Fetch MineloadPlugin and interface from bukkitdev and follow instructions there.

    I believe the project has a lot of work to go until a 'stable release' version is published but I still think it's at a state where some server administrators might find it useful. I'm also prepared to extend it to tap into permissions editing (done it) and/or economy but I think there might be other software out there that already specializes in that field.

    If you find bugs/issues/etc please feel free to post them on the GitHub issue tracker. Cheers.

    UPDATE - Another idea.
    Server Crash Prediction using a Logistic Regression Model

    Basically, get all the historical performance data from a SQL database and create a model that finds the most influential variables that can result in a server crash, eg memory usage, TPS and a given point in time. Using the model, I can then calculate the odds of the server crashing and alert the server admin.

    I made this post of describing how it sort of works.
    http://forums.bukkit.org/threads/using-logistic-regression-to-predict-prevent-server-failure.146087/
     
    Org, Adrenaline and Rprrr like this.
  2. Offline

    Hoolean

    Looks well made :)
     
  3. Offline

    Timatooth

    Thanks! I hope there might be some people out there with large servers that might be willing to test it out and let me know how well it performs under load since I don't have a proper server ;)
     
  4. Offline

    kreashenz

    This looks crazy as hell! I'm actually going to look forward to using this! Good job, man.
     
  5. Offline

    Timatooth

    Thanks a lot. Feel free to try out what's there so far in case I miss any silly bugs before an 'official' release :D there are still some issues with the inventory manager.
     
  6. Holy... can't wait!
     
  7. Offline

    UltiFix

    THIS IS AMAZING!!! Installed it and i love it thanks man!
     
    Timatooth likes this.
  8. Offline

    Timatooth

  9. Offline

    rguz10

    Start of reading: Not another one of theseā€¦
    After reading: Err my gawd this is amazing and will defiantly try it
     
    Timatooth likes this.
  10. Offline

    Timatooth

    Just published version 0.0.6 which has all the features now. I might do a release post soon and maybe a demonstration/installation video.
     
  11. Offline

    Org

    This looks insane! Timatooth

    I can't wait to see more of this! Please don't make it a subscription plugin like so many of these amazing projects, I'll gladly donate to keep it free!

    Amazing work! Subscribing to this thread for sure.
     
    Timatooth likes this.
  12. Offline

    Timatooth

    Thanks for the comment, the project is GNU/GPL licensed so no subscriptions ;)

    Thanks.
     
  13. Offline

    Timatooth

    Hey everyone! Just a quick update about the project status.

    Over 2.5k downloads, nice! The next release (0.0.8) is going to be quite different. I don't think I will be supporting the PHP interface anymore. The interface will look and behave exactly the same if not, faster and more reliably. Instead I have written a HTTP server in java that handles the inner workings of the web interface. I have made this decision because many people are struggling with getting the interface to talk with the Bukkit server. Installation will be a one step procedure.

    I have added SQL code to start logging performance data to be graphed visually later. This is currently using H2 and MySQL (config options). The http server will make use of the database to handle Mineload user authentication.

    Many people have asked for a 'permission' system so lower ranking people can do lower ranking things such as only kick/ban players not perform commands etc. These features will be governed by the already existing group/user methods in JSONAPI plugin's configuration. Mineload groups will be associated with a JSONAPI group for simplicity.

    Developer Jargin Begins now!
    I have created a 'http server api' for the want of a better term. It's kind of based off Django's ideas and MVC paradigm.
    Example usage when ever a user visits yourip.com:25500/fooplugin/whatever
    First register the view.
    Code:java
    1. public class FooPlugin extends Plugin{
    2. public void onEnable(){
    3. ...
    4. //create a regular expression to match URL that browser will visit.
    5. Pattern myUrlPattern = Pattern.compile("^/myfoourl/?([\\w\\.\\-/]*)$");
    6. //we tell the Http Scheduler that when a request is made it will search
    7. //for the matching URL to call view class's handle() method which returns a Http Response.
    8. HttpServer.getScheduler().registerView(myUrlPattern, new FooPluginView());
    9. ...
    10. }
    11. }

    Now define the behavior when the view is called:
    Code:java
    1. import com.timatooth.mineload.http.*;
    2. /**
    3.  * Class implements the View interface which gets called when the URL matches
    4.  * the regular expression that it was registered with.
    5.  */
    6. public class FooPluginView implements View {
    7. /**
    8.   * Is called when a request is made and matches the URL this view is registered against.
    9.   * @param r the request sent from the browser. GET/POST, cookies, sessions, HTTP headers.
    10.   */
    11. @override
    12. public Response handle(Request r) {
    13. //Very basic html response. The AssetManager can send static content such as
    14. //html, jpg, png, css, js.
    15. //Static content is stored in plugins/MineloadPlugin/www/
    16. Response response = Response.compose(r, "<h1>Hello World! It Works!</h1>");
    17. return response; //Http server will handle all the threading/socket stuff.
    18. }
    19. }


    The http server is already contained in 0.0.7 but is only handling the XML requests which are registered as a view too! I have made radical changes to the api since then. Please check out the JavaDocs and tell me what you think! All work is in github mineloadplugin http branch.

    Since I now have a job doing web work for a company + uni + photography stuff I don't have too much time for this. It would be great if there were other developers out there that would like to chip in too.
     
  14. Offline

    alfista

    Hi,
    very good plugin. I like it. :) Good job. Would like see new updated and features. :D
    I would like to know when you will support the V2 of JSONAPI?
     
  15. Offline

    alfista

    Hi, I don't have a big server, but prepare to start a new one and if you will I would like to test the new version, when you have it.
     
  16. Offline

    Garris0n

    alfista
    >Timatooth was last seen: Jan 7, 2014
     
  17. Offline

    alfista

    I have spoke with him on his issue page some days ago. He has some problems with programing, but he try to do it.
     
Thread Status:
Not open for further replies.

Share This Page