Apache ActiveMQ is a popular Java-based open source message-oriented middleware (software for communication between distributed applications) from Apache Foundation Software. ActiveMQ processes incoming messages from applications and communicates them across your infrastructure.
Prerequisites
- In standard ActiveMQ installation (extraction of tar), change the XML by configuring the following:
<broker useJmx="true" brokerName="BROKER1">
...
</broker>
- Modify the ActiveMQ binary file by adding the following lines and then start ActiveMQ:
ACTIVEMQ_SUNJMX_START="-Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.rmi.port=1099 -Dcom.sun.management.jmxremote.ssl=false"
- For Virtual Machines, install the Linux Agent.
Configuring the credentials
Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml
activemq:
- name: activemq
user: <username>
pwd: <Password>
encoding-type: plain
labels:
key1: val1
key2: val2
Configuring the application
Virtual machine
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml
- name: activemq
instance-checks:
process-check:
- activemq
port-check:
- 61616
command-check:
- "/opt/activemq/bin/activemq --version >/dev/null 2>&1;echo $?"
mon-type: "jmx"
misc:
jmx-port: "1099"
Docker environment
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml
- name: activemq
container-checks:
image-check:
- activemq
port-check:
- 61616
mon-type: "jmx"
misc:
jmx-port: "1099"
Kubernetes environment
Configure the application in config.yaml
- name: activemq
container-checks:
image-check:
- activemq
port-check:
- 61616
mon-type: "jmx"
misc:
jmx-port: "1099"
Validate
Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.
Metrics
OpsRamp Metric | Metric Display Name | Unit | Description |
---|---|---|---|
activemq_Broker_MemoryPercentUsage | Broker Memory Usage | percent | Percentage of memory limit used by the Broker |
activemq_Broker_StorePercentUsage | Broker Store Usage | percent | Space used by the Message Store for Broker |
activemq_Broker_TempPercentUsage | Broker Temp Usage | percent | Space used by the store for temporary messages |
activemq_jvm_GarbageCollector_CollectionCount | JVM GC collection_count | Objects collected | Number of garbage objects collected |
activemq_jvm_GarbageCollector_CollectionTime | JVM GC collection_time | seconds | Time taken for collection of the garbage objects. |
activemq_jvm_HeapMemoryUsage_committed | JVM Mem heap_committed | MB | Heap memory committed (in MB) for the server |
activemq_jvm_HeapMemoryUsage_used | JVM Mem heap_used | MB | Heap memory usage (in MB) of the server |
activemq_jvm_NonHeapMemoryUsage_committed | JVM Mem non_heap_committed | MB | Non-heap memory committed (in MB) for the server |
activemq_jvm_NonHeapMemoryUsage_used | JVM Mem non_heap_used | MB | Non-heap memory usage (in MB) of the server |
activemq_jvm_OperatingSystem_OpenFileDescriptorCount | JVM OpenFDs | Open FDs | Number of Open file descriptors of the server |
activemq_jvm_Threading_ThreadCount | JVM Threads | Threads | Number of threads |
activemq_jvm_Runtime_Uptime | Uptime | Minutes | Uptime of the server |
activemq_AverageEnqueueTime | Average Enqueue Time | milliseconds | Average time for which messages remained enqueued or the average time taken by the consumers to successfully process messages |
activemq_MaxEnqueueTime | Max Enqueue Time | milliseconds | Maximum time that messages remained enqueued |
activemq_MemoryPercentUsage | Queue Memory Usage | percent | Percentage of the memory limit used by queues |
activemq_Queue_ConsumerCount | Consumer Count | Consumers | Number of consumers subscribed to this destination |
activemq_Queue_ProducerCount | Producer Count | Producers | Number of producers |
activemq_Queue_MinEnqueueTime | Min Enqueue Time | milliseconds | Minimum time messages remained enqueued |
activemq_Queue_QueueSize | Queue Size | Pending Messages | Number of messages that currently reside in the queue- potentially dispatched but unacknowledged |
activemq_Queue_DequeueCount | Dequeue Count | Dequeued Messages | Number of messages that have been acknowledged (and removed) from the destination since last restart |
activemq_Queue_DispatchCount | Dispatch Count | Dispatched Messages | Number of messages that have been dispatched (Dequeue + Inflight) |
activemq_Queue_EnqueueCount | Enqueue Count | Enqueued Messages | Number of messages that have been sent to the destination since last restart |
activemq_Queue_ExpiredCount | Expired Count | Expired Messages | Number of expired messages |
activemq_Queue_InFlightCount | InFlight Count | InFlight Messages | Number of messages sent to a destination without receiving an acknowledgement |