User Tools

Site Tools


informatique:linux:logrotate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

informatique:linux:logrotate [2020/10/20 15:36] – created didzkovitchzinformatique:linux:logrotate [2020/10/20 15:41] (current) didzkovitchz
Line 1: Line 1:
 ====== Logrotate ====== ====== Logrotate ======
- 
-[[https://les-enovateurs.com/logrotate-ajout-test-configuration-rotation-logs/]] 
- 
-[[https://doc.ubuntu-fr.org/logrotate]] 
- 
-[[https://linux.die.net/man/8/logrotate]] 
  
 Exemple de fichier minimaliste :  Exemple de fichier minimaliste : 
Line 17: Line 11:
 } }
 </code> </code>
 +
 +Ou encore :
 +<code>
 +/opt/netdata/var/log/netdata/*.log {
 +        daily
 +        missingok
 +        rotate 14
 +        compress
 +        delaycompress
 +        notifempty
 +        sharedscripts
 +        postrotate
 +                /bin/kill -HUP `cat /opt/netdata/var/run/netdata/netdata.pid 2>/dev/null` 2>/dev/null || true
 +        endscript
 +}
 +</code>
 +
 +Debug :
 +<code>
 +[root@srv logrotate.d]# cat /var/lib/logrotate/logrotate.status
 +logrotate state -- version 2
 +"/var/log/yum.log" 2020-6-17-13:0:0
 +"/opt/netdata/var/log/netdata/access.log" 2020-10-20-15:26:52
 +"/var/log/nrpe//nrpe.log" 2020-7-2-3:0:0
 +"/var/log/boot.log" 2020-9-21-11:44:1
 +"/var/log/up2date" 2020-6-17-13:0:0
 +"/opt/netdata/var/log/netdata/debug.log" 2020-6-18-3:0:0
 +"/var/log/puppetlabs/mcollective/mcollective.log" 2020-6-18-3:0:0
 +"/var/log/wtmp" 2020-6-17-13:0:0
 +"/var/log/chrony/*.log" 2020-6-17-13:0:0
 +"/var/log/spooler" 2020-10-18-3:44:1
 +"/var/log/btmp" 2020-10-1-3:43:1
 +"/var/log/rhsm/rhsmcertd.log" 2020-10-18-3:44:1
 +"/var/log/maillog" 2020-10-18-3:44:1
 +"/var/log/aide/*.log" 2020-6-17-13:0:0
 +"/var/log/wpa_supplicant.log" 2020-6-17-13:0:0
 +"/var/log/secure" 2020-10-18-3:44:1
 +"/opt/netdata/var/log/netdata/error.log" 2020-10-20-15:26:52
 +"/var/log/puppetlabs/pxp-agent/*.log" 2020-6-18-3:0:0
 +"/var/log/rhsm/rhsm.log" 2020-10-18-3:44:1
 +"/var/log/messages" 2020-10-18-3:44:1
 +"/var/log/cron" 2020-10-18-3:44:1
 +"/var/account/pacct" 2020-6-17-13:0:0
 +[root@srv logrotate.d]#
 +</code>
 +
 +[[https://les-enovateurs.com/logrotate-ajout-test-configuration-rotation-logs/]]
 +
 +[[https://doc.ubuntu-fr.org/logrotate]]
 +
 +[[https://linux.die.net/man/8/logrotate]]
  
 {{tag>GNU_Linux Logs Logrotate}} {{tag>GNU_Linux Logs Logrotate}}
informatique/linux/logrotate.1603200989.txt.gz · Last modified: 2020/10/20 15:36 by didzkovitchz