adminsys:gestion-logs
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| adminsys:gestion-logs [2018/01/04 21:44] – [Services] cecile | adminsys:gestion-logs [2018/01/04 22:26] (Version actuelle) – cecile | ||
|---|---|---|---|
| Ligne 28: | Ligne 28: | ||
| Ensuite pour ne conserver que deux semaines de logs, cela se gère avec logrotate. Le fichier de conf est ''/ | Ensuite pour ne conserver que deux semaines de logs, cela se gère avec logrotate. Le fichier de conf est ''/ | ||
| Cf : voir la documentation syslog-ng sur la configuration de la rotation des logs : https:// | Cf : voir la documentation syslog-ng sur la configuration de la rotation des logs : https:// | ||
| + | |||
| + | Éléments importants du fichier de configuration actuelle : | ||
| + | < | ||
| + | # rotate log files weekly | ||
| + | weekly | ||
| + | |||
| + | # keep 4 weeks worth of backlogs | ||
| + | rotate 4 | ||
| + | |||
| + | # create new (empty) log files after rotating old ones | ||
| + | create | ||
| + | </ | ||
| + | |||
| + | **Proposition** : configurer pour conserver 2 semaines et recréer les fichiers à chaque fois pour tous les logs | ||
| + | < | ||
| + | # see "man logrotate" | ||
| + | # rotate log files weekly | ||
| + | weekly | ||
| + | |||
| + | # keep 2 weeks worth of backlogs | ||
| + | rotate 2 | ||
| + | |||
| + | # create new (empty) log files after rotating old ones | ||
| + | create | ||
| + | |||
| + | # uncomment this if you want your log files compressed | ||
| + | #compress | ||
| + | |||
| + | # packages drop log rotation information into this directory | ||
| + | include / | ||
| + | |||
| + | # no packages own wtmp, or btmp -- we'll rotate them here | ||
| + | / | ||
| + | missingok | ||
| + | monthly | ||
| + | create 0664 root utmp | ||
| + | rotate 1 | ||
| + | } | ||
| + | |||
| + | / | ||
| + | missingok | ||
| + | monthly | ||
| + | create 0660 root utmp | ||
| + | rotate 1 | ||
| + | } | ||
| + | |||
| + | # system-specific logs may be configured here | ||
| + | </ | ||
| + | |||
| + | **ou** : configurer uniquement la rotation toutes les deux semaines pour les logs dans daemon.log | ||
| + | |||
| + | < | ||
| + | # see "man logrotate" | ||
| + | # rotate log files weekly | ||
| + | weekly | ||
| + | |||
| + | # keep 4 weeks worth of backlogs | ||
| + | rotate 4 | ||
| + | |||
| + | # create new (empty) log files after rotating old ones | ||
| + | create | ||
| + | |||
| + | # uncomment this if you want your log files compressed | ||
| + | #compress | ||
| + | |||
| + | # packages drop log rotation information into this directory | ||
| + | include / | ||
| + | |||
| + | # no packages own wtmp, or btmp -- we'll rotate them here | ||
| + | / | ||
| + | missingok | ||
| + | monthly | ||
| + | create 0664 root utmp | ||
| + | rotate 1 | ||
| + | } | ||
| + | |||
| + | / | ||
| + | missingok | ||
| + | monthly | ||
| + | create 0660 root utmp | ||
| + | rotate 1 | ||
| + | } | ||
| + | |||
| + | # system-specific logs may be configured here | ||
| + | / | ||
| + | # | ||
| + | | ||
| + | | ||
| + | | ||
| + | # | ||
| + | / | ||
| + | | ||
| + | } | ||
| + | |||
| + | </ | ||
| =====Ressources (peut être utiles)===== | =====Ressources (peut être utiles)===== | ||
| https:// | https:// | ||
| - | |||
| - | https:// | ||
| https:// | https:// | ||
| http:// | http:// | ||
adminsys/gestion-logs.1515102244.txt.gz · Dernière modification : 2018/01/04 21:44 de cecile
