XRAY: Managing RabbitMQ Logs in Legacy Installations of JFrog Xray

XRAY: Managing RabbitMQ Logs in Legacy Installations of JFrog Xray

AuthorFullName__c
Uma Chintala
articleNumber
000006358
FirstPublishedDate
2025-02-27T11:01:36Z
lastModifiedDate
2025-02-26
VersionNumber
1
Introduction

In legacy installations of JFrog Xray, one of the challenges administrators may face is the RabbitMQ logs consuming excessive disk space on the server, potentially leading to unforeseen outages. It is essential to manage these logs effectively to ensure continuous system availability.

RabbitMQ Overview

RabbitMQ operates as a messaging queue service utilized by JFrog Xray to facilitate asynchronous task execution. As an external service, RabbitMQ cannot be configured through the system’s _logrotate.conf_ file. 

Configuring Log Rotation for RabbitMQ

To mitigate the risk of RabbitMQ logs occupying excessive space, administrators can configure log rotation directly through the RabbitMQ configuration file. This file is located at:
<JFRog_Home>/app/bin/rabbitmq/rabbitmq.conf

Steps to Configure Log Rotation
  1. Access the Configuration File:
    • Navigate to the directory specified above to locate the rabbitmq.conf file.
  2. Open the File:
    • Use a text editor to open the rabbitmq.conf file for editing.
  3. Modify Log Rotation Settings:
    • Configure the necessary settings within the file to establish a log rotation policy suitable for your environment. Sample snippet below.
    • # rotate when the file reaches 25 MiB
        log.file.rotation.size = 26214 ( Kilobytes) 
      #keep up to 5 archived log files
       log.file.rotation.count = 5
      # archived log files will be compressed
        log.file.rotation.compress = true
  4. Save Your Changes:
    • Once you’ve made the required modifications, save the file to ensure that your changes are applied.
  5. Restart the RabbitMQ Service:
    • To activate the new log rotation settings, restart the Xray service, which will restart the RabbitMQ services. 

Conclusion

By configuring log rotation for RabbitMQ through the rabbitmq.conf file, administrators can effectively manage log volume and prevent server outages caused by excessive log accumulation. This proactive approach enhances system reliability and ensures that JFrog Xray continues to operate smoothly in legacy installations.

References


RabbitMQ
JFrog