activemq moduleedit

This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.

This module periodically fetches JMX metrics from Apache ActiveMQ.

Compatibilityedit

The module has been tested with ActiveMQ 5.13.0 and 5.15.9. Other versions are expected to work.

Usageedit

The ActiveMQ module requires Jolokiato fetch JMX metrics. Refer to the link for instructions about how to use Jolokia.

Example configurationedit

The activemq module supports the standard configuration options that are described in Specify which modules to run. Here is an example configuration:

metricbeat.modules:
- module: activemq
  metricsets: ['broker', 'queue', 'topic']
  period: 10s
  hosts: ['localhost:8161']
  path: '/api/jolokia/?ignoreErrors=true&canonicalNaming=false'
  username: admin # default username
  password: admin # default password
  processors:
    - script:
        lang: javascript
        source: >
          function process(event) {
            var broker_memory_broker_pct = event.Get("activemq.broker.memory.broker.pct")
            if (broker_memory_broker_pct != null) {
              event.Put("activemq.broker.memory.broker.pct", broker_memory_broker_pct / 100.0)
            }

            var broker_memory_temp_pct = event.Get("activemq.broker.memory.temp.pct")
            if (broker_memory_temp_pct != null) {
              event.Put("activemq.broker.memory.temp.pct", broker_memory_temp_pct / 100.0)
            }

            var broker_memory_store_pct = event.Get("activemq.broker.memory.store.pct")
            if (broker_memory_store_pct != null) {
              event.Put("activemq.broker.memory.store.pct", broker_memory_store_pct / 100.0)
            }

            var queue_memory_broker_pct = event.Get("activemq.queue.memory.broker.pct")
            if (queue_memory_broker_pct != null) {
              event.Put("activemq.queue.memory.broker.pct", queue_memory_broker_pct / 100.0)
            }

            var topic_memory_broker_pct = event.Get("activemq.topic.memory.broker.pct")
            if (topic_memory_broker_pct != null) {
              event.Put("activemq.topic.memory.broker.pct", topic_memory_broker_pct / 100.0)
            }
          }

Metricsetsedit

The following metricsets are available: