This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 444d5da72b NO-JIRA add another curl management example
444d5da72b is described below
commit 444d5da72b759decda4b52c2d48e786e4c55d4b5
Author: Justin Bertram <[email protected]>
AuthorDate: Fri Aug 4 12:09:49 2023 -0500
NO-JIRA add another curl management example
---
docs/user-manual/management.adoc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/docs/user-manual/management.adoc b/docs/user-manual/management.adoc
index ae832d19cd..54d61e0a16 100644
--- a/docs/user-manual/management.adoc
+++ b/docs/user-manual/management.adoc
@@ -475,9 +475,14 @@ See the xref:examples.adoc#jmx-management[JMX Management
Example] which shows ho
The default Broker configuration ships with the https://jolokia.org[Jolokia]
HTTP agent deployed as a web application.
Jolokia is a remote JMX-over-HTTP bridge that exposes MBeans.
For a full guide as to how to use it refer to
https://jolokia.org/documentation.html[Jolokia Documentation], however a simple
example to query the broker's version would be to use a `curl` command like
this:
-
+[,console]
+----
+$ curl -v -H "Origin: http://localhost" -u myUser:myPass
http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\"0.0.0.0\"/Active
+----
+Or you could send a JSON formatted request instead of using the URL
+[,console]
----
-curl -v -H "Origin: http://localhost" -u myUser:myPass
http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\"0.0.0.0\"/Active
+$ curl -v -H "Origin: http://localhost" -u myUser:myPass --header
"Content-type: application/json" --request POST --data '{"attribute": "Active",
"mbean": "org.apache.activemq.artemis:broker=\"0.0.0.0\"", "type": "read"}'
http://localhost:8161/console/jolokia
----
By default it's necessary to pass the `Origin` header due to the CORS checking
which is configured in `etc/jolokia-access.xml`.