ActiveMQ
Datadog's Research Report: The State of Serverless Report: The State of Serverless

ActiveMQ

Agent Check Agent Check

Supported OS: Linux Mac OS Windows

Overview

The ActiveMQ check collects metrics for brokers and queues, producers and consumers, and more.

Note: If you are running a ActiveMQ version older than 5.8.0, see the Agent 5.10.x released sample files.

Setup

Installation

The Agent’s ActiveMQ check is included in the Datadog Agent package, so you don’t need to install anything else on your ActiveMQ nodes.

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

Configuration

Host

Follow the instructions below to configure this check for an Agent running on a host. For containerized environments, see the Containerized section.

  1. Make sure that JMX Remote is enabled on your ActiveMQ server.
  2. Configure the agent to connect to ActiveMQ. Edit activemq.d/conf.yaml, in the conf.d/ folder at the root of your Agent’s configuration directory. See the sample activemq.d/conf.yaml for all available configuration options.

    instances:
     - host: localhost
       port: 1616
       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
  3. Restart the agent

Log collection

Available for Agent versions >6.0

  1. Collecting logs is disabled by default in the Datadog Agent, enable it in your datadog.yaml file:

    logs_enabled: true
  2. Add this configuration block to your activemq.d/conf.yaml file to start collecting your Riak logs:

    logs:
     - type: file
       path: "<ACTIVEMQ_BASEDIR>/data/activemq.log"
       source: activemq
       service: "<SERVICE_NAME>"
     - type: file
       path: "<ACTIVEMQ_BASEDIR>/data/audit.log"
       source: activemq
       service: "<SERVICE_NAME>"
  3. Restart the Agent.

Containerized

For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.

Metric collection
ParameterValue
<INTEGRATION_NAME>activemq
<INIT_CONFIG>blank or {}
<INSTANCE_CONFIG>{"host": "%%host%%","port":"1099"}
Log collection

Available for Agent versions >6.0

Collecting logs is disabled by default in the Datadog Agent. To enable it, see Docker log collection.

ParameterValue
<LOG_CONFIG>{"source": "activemq", "service": "<YOUR_APP_NAME>"}

Validation

Run the Agent’s status subcommand and look for activemq under the Checks section.

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
activemq.queue.producer_count
(gauge)
The number of producers connected
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 message
activemq.queue.dequeue_count
(gauge)
The amount of messages that remained dequeued.
Shown as message
activemq.queue.dispatch_count
(gauge)
The amount of messages that have been dispatched.
Shown as message
activemq.queue.enqueue_count
(gauge)
The amount of messages that have been enqueued.
Shown as message
activemq.queue.expired_count
(gauge)
The amount of messages that have been expired.
Shown as message
activemq.queue.in_flight_count
(gauge)
The amount of messages that have been in flight.
Shown as message
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 events.

Service Checks

activemq.can_connect:
Returns CRITICAL if the Agent is unable to connect to and collect metrics from the monitored ActiveMQ instance, otherwise returns OK.

Troubleshooting

Need help? Contact Datadog support.

Further Reading

Additional helpful documentation, links, and articles:

ActiveMQ XML Integration

Overview

Get metrics from ActiveMQ XML in real time to:

  • Visualize and monitor ActiveMQ XML states.
  • Be notified about ActiveMQ XML failovers and events.

Setup

Installation

The ActiveMQ XML check is included in the Datadog Agent package, so you don’t need to install anything else on your servers.

Configuration

Follow the instructions below to configure this check for an Agent running on a host. For containerized environments, see the Containerized section.

Host

  1. Edit activemq_xml.d/conf.yaml, in the conf.d/ folder at the root of your Agent’s configuration directory with your stats url. See the sample activemq_xml.d/conf.yaml for all available configuration options.

Note: The ActiveMQ XML integration can potentially emit custom metrics, which may impact your billing. By default, there is a limit of 350 metrics. If you require additional metrics, contact Datadog support.

  1. Restart the Agent.

Containerized

For containerized environments, see the Autodiscovery with JMX guide.

Validation

Run the Agent’s status subcommand and look for activemq_xml under the Checks section.

Data Collected

Metrics

activemq.queue.count
(gauge)
The number of queues.
activemq.queue.consumer_count
(gauge)
The number of consumers of a queue.
activemq.queue.dequeue_count
(gauge)
The total number of messages sent to a queue since the last restart.
Shown as message
activemq.queue.enqueue_count
(gauge)
The total number of messages removed from a queue (acknowledged by consumer) since the last restart.
Shown as message
activemq.queue.size
(gauge)
The size of a queue.
activemq.topic.count
(gauge)
The number of topics.
activemq.topic.consumer_count
(gauge)
The number of consumers of a topic.
activemq.topic.dequeue_count
(gauge)
The total number of messages sent to a topic since the last restart.
Shown as message
activemq.topic.enqueue_count
(gauge)
The total number of messages removed from a topic (acknowledged by consumer) since the last restart.
Shown as message
activemq.topic.size
(gauge)
The size of a topic.
activemq.subscriber.count
(gauge)
The number of subscribers.
activemq.subscriber.dequeue_counter
(gauge)
The number of messages sent to and acknowledged by the client.
Shown as message
activemq.subscriber.dispatched_counter
(gauge)
The number of messages sent to the client.
Shown as message
activemq.subscriber.dipatched_queue_size
(gauge)
The number of messages dispatched that are awaiting acknowledgement.
Shown as message
activemq.subscriber.enqueue_counter
(gauge)
The number of messages that matched the subscription.
Shown as message
activemq.subscriber.pending_queue_size
(gauge)
The number of messages pending delivery.
Shown as message

Events

The ActiveMQ XML check does not include any events.

Service Checks

The ActiveMQ XML check does not include any service checks.

Troubleshooting

Need help? Contact Datadog support.

Further Reading