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

  1. In standard ActiveMQ installation (extraction of tar), change the XML by configuring the following:
<broker useJmx="true" brokerName="BROKER1">
...
</broker>
  1. 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"
  1. 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 MetricMetric Display NameUnitDescription
activemq_Broker_MemoryPercentUsageBroker Memory UsagepercentPercentage of memory limit used by the Broker
activemq_Broker_StorePercentUsageBroker Store UsagepercentSpace used by the Message Store for Broker
activemq_Broker_TempPercentUsageBroker Temp UsagepercentSpace used by the store for temporary messages
activemq_jvm_GarbageCollector_CollectionCountJVM GC collection_countObjects collectedNumber of garbage objects collected
activemq_jvm_GarbageCollector_CollectionTimeJVM GC collection_timesecondsTime taken for collection of the garbage objects.
activemq_jvm_HeapMemoryUsage_committedJVM Mem heap_committedMBHeap memory committed (in MB) for the server
activemq_jvm_HeapMemoryUsage_usedJVM Mem heap_usedMBHeap memory usage (in MB) of the server
activemq_jvm_NonHeapMemoryUsage_committedJVM Mem non_heap_committedMBNon-heap memory committed (in MB) for the server
activemq_jvm_NonHeapMemoryUsage_usedJVM Mem non_heap_usedMBNon-heap memory usage (in MB) of the server
activemq_jvm_OperatingSystem_OpenFileDescriptorCountJVM OpenFDsOpen FDsNumber of Open file descriptors of the server
activemq_jvm_Threading_ThreadCountJVM ThreadsThreadsNumber of threads
activemq_jvm_Runtime_UptimeUptimeMinutesUptime of the server
activemq_AverageEnqueueTimeAverage Enqueue TimemillisecondsAverage time for which messages remained enqueued or the average time taken by the consumers to successfully process messages
activemq_MaxEnqueueTimeMax Enqueue TimemillisecondsMaximum time that messages remained enqueued
activemq_MemoryPercentUsageQueue Memory UsagepercentPercentage of the memory limit used by queues
activemq_Queue_ConsumerCountConsumer CountConsumersNumber of consumers subscribed to this destination
activemq_Queue_ProducerCountProducer CountProducersNumber of producers
activemq_Queue_MinEnqueueTimeMin Enqueue TimemillisecondsMinimum time messages remained enqueued
activemq_Queue_QueueSizeQueue SizePending MessagesNumber of messages that currently reside in the queue- potentially dispatched but unacknowledged
activemq_Queue_DequeueCountDequeue CountDequeued MessagesNumber of messages that have been acknowledged (and removed) from the destination since last restart
activemq_Queue_DispatchCountDispatch CountDispatched MessagesNumber of messages that have been dispatched (Dequeue + Inflight)
activemq_Queue_EnqueueCountEnqueue CountEnqueued MessagesNumber of messages that have been sent to the destination since last restart
activemq_Queue_ExpiredCountExpired CountExpired MessagesNumber of expired messages
activemq_Queue_InFlightCountInFlight CountInFlight MessagesNumber of messages sent to a destination without receiving an acknowledgement