OCSInventory-NG / UnixAgent

This is the OCS unified agent for Unix operating systems
http://www.ocsinventory-ng.org/en/
GNU General Public License v2.0
89 stars 84 forks source link

[Feature Request] Support log file rotation #471

Closed iamazeem closed 3 months ago

iamazeem commented 4 months ago

General information

Operating system: Ubuntu 20.04 Perl version: 5.30.0

OCS Inventory information

Unix agent version: 2.9.0

Problem's description

For the long running agent, the log file (configured with --logfile CLI flag) keeps on increasing up to GiBs. Currently, there's no flag or configuration option to rotate the log file up to a size threshold. Having something like that would greatly help and avoid the need to resort to manual external solutions.

fbomj commented 3 months ago

Hi,

This is always exsiting in github version and package version. For github version see contrib/cron directory. In package ocsinventory-agent.logrotate file is written in /etc/logrotate.d directory.

Regards

iamazeem commented 3 months ago

Hi @fbomj,

Thank you for pointing that out! Could you please confirm whether a similar feature is available for Windows and MacOS too?

Regards!