Below you will find pages that utilize the taxonomy term “Jolokia”
Posts
read more
Dump all (most?) JMX Beans via Jolokia using just the shell and a bit of json formatting
It seems jolokia doesn’t support dumping everything with just one command.
So here’s a really hacky quick and dirty way to get all information jolokia can access:
for name in $(curl --silent http://dwtest:10002/search/*:* | python -m json.tool | grep '"value":' -A9999 | tail -n +2 | head -n -2 | sed 's/ /%20/g' | cut -d'"' -f2);
do curl --silent "http://dwtest:10002/read/$name" | python -m json.tool;
done
Once you’ve gotten this far, piping the information into a file or another tool is trivial.
Posts
read more
Simple python script to access jmx via jolokia
I’ve never been much of a python guy. Now there’s this production environment where we’ve got a few basic things like bash, ruby (since we’re using puppet) and python. Our Java based software has a nice JMX interface with a bunch of lifesavers in it and each JVM has the jolokia agent running (http/json access to jmx) so we can access this goodness fairly easily from scripts and/or the shell. So far what we’d be doing would be something like this: