Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.19 KB

README.MD

File metadata and controls

35 lines (27 loc) · 1.19 KB

sample curl invocations:

GET wtih JSON payload - invoke operation
curl -X GET -u admin:admin -d "{'config': {}, 'mbean': 'java.lang:type=OperatingSystem', 'type': 'read'}"  "http://localhost:8181/jolokia"
GET with inlined params - read
curl -u admin:admin "http://localhost:8181/jolokia/read/java.lang:type=Memory/HeapMemoryUsage"
GET with inlined params - exec
curl -u admin:admin "http://localhost:8181/jolokia/exec/jolokia:type=ServerHandler,qualifier=hawtio/mBeanServersInfo"
GET with params urlencoded and separated by slashes
curl -X GET -u admin:admin "http://localhost:8181/jolokia/exec/io.fabric8:type=Fabric/changeCreateOptionsField/remotessh2/jvmOpts/-XX%3ANewRatio%3D7"
Script friendly:
# params
_HOST=localhost:8181
_CONTAINERID=remotessh2
_JVM_OPTS=-XX:NewRatio=6%20-Xmx512m # use %20 instead of SPACE

# invocation
curl -X GET -u admin:admin "http://$_HOST/jolokia/exec/io.fabric8:type=Fabric/changeCreateOptionsField/$_CONTAINERID/jvmOpts/$_JVM_OPTS"