You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Pablo Cuadrado <pa...@gmail.com> on 2010/04/01 09:59:26 UTC
JMX-REST interface working!
Hi there!
In a first progressive step, I managed to adapt a simple (yet
effective) REST interface I've found at:
http://blogs.sun.com/jmxnetbeans/entry/restful_access_to_jmx_instrumentation
The example was connecting to the first MBean server found on the
virtual machine, so it was showing many JVM MBeans, but not the
Cassandra ones. I added a JMXConnector articulation (connecting to the
default 8080 port) to enable remote MBean browsing... with an awful
implementation... HORRIBLE!... But it was just a simple test...
It even supports reading of tabular, composite, collections, complex MBeans.
Runs on it's own http server (in port 2021 in my example), this is a
working URL which returns the requested data:
http://localhost:2021/jmx/org.apache.cassandra.db:type=ColumnFamilyStores,name=Keyspace1,columnfamily=Standard2/MemtableDataSize
So, that huge URI returns a single number!!! :P
----
Limitations so far:
- TO-DO items: Set, Invoke and Notifications handling.
- The "request-per-mbean-attribute" approach is a bit rough, the web
client will be doing a request for every single magnitude being
measured... the interface should have more commands to retrieve
related sets of information, possibly JSON formatted.
-----
Regards!