Start your 14-day free trial today

No Credit Card Required

Try Free

Already have an account? Sign In

Send data via ActiveMQ to your Logstash instance provided by

ActiveMQ Logs

Ship logs from a ActiveMQ message queue to logstash

Filebeat is a lightweight shipper that enables you to send your ActiveMQ message queue logs to Logstash and Elasticsearch. Configure Filebeat using the pre-defined examples below to start sending and analysing your ActiveMQ message queue logs.

Step 1 - Configure the input.confCopy

Create the 00_input.conf file

  input {
    jms {
      broker_url => 'failover:(tcp://{yourhost}:61616)?initialReconnectDelay=100'
      destination => 'yourdestination'
      factory => 'org.apache.activemq.ActiveMQConnectionFactory'
      username => 'your-username'
      password => 'your-password'
      require_jars => ['/usr/share/jms/activemq-all-{version}.jar']

Step 2 - Configure the outputCopy

Create the 95_output.conf file to use tcp

  output {
    tcp {
        codec => json_lines
        host => "your-logstash-host"
        port => your-ssl-port
        ssl_enable => true

Step 3 - Configure the log4j2.propertiesCopy

Create the file

status = error

appender.console.type = Console = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n

rootLogger.level = info
rootLogger.appenderRef.console.ref = console

Step 4 - Install LogstashCopy

Docker (/Ubuntu/Mac)

Create the Dockerfile


Run  logstash-plugin install logstash-input-jms

Build the docker image

docker build -t $Image_name:version .

Run the image

  docker run -d --name ls \
    -v $(pwd)/config/ \
    -v path_to_configuration_files:/cusdata:rw \
    -p 9600:9600 \
    -p 5044:5044 \
    -p 3389:3389 \
    logit/logstash:6.8.4 \
    /usr/share/logstash/bin/logstash -f '/cusdata/*.conf' \
    --config.reload.automatic \ 

Step 5 - how to diagnose no data in StackCopy

If you don't see data appearing in your Stack after following the steps, visit the Help Centre guide for steps to diagnose no data appearing in your Stack or Chat to support now.

Toggle View

Expand View

Return to Search

© 2022 Ltd, All rights reserved.