For the complete documentation index, see llms.txt. This page is also available as Markdown.

Log Rotation Setup

On-prem Deployment Guide (AWS)

Purpose

Docker containers generate logs continuously. Without rotation, logs consume disk space. This setup ensures automatic daily rotation and 7-day retention.

Prerequisites

  • SSH access to the VM

  • Sudo privileges

  • Hivel installation directory: /opt/hivel-onprem

Execution Steps

Step 1: Install Log Rotation

On the VM, run:

cd /opt/hivel-onprem
# Run setup script (requires sudo)
sudo ./scripts/setup-log-rotation.sh

This script:

  • Creates log directory structure (/var/log/hivel/)

  • Adds a daily cron job (runs at midnight)

  • Configures rotation for all Docker containers

Step 2: Verify Installation

Check that the cron job is installed, log directories were created and test rotation.

Expected result: Cron job appears in sudo crontab -l output; service directories exist in /var/log/hivel/

If installation fails: See Troubleshooting documentation.

Log File Locations

Logs are stored in:

Examples:

  • /var/log/hivel/auth-svc/auth-svc-2025-01-15.log

  • /var/log/hivel/insightly-svc/insightly-svc-2025-01-15.log

Viewing Logs

Log Retention Policy

  • Retention Period: 7 days

  • Cleanup: Logs older than 7 days are automatically deleted

  • Rotation: New log file created daily at midnight

Last updated