---
title: Telegraf Documentation
description: Telegraf plugin for collecting metrics from ActiveMQ
url: https://docs.influxdata.com/telegraf/v1/input-plugins/activemq/
estimated_tokens: 1564
product: Telegraf
version: v1
---

-   Telegraf v1.8.0+

# ActiveMQ Input Plugin

This plugin gathers queue, topics and subscribers metrics using the Console API [ActiveMQ](https://activemq.apache.org/) message broker daemon.

**Introduced in:** Telegraf v1.8.0 **Tags:** messaging **OS support:** all

## Global configuration options

Plugins support additional global and plugin configuration settings for tasks such as modifying metrics, tags, and fields, creating aliases, and configuring plugin ordering. See [CONFIGURATION.md](/telegraf/v1/configuration/#plugins) for more details.

## Configuration

```toml
# Gather ActiveMQ metrics
[[inputs.activemq]]
  ## ActiveMQ WebConsole URL
  url = "http://127.0.0.1:8161"

  ## Credentials for basic HTTP authentication
  # username = "admin"
  # password = "admin"

  ## Required ActiveMQ webadmin root path
  # webadmin = "admin"

  ## Maximum time to receive response.
  # response_timeout = "5s"

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false
```

## Metrics

Every effort was made to preserve the names based on the XML response from the ActiveMQ Console API.

-   activemq\_queues
    -   tags:
        -   name
        -   source
        -   port
    -   fields:
        -   size
        -   consumer\_count
        -   enqueue\_count
        -   dequeue\_count
-   activemq\_topics
    -   tags:
        -   name
        -   source
        -   port
    -   fields:
        -   size
        -   consumer\_count
        -   enqueue\_count
        -   dequeue\_count
-   activemq\_subscribers
    -   tags:
        -   client\_id
        -   subscription\_name
        -   connection\_id
        -   destination\_name
        -   selector
        -   active
        -   source
        -   port
    -   fields:
        -   pending\_queue\_size
        -   dispatched\_queue\_size
        -   dispatched\_counter
        -   enqueue\_counter
        -   dequeue\_counter

## Example Output

```text
activemq_queues,name=sandra,host=88284b2fe51b,source=localhost,port=8161 consumer_count=0i,enqueue_count=0i,dequeue_count=0i,size=0i 1492610703000000000
activemq_queues,name=Test,host=88284b2fe51b,source=localhost,port=8161 dequeue_count=0i,size=0i,consumer_count=0i,enqueue_count=0i 1492610703000000000
activemq_topics,name=ActiveMQ.Advisory.MasterBroker\ ,host=88284b2fe51b,source=localhost,port=8161 size=0i,consumer_count=0i,enqueue_count=1i,dequeue_count=0i 1492610703000000000
activemq_topics,host=88284b2fe51b,name=AAA\,source=localhost,port=8161  size=0i,consumer_count=1i,enqueue_count=0i,dequeue_count=0i 1492610703000000000
activemq_topics,name=ActiveMQ.Advisory.Topic\,source=localhost,port=8161 ,host=88284b2fe51b enqueue_count=1i,dequeue_count=0i,size=0i,consumer_count=0i 1492610703000000000
activemq_topics,name=ActiveMQ.Advisory.Queue\,source=localhost,port=8161 ,host=88284b2fe51b size=0i,consumer_count=0i,enqueue_count=2i,dequeue_count=0i 1492610703000000000
activemq_topics,name=AAAA\ ,host=88284b2fe51b,source=localhost,port=8161 consumer_count=0i,enqueue_count=0i,dequeue_count=0i,size=0i 1492610703000000000
activemq_subscribers,connection_id=NOTSET,destination_name=AAA,,source=localhost,port=8161,selector=AA,active=no,host=88284b2fe51b,client_id=AAA,subscription_name=AAA pending_queue_size=0i,dispatched_queue_size=0i,dispatched_counter=0i,enqueue_counter=0i,dequeue_counter=0i 1492610703000000000
```

#### Related

-   [Configure plugins](/telegraf/v1/configure_plugins/)
-   [ActiveMQ Plugin Source](https://github.com/influxdata/telegraf/tree/v1.38.4/plugins/inputs/activemq/README.md)
