The Apache ActiveMQ integration writes logs and collects storage usage and message metrics. Storage metrics include memory and disk usage. Message metrics include number of waiting messages, average wait time, and expired messages.
For more information about ActiveMQ, see the Apache ActiveMQ documentation.
Prerequisites
To collect ActiveMQ telemetry, you must install the Ops Agent:
- For metrics, install version 2.11.0 or higher.
- For logs, install version 2.15.0 or higher.
You must also enable JMX support in the ActiveMQ broker configuration.
This integration supports the following ActiveMQ versions:
- Classic 5.8.x through 5.16.x
- Artemis 2.x.
Configure the Ops Agent for ActiveMQ
Following the guide for Configuring the Ops Agent, add the required elements to collect telemetry from ActiveMQ instances, and restart the agent.
Example configuration
The following command creates the configuration to collect and ingest telemetry for ActiveMQ and restarts the Ops Agent.
Collect logs
ActiveMQ writes logs to syslog
, which is captured by the Ops Agent by default.
No additional user configuration is required.
Configure metrics collection
To ingest metrics from ActiveMQ, you must create receivers for the metrics that ActiveMQ produces and then create a pipeline for the new receivers.
To configure a receiver for your activemq
metrics, specify the following
fields:
Field | Default | Description |
---|---|---|
collection_interval |
60s |
A time.Duration value, such as 30s or 5m . |
endpoint |
http://localhost:1099 |
The URL of the node to monitor. |
password |
The configured password if JMX is configured to require authentication. | |
type |
This value must be activemq . |
|
username |
The configured username if JMX is configured to require authentication. |
What is monitored
The following table provides the list of metrics that the Ops Agent collects from the ActiveMQ instance.
Metric type | |
---|---|
Kind, Type Monitored resources |
Labels |
workload.googleapis.com/activemq.connection.count
|
|
GAUGE , INT64 gce_instance |
|
workload.googleapis.com/activemq.consumer.count
|
|
GAUGE , INT64 gce_instance |
broker destination
|
workload.googleapis.com/activemq.disk.store_usage
|
|
GAUGE , DOUBLE gce_instance |
|
workload.googleapis.com/activemq.disk.temp_usage
|
|
GAUGE , DOUBLE gce_instance |
|
workload.googleapis.com/activemq.memory.usage
|
|
GAUGE , DOUBLE gce_instance |
broker destination
|
workload.googleapis.com/activemq.message.current
|
|
GAUGE , INT64 gce_instance |
broker destination
|
workload.googleapis.com/activemq.message.dequeued
|
|
CUMULATIVE , INT64 gce_instance |
broker destination
|
workload.googleapis.com/activemq.message.enqueued
|
|
CUMULATIVE , INT64 gce_instance |
broker destination
|
workload.googleapis.com/activemq.message.expired
|
|
CUMULATIVE , INT64 gce_instance |
broker destination
|
workload.googleapis.com/activemq.message.wait_time.avg
|
|
GAUGE , DOUBLE gce_instance |
broker destination
|
workload.googleapis.com/activemq.producer.count
|
|
GAUGE , INT64 gce_instance |
broker destination
|
Sample dashboard
To view your ActiveMQ metrics, you must have a chart or dashboard configured. Cloud Monitoring provides a library of sample dashboards for integrations, which contain preconfigured charts. For information about installing these dashboards, see Installing sample dashboards.
Verify the configuration
This section describes how to verify that you correctly configured the ActiveMQ receiver. It might take one or two minutes for the Ops Agent to begin collecting telemetry.
To verify that the logs are ingested, go to the Logs Explorer and run the following query to view the ActiveMQ logs:
resource.type="gce_instance"
log_id("syslog")
jsonPayload.message~='(activemq\[[0-9]+\]|activemq):'
To verify that the metrics are ingested, go to Metrics Explorer and run the following query in the MQL tab:
fetch gce_instance
| metric 'workload.googleapis.com/activemq.consumer.count'
| every 1m
What's next
For a walkthrough on how to use Ansible to install the Ops Agent, configure a third-party application, and install a sample dashboard, see the Install the Ops Agent to troubleshoot third-party applications video.