Created
March 25, 2012 20:29
-
-
Save wspringer/2199561 to your computer and use it in GitHub Desktop.
Super compact JMX dashboard, based on Jolokia, ICanHaz and HAML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!! | |
%html | |
%head | |
%title JMX Console | |
%script(src="js/ICanHaz.min.js" language="javascript") | |
%script(src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" language="javascript") | |
%script(src="js/json2.js" language="javascript") | |
%script(src="js/jolokia-min.js" language="javascript") | |
%script(src="js/jolokia-simple-min.js" language="javascript") | |
%link(href="css/style.css" rel="stylesheet" type="text/css") | |
:javascript | |
$(document).ready(function() { | |
var j4p = new Jolokia({url: "http://tungsten.fritz.box:8778/jolokia/", method:"get", jsonp:true}); | |
j4p.request( | |
{ type: "read", mbean: "java.lang:type=Memory", attribute: "HeapMemoryUsage" }, | |
{ | |
success: function(response) { | |
var data = ich.heap(response.value); | |
$("#heap").append(data); | |
} | |
} | |
); | |
}); | |
%script(id="heap" type="text/html") | |
%ul | |
%li {{used}} | |
%li {{committed}} | |
%li {{max}} | |
%body | |
#heap | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment