Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logrotate config #6142

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Add logrotate config #6142

merged 1 commit into from
Sep 27, 2023

Commits on Sep 27, 2023

  1. Packaging: add logrotate config file

    In case users decide to store Mimir's logs out of journald (e.g. `/var/log/mimir.log`) we want to be sure that Mimir's logs won't fill up the disk.
    
    Tested on Debian 11, Centos 7 and AlmaLinux 8.
    
    ```
    [root@centos7 ~]# logrotate --debug --verbose /etc/logrotate.d/mimir
    reading config file /etc/logrotate.d/mimir
    Allocating hash table for state file, size 15360 B
    
    Handling 1 logs
    
    rotating pattern: /var/log/mimir/mimir.log  after 1 days (7 rotations)
    empty log files are not rotated, old logs are removed
    considering log /var/log/mimir/mimir.log
    ```
    
    ```
    [root@alma8 ~]# logrotate --debug --verbose /etc/logrotate.d/mimir
    WARNING: logrotate in debug mode does nothing except printing debug messages!  Consider using verbose mode (-v) instead if this is not what you want.
    
    reading config file /etc/logrotate.d/mimir
    Reading state from file: /var/lib/logrotate/logrotate.status
    Allocating hash table for state file, size 64 entries
    
    Handling 1 logs
    
    rotating pattern: /var/log/mimir/mimir.log  after 1 days (7 rotations)
    empty log files are not rotated, old logs are removed
    considering log /var/log/mimir/mimir.log
    Creating new state
    ```
    
    ```
    root@debian11:~# logrotate --debug --verbose /etc/logrotate.d/mimir
    WARNING: logrotate in debug mode does nothing except printing debug messages!  Consider using verbose mode (-v) instead if this is not what you want.
    
    reading config file /etc/logrotate.d/mimir
    Reading state from file: /var/lib/logrotate/status
    Allocating hash table for state file, size 64 entries
    Creating new state
    Creating new state
    Creating new state
    Creating new state
    Creating new state
    [...]
    
    Handling 1 logs
    
    rotating pattern: /var/log/mimir/mimir.log  after 1 days (7 rotations)
    empty log files are not rotated, old logs are removed
    considering log /var/log/mimir/mimir.log
    Creating new state
    ```
    
    Signed-off-by: Ludovic Terrier <5823358+ldvc@users.noreply.github.com>
    ldvc committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    6d5aa45 View commit details
    Browse the repository at this point in the history