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 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.
Supported metrics
OpsRamp Metric | Metric Display Name | Unit |
---|---|---|
activemq_Broker_MemoryPercentUsage Percentage of memory limit used by the Broker. | Broker Memory Usage | percent |
activemq_Broker_StorePercentUsage Space used by the Message Store for Broker. | Broker Store Usage | percent |
activemq_Broker_TempPercentUsage Space used by the store for temporary messages. | Broker Temp Usage | percent |
activemq_jvm_GarbageCollector_CollectionCount Number of garbage objects collected. | JVM GC collection_count | Objects collected |
activemq_jvm_GarbageCollector_CollectionTime Time taken for collection of the garbage objects. | JVM GC collection_time | seconds |
activemq_jvm_HeapMemoryUsage_committed Heap memory committed (in MB) for the server. | JVM Mem heap_committed | megabytes (MB) |
activemq_jvm_HeapMemoryUsage_used Heap memory usage (in MB) of the server. | JVM Mem heap_used | megabytes (MB) |
activemq_jvm_NonHeapMemoryUsage_committed Non-heap memory committed (in MB) for the server. | JVM Mem non_heap_committed | megabytes (MB) |
activemq_jvm_NonHeapMemoryUsage_used Non-heap memory usage (in MB) of the server. | JVM Mem non_heap_used | megabytes (MB) |
activemq_jvm_OperatingSystem_OpenFileDescriptorCount Number of Open file descriptors of the server. | JVM OpenFDs | Open FDs |
activemq_jvm_Threading_ThreadCount Number of threads. | JVM Threads | Threads |
activemq_jvm_Runtime_Uptime Uptime of the server. | Uptime | Minutes |
activemq_AverageEnqueueTime Average time for which messages remained enqueued or the average time taken by the consumers to successfully process messages. | Average Enqueue Time | milliseconds |
activemq_MaxEnqueueTime Maximum time that messages remained enqueued. | Max Enqueue Time | milliseconds |
activemq_MemoryPercentUsage Percentage of the memory limit used by queues. | Queue Memory Usage | percent |
activemq_Queue_ConsumerCount Number of consumers subscribed to this destination. | Consumer Count | Consumers |
activemq_Queue_ProducerCount Number of producers. | Producer Count | Producers |
activemq_Queue_MinEnqueueTime Minimum time messages remained enqueued. | Min Enqueue Time | milliseconds |
activemq_Queue_QueueSize Number of messages that currently reside in the queue- potentially dispatched but unacknowledged. | Queue Size | Pending Messages |
activemq_Queue_DequeueCount Number of messages acknowledged (and removed) from the destination since last restart. | Dequeue Count | Dequeued Messages |
activemq_Queue_DispatchCount Number of messages dispatched (Dequeue + Inflight). | Dispatch Count | Dispatched Messages |
activemq_Queue_EnqueueCount Number of messages sent to the destination since last restart. | Enqueue Count | Enqueued Messages |
activemq_Queue_ExpiredCount Number of expired messages. | Expired Count | Expired Messages |
activemq_Queue_InFlightCount Number of messages sent to a destination without receiving an acknowledgement. | InFlight Count | InFlight Messages |