Monitor ActiveMQ Message Broker
Overview
Activemq sfAgent plugin provides metrics related to message traffic distribution and other internal transactions among the brokers.
Metrics collected by the plugin are organized across the following categories
- Broker stats: contain transactional data and metrics related to broker state
- Topic stats: provide metrics for analyzing internal transactions associated with each topic
- Queue stats: provide metrics for analyzing internal transactions associated with each queue
- JVM stats: contain all JVM related metrics like garbage collection details, memory pools, loaded/unloaded classes etc.
Activemq logger plugin collects general logs comprising state change and broker specific information generated by the activemq message broker.
The configurations given below apply only to the ActiveMQ message broker running on an instance.
Prerequisites
- Activemq Metric Plugin is based on Jolokia agent which requires JMX monitoring to be enable locally. Following property needs to be included during the start of activemq process - -Dcom.sun.management.jmxremote
- JCMD command must be installed in the machine 
Configuration
sfAgent section provides steps to install and automatically generate plugin configurations.  User can also manually add the configuration shown below to config.yaml under /opt/sfagent/ directory
key: <Profile_key>
tags:
  Name: <instance_name>
  appName: <app_name>
  projectName: <project_name>
metrics:
  plugins:
    - name: activemq
      enabled: true
      interval: 300
      config:
        process: activemq
        port: 8161
        documentsTypes:
          - brokerStats
          - topicStats
          - queueStats
          - jvmStats
logging:
  plugins:
    - name: activemq-log
      enabled: true
      config:
        log_path: <..activemq logpath..>
        log_level:
          - error
          - warning
          - info
          - warn
Parameters required in metrics plugin
process: Activemq process name (It should be part of java main class)
port: Broker Port
documentTypes: User can either leave this empty to collect all documentTypes or mention specific documentTypes to collect. Available options for plugin type activemq are brokerStats, topicStats, queueStats, jvmStats
Logger plugin requires log path to be specified. Wildcard characters are supported
Viewing data and dashboards
Data collected by plugins can be viewed in SnappyFlow’s browse data section
Metrics
- plugin:- activemq
- documentType:- brokerStats,- topicStats,- queueStats,- jvmStats
- Dashboard template:- ActiveMQ
Logs
- Plugin:- activemq
- documentType:- activemq-logs
See Also
Elasticsearch
Kafka-REST
Kafka-Connect