Datadog-ActiveMQ Integration

Overview

The ActiveMQ check lets you collect metrics for brokers and queues, producers and consumers, and more.

Setup

Installation

The Agent’s ActiveMQ check is packaged with the Agent, so simply install the Agent on your ActiveMQ nodes.

The check collects metrics via JMX, so you’ll need a JVM on each node so the Agent can fork jmxfetch. We recommend using an Oracle-provided JVM.

Configuration

  1. Make sure that JMX Remote is enabled on your ActiveMQ server.
  2. Configure the agent to connect to ActiveMQ. Edit ${confd_help('conf.d/activemq.yaml')}. See the sample activemq.yaml for all available configuration options.
instances:
  - host: localhost
    port: 7199
    user: username
    password: password
    name: activemq_instance
# List of metrics to be collected by the integration
# You should not have to modify this.
init_config:
  conf:
    - include:
      Type: Queue
      attribute:
        AverageEnqueueTime:
          alias: activemq.queue.avg_enqueue_time
          metric_type: gauge
        ConsumerCount:
          alias: activemq.queue.consumer_count
          metric_type: gauge
        ProducerCount:
          alias: activemq.queue.producer_count
          metric_type: gauge
        MaxEnqueueTime:
          alias: activemq.queue.max_enqueue_time
          metric_type: gauge
        MinEnqueueTime:
          alias: activemq.queue.min_enqueue_time
          metric_type: gauge
        MemoryPercentUsage:
          alias: activemq.queue.memory_pct
          metric_type: gauge
        QueueSize:
          alias: activemq.queue.size
          metric_type: gauge
        DequeueCount:
          alias: activemq.queue.dequeue_count
          metric_type: counter
        DispatchCount:
          alias: activemq.queue.dispatch_count
          metric_type: counter
        EnqueueCount:
          alias: activemq.queue.enqueue_count
          metric_type: counter
        ExpiredCount:
          alias: activemq.queue.expired_count
          type: counter
        InFlightCount:
          alias: activemq.queue.in_flight_count
          metric_type: counter

    - include:
      Type: Broker
      attribute:
        StorePercentUsage:
          alias: activemq.broker.store_pct
          metric_type: gauge
        TempPercentUsage:
          alias: activemq.broker.temp_pct
          metric_type: gauge
        MemoryPercentUsage:
          alias: activemq.broker.memory_pct
          metric_type: gauge
  1. Restart the agent
sudo /etc/init.d/datadog-agent restart


if [ $(sudo supervisorctl status | egrep "datadog-agent.*RUNNING" | wc -l) == 3 ]; \
then echo -e "\e[0;32mAgent is running\e[0m"; \
else echo -e "\e[031mAgent is not running\e[0m"; fi

Validation

Run the Agent’s info subcommand and look for activemq under the Checks section:

  Checks
  ======
    [...]

    activemq
    -------
      - instance #0 [OK]
      - Collected 8 metrics, 0 events & 0 service checks

    [...]

Compatibility

The ActiveMQ check only runs on Linux or Mac (OS X or macOS).

Data Collected

Metrics

activemq.queue.avg_enqueue_time
(gauge)
On average the amount of time (ms) that messages remained enqueued.
shown as millisecond
activemq.queue.consumer_count
(gauge)
The number of consumers connected
shown as
activemq.queue.producer_count
(gauge)
The number of producers connected
shown as
activemq.queue.max_enqueue_time
(gauge)
The max the amount of time (ms) that messages remained enqueued.
shown as millisecond
activemq.queue.min_enqueue_time
(gauge)
The min the amount of time (ms) that messages remained enqueued.
shown as millisecond
activemq.queue.memory_pct
(gauge)
The percentage of memory currently in use
shown as percent
activemq.queue.size
(gauge)
The amount of messages that remained queued.
shown as
activemq.queue.dequeue_count
(gauge)
The amount of messages that remained dequeued.
shown as
activemq.queue.dispatch_count
(gauge)
The amount of messages that have been dispatched.
shown as
activemq.queue.enqueue_count
(gauge)
The amount of messages that have been enqueued.
shown as
activemq.queue.expired_count
(gauge)
The amount of messages that have been expired.
shown as
activemq.queue.in_flight_count
(gauge)
The amount of messages that have been in flight.
shown as
activemq.broker.store_pct
(gauge)
The percentage of store in use.
shown as percent
activemq.broker.temp_pct
(gauge)
The percentage of temporary in use.
shown as percent
activemq.broker.memory_pct
(gauge)
The percentage of memory in use.
shown as percent

Events

The Activemq check does not include any event at this time.

Service Checks

The Activemq check does not include any service check at this time.

Troubleshooting

Need help? Contact Datadog Support.

Further Reading