You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 line
3.7 KiB

  1. # Configuration file for Log2Ram (https://github.com/azlux/log2ram) under MIT license.
  2. # This configuration file is read by the log2ram service
  3. # Size for the ram folder, it defines how much space is reserved in the RAM for the logs.
  4. # Ensure 'SIZE=' is larger than your /var/log directory.
  5. # - (If not enough is reserved, log2ram will fail to start).
  6. # Ensure logrotate is set to keep your /var/log directory from growing too large.
  7. # - (If your /var/log directory grows larger than 'SIZE=', new logs entries can't be written).
  8. # The default of 128M is adequate for a lot of applications.
  9. # You will need to increase it if you have a server and a lot of log for example.
  10. SIZE=128M
  11. # Select the log syncing method between disk and RAM:
  12. # - 'rsync' is the default unless 'USE_RSYNC' is set to 'false'.
  13. # - If 'rsync' is unavailable, 'cp' is automatically used as a fallback.
  14. # - Set 'USE_RSYNC' to 'false' to explicitly use 'cp'.
  15. #USE_RSYNC=false
  16. # By default, if there is insufficient RAM space, a system notification email is sent.
  17. # Set this to 'false' to disable email notifications. (The error will still be logged locally).
  18. #NOTIFICATION=true
  19. # Specify the command for sending error notifications.
  20. # By default, it uses the `mail` command to send an email, with the message body provided via stdin.
  21. # You can replace this with any command (such as 'shoutrrr') or a custom script for handling notifications.
  22. #NOTIFICATION_COMMAND=mail -s "Log2Ram Error on $HOSTNAME"
  23. # Specify the directories to be stored in RAM. List each directory using its absolute path, e.g., `/path/folder`.
  24. # Corresponding directories on the HDD, named `/path/hdd.folder`, will be automatically created for each listed path.
  25. # Separate multiple paths with a semicolon `;` and do not include a trailing slash at the end of the paths.
  26. # Example: PATH_DISK="/var/log;/home/test/FolderInRam"
  27. PATH_DISK="/var/log"
  28. # Should log2ram consider journald and do a log rotate before copying the log files back? Please note that for this
  29. # rsync is mandatory. Also make sure that you have configured SystemMaxUse in journald.conf, because the size of this
  30. # ram folder is will probably not be as large as journald will use by default
  31. JOURNALD_AWARE=true
  32. # Set to 'true' to enable log rotation for journald logs before syncing.
  33. # Note: 'rsync' must be used for this feature.
  34. # Ensure 'SystemMaxUse' is configured in 'journald.conf'
  35. # - (To limit journald’s disk usage to be smaller than the log2ram RAM allocation).
  36. JOURNALD_AWARE=true
  37. # **************** Zram backing conf ****************
  38. # Set ZL2R=true to enable zram, providing compressed RAM storage for log2ram.
  39. # Set ZL2R=false to use tmpfs, which provides uncompressed memory-only storage.
  40. ZL2R=false
  41. # Choose a compression algorithm from those listed in /proc/crypto.
  42. # 'lz4' is the fastest, offering the lightest CPU load but lower compression ratios.
  43. # 'deflate' (zlib) and 'Zstandard' (zstd) provide higher compression ratios but use more CPU.
  44. # 'lzo' is similar to 'lz4' but may perform better with certain binaries due to optimizations.
  45. # Set COMP_ALG to 'lz4' for speed, 'zstd' for better compression, or 'lzo' or 'zlib' if optimizations or availability are concerns.
  46. COMP_ALG=lz4
  47. # LOG_DISK_SIZE specifies the uncompressed zram disk size.
  48. # (Sets the size of the zram disk that will be presented to the operating system).
  49. # To estimate amount of RAM this will consume, divide LOG_DISK_SIZE by your chosen compression algorithm's ratio:
  50. # - lzo/lz4 typically compresses at a ratio of 2.1:1
  51. # - zlib compresses at about 2.7:1
  52. # - zstandard (zstd) achieves around 2.9:1
  53. # Example calculation using lz4:
  54. # Given LOG_DISK_SIZE = 256M (which represents 256 Megabytes of uncompressed log data),
  55. # the estimated zram RAM usage = 256 MB / 2.1 ≈ 122 MB of RAM.
  56. LOG_DISK_SIZE=256M