How to collect RabbitMQ logs using rabbitmq-collect-env script
search cancel

How to collect RabbitMQ logs using rabbitmq-collect-env script

book

Article ID: 293182

calendar_today

Updated On:

Products

VMware RabbitMQ

Issue/Introduction

The script collects RabbitMQ and selected OS logs, system-level metrics and other environment information that can provide insight into the overall state of the node.
 

For using this script on OSS RabbitMQ, follow the instructions in the related article.

Environment


Resolution

  1. Ensure you have access to the BOSH CLI
  2. Run the command bosh -d <rabbitmq_deployment> ssh rabbitmq-server/x targeting the RabbitMQ deployment and server you wish to collect the logs for.
  3. Enter root using the command sudo -i
  4. Download the script from Github to the environment. Either of the following commands can be used to download the script: 
    $ curl -LO https://raw.githubusercontent.com/rabbitmq/support-tools/master/scripts/rabbitmq-collect-env
    
    $ wget https://raw.githubusercontent.com/rabbitmq/support-tools/master/scripts/rabbitmq-collect-env
    
  5.  Make the script executable using chmod +x rabbitmq-collect-env
  6.  Run the script using ./rabbitmq-collect-env
Perform the above steps for each of the RabbitMQ nodes in the cluster, and collect the tar file generated on each server.

Additional Information

The default log file location on PCF RabbitMQ is: /var/vcap/sys/log/rabbitmq-server/

# ./rabbitmq-collect-env
......_......_...........___..__.....__...EEEE...........................
[INFO] output archive: '/var/vcap/sys/log/rabbitmq-server/rabbitmq-env-<node-id>-<date>-<time>.tgz'


How to collect OSS RabbitMQ logs using the rabbitmq-collect-env script