ActiveMQ

Collect and Ship ActiveMQ application logs to Logstash and Elasticsearch

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.

Install Integration

Please click on the Install Integration button to configure your stack for this source.

Install Filebeat

To get started you will need to install filebeat. To do this you have two main options:

  • Choose the AMD / Intel file (x86_64) or
  • Choose the ARM file (aarch64)

You can tell if you have a PC with an ARM CPU architecture by opening the Terminal application and running the arch command. If it displays arm64 you have ARM architecture.

To successfully install filebeat you will need to have root access.

If you have an x86_64 system download and install filebeat using the following commands:

curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.15.2-amd64.deb
sudo dpkg -i filebeat-8.15.2-amd64.deb

If you have an aarch64 system download and install filebeat using the following commands:

curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.15.2-arm64.deb
sudo dpkg -i filebeat-8.15.2-arm64.deb

Locate Configuration File

deb/rpm /etc/filebeat/filebeat.yml

Add ActiveMQ Log Location

Filebeat does not currently have a module to process the ActiveMQ application logs.

Therefore we need to add the ActiveMQ application log location to the filebeat inputs.

Add the following to the end of the log input example, before the filebeat.config.modules section.

- type: log
  enabled: true
  paths:
  - /path/to/log/activemq/data/activemq.log*
  fields:
    type: activemq
    multiline.pattern: ^\=
    multiline.match: before

If you're running Filebeat 8.1+ filebeat.inputs needs to be filestream instead of logs:

filebeat.inputs:
 
- type: filestream
  enabled: true
  paths:
  - /path/to/log/activemq/data/activemq.log*
  fields:
    type: activemq
    multiline.pattern: ^\=
    multiline.match: before

Enable the input

We need to ensure that any inputs we are using are enabled

filebeat.inputs:
 
- type: log
  enabled: false

Enable the filebeat input, so it should look like the following

filebeat.inputs:
 
- type: log
  enabled: true

Configure Output

We will be shipping to Logstash so that we have the option to run filters before the data is indexed.

Comment out the elasticsearch output block.

## Comment out elasticsearch output
#output.elasticsearch:
#  hosts: ["localhost:9200"]
⚠️

No input available! Your stack is missing the required input for this data source.

Talk to support to add the input

Validate Configuration

In the directory where Filebeat is installed, run the following command to validate the installation:
.\@beatname.exe test config -c @beatname.yml

If the yml file is invalid, @beatname will print a description of the error. For example, if the output.logstash section was missing, @beatname would print no outputs are defined, please define one under the output section

Start Filebeat

To start Filebeat, run in Powershell:

Start-Service filebeat

Launch Logit.io to view your logs

Data should now have been sent to your Stack.

View My Data

If you don't see take a look at How to diagnose no data in Stack below for how to diagnose common issues.

How to diagnose no data in Stack

If you don't see data appearing in your stack after following this integration, take a look at the troubleshooting guide for steps to diagnose and resolve the problem or contact our support team and we'll be happy to assist.