Configure log rotation policies
Configures log rotation policies for files with size, frequency, and retention options.
/plugin marketplace add dsyorkd/system-admin/plugin install dsyorkd-system-admin@dsyorkd/system-adminConfigure log rotation using the log_rotation.py tool.
This command orchestrates the system-admin skill's log rotation tool.
Architecture:
Parse user request or $ARGUMENTS:
Invoke the log_rotation.py tool:
python3 ./skills/system-admin/scripts/log_rotation.py <action> [OPTIONS]
Read the output and report rotation configuration
List rotation policies:
User: /log-rotation list
Run: python3 ./skills/system-admin/scripts/log_rotation.py list
Show all log rotation configurations
Add rotation for log file:
User: /log-rotation add /var/log/myapp.log --rotate 7 --size 100M --compress
Run: python3 ./skills/system-admin/scripts/log_rotation.py add /var/log/myapp.log --rotate 7 --size 100M --compress
Report configuration added
Force rotation:
User: /log-rotation force /var/log/myapp.log
Run: python3 ./skills/system-admin/scripts/log_rotation.py force /var/log/myapp.log
Force immediate rotation
Check rotation status:
User: /log-rotation status
Run: python3 ./skills/system-admin/scripts/log_rotation.py status
Show last rotation times and status
list - List rotation policiesadd - Add rotation policyremove - Remove rotation policystatus - Show rotation statusforce - Force immediate rotationtest - Test configuration--rotate <N> - Keep N rotated files--size <size> - Rotate when size exceeds--daily|weekly|monthly - Rotation frequency--compress - Compress rotated files--postrotate <cmd> - Command to run after rotation--compress to save disk space