Ready to get going? Start your 14 days free trial today

Start free trial

Have an account? Sign in

Send data via ActiveMQ to your Logstash instance provided by Logit.io

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 log4j2.properties file

status = error

appender.console.type = Console
appender.console.name = 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

FROM docker.elastic.co/logstash-oss:$version

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/log4j2.properties:/etc/logstash/log4j2.properties:ro \
    -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 \
    --http.host=0.0.0.0 
Toggle View

Expand View

Return to Search