#!/bin/bash
USER=admin
PASSWD=admin
URL=http:BROKER=broker1
while true
do
echo "Start Loop"
curl -X GET --user ${USER}:${PASSWD} -H "Origin: http: -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/org.apache.activemq.artemis:broker=%22${BROKER}%22
curl -X GET --user ${USER}:${PASSWD} -H "Origin: http: -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/java.lang:type=Memory/HeapMemoryUsage
curl -X GET --user ${USER}:${PASSWD} -H "Origin: http: -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/org.apache.activemq.artemis:broker=%22${BROKER}%22,component=addresses,address=%22DLQ%22/NumberOfMessages
curl -X GET --user ${USER}:${PASSWD} -H "Origin: http: -H "Content-Type: application/json" --insecure $URL/console/jolokia/read/org.apache.activemq.artemis:broker=%22${BROKER}%22,component=addresses,address=%22ExpiryQueue%22/NumberOfMessages
echo "End Loop"
sleep 1m
done