I am using Jboss Application Server 7.1.3 Final and My requirement is to alert the admin to take necessary action If the particular jms queue having more than n messages in the queue. I could finish through shell script if I get the expected json result.
I tried the following command
curl --digest -D - http://user:userpwd@localhost:9990/management/ --header "Content-Type: application/json" -d '{"operation":"read-resource", "address":["subsystem","messaging","hornetq-server","jms-destinations","jms-queue"], "json.pretty":1}'
And getting the below output
HTTP/1.1 401 Unauthorized
Content-length: 0
Www-authenticate: Digest realm="ManagementRealm",nonce="22087e300bd9a2a53c37f21bdefe1950"
Date: Mon, 31 Aug 2015 13:02:47 GMT
HTTP/1.1 500 Internal Server Error
Transfer-encoding: chunked
Content-type: application/json
Date: Mon, 31 Aug 2015 13:02:47 GMT
{
"outcome" : "failed",
"failure-description" : "JBAS014807: Management resource '[\n (\"subsystem\" => \"messaging\"),\n (\"hornetq-server\" => \"jms-destinations\")\n]' not found",
"rolled-back" : true
}
My Standalone-full.xml configuration for Messaging:
<subsystem xmlns="urn:jboss:domain:messaging:1.2">
<hornetq-server>
<jms-destinations>
<jms-queue name="myQueue">
<entry name="queue/myQueue"/>
</jms-queue>
</jms-destinations>
</hornetq-server>
</subsystem>
(rest of standalone-full.xml configurations removed)
Is anything needs to be added in curl command?