[TOC] ``` /etc/ ├─ logrotate.conf ├─ logrotate.d/ │ ├─ app │ ├─ bootlog │ ├─ chrony │ ├─ psacct │ ├─ syslog │ └─ yum └─ logrotate.elasticbeanstalk.hourly/ ├─ logrotate.elasticbeanstalk.applogs.conf ├─ logrotate.elasticbeanstalk.docker-compose.conf ├─ logrotate.elasticbeanstalk.docker.conf ├─ logrotate.elasticbeanstalk.docker-container.conf ├─ logrotate.elasticbeanstalk.dockerdaemon.conf ├─ logrotate.elasticbeanstalk.eb-docker.conf ├─ logrotate.elasticbeanstalk.eb-engine.conf ├─ logrotate.elasticbeanstalk.eb-hooks.conf ├─ logrotate.elasticbeanstalk.healthd.conf ├─ logrotate.elasticbeanstalk.nginx.conf ├─ logrotate.elasticbeanstalk.web-stderr.conf └─ logrotate.elasticbeanstalk.web-stdout.conf ``` # `/etc` ## `logrotate.conf` ``` # see "man logrotate" for details # rotate log files weekly weekly # keep 4 weeks worth of backlogs rotate 4 # create new (empty) log files after rotating old ones create # use date as a suffix of the rotated file dateext # uncomment this if you want your log files compressed #compress # RPM packages drop log rotation information into this directory include /etc/logrotate.d # no packages own wtmp and btmp -- we'll rotate them here /var/log/wtmp { monthly create 0664 root utmp minsize 1M rotate 1 } /var/log/btmp { missingok monthly create 0600 root utmp rotate 1 } # system-specific logs may be also be configured here. ``` # `/etc/logrotate.d/` ## `app` ``` /var/log/eb-engine.log /var/log/nginx/*.log /var/log/web.stdout.log { daily dateext dateyesterday missingok sharedscripts postrotate /bin/kill -HUP 1214 2> /dev/null || true endscript } ``` ## `bootlog` ``` /var/log/boot.log { missingok daily copytruncate rotate 7 } ``` ## `chrony` ``` /var/log/chrony/*.log { daily rotate 7 missingok notifempty nocreate sharedscripts postrotate /usr/bin/chronyc cyclelogs > /dev/null 2>&1 || true endscript compress dateext } ``` ## `psacct` ``` # Logrotate file for psacct RPM /var/account/pacct { compress delaycompress notifempty daily rotate 31 create 0600 root root postrotate if /usr/bin/systemctl --quiet is-active psacct.service ; then /usr/sbin/accton /var/account/pacct | /usr/bin/grep -v "Turning on process accounting, file set to '/var/account/pacct'." | /usr/bin/cat fi endscript } ``` ## `syslog` ``` /var/log/cron /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler { compress daily dateext dateyesterday missingok sharedscripts postrotate /bin/kill -HUP 1214 2> /dev/null || true endscript } ``` ## `yum` ``` /var/log/yum.log { missingok notifempty size 30k yearly create 0600 root root } ``` # `/etc/logrotate.elasticbeanstalk.hourly/` ## `logrotate.elasticbeanstalk.applogs.conf` ``` /var/log/eb-docker/containers/eb-current-app/* { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/eb-docker/containers/eb-current-app/rotated } ``` ## `logrotate.elasticbeanstalk.docker-compose.conf` ``` /var/log/docker-compose-events.log { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/rotated } ``` ## `logrotate.elasticbeanstalk.docker.conf` ``` /var/log/docker-events.log { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/rotated } ``` ## `logrotate.elasticbeanstalk.docker-container.conf` ``` /var/lib/docker/containers/*/*.log { size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s sharedscripts delaycompress olddir /var/lib/docker/containers/rotated } ``` ## `logrotate.elasticbeanstalk.dockerdaemon.conf` ``` /var/log/docker { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/rotated } ``` ## `logrotate.elasticbeanstalk.eb-docker.conf` ``` /var/log/eb-docker-process.log { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/rotated } ``` ## `logrotate.elasticbeanstalk.eb-engine.conf` ``` /var/log/eb-engine.log { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/rotated } ``` ## `logrotate.elasticbeanstalk.eb-hooks.conf` ``` /var/log/eb-hooks.log { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/rotated } ``` ## `logrotate.elasticbeanstalk.healthd.conf` ``` /var/log/healthd/daemon.log* { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/healthd/rotated } ``` ## `logrotate.elasticbeanstalk.nginx.conf` ``` /var/log/nginx/* { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/nginx/rotated } ``` ## `logrotate.elasticbeanstalk.web-stderr.conf` ``` /var/log/*.stderr.log { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/rotated } ``` ## `logrotate.elasticbeanstalk.web-stdout.conf` ``` /var/log/*.stdout.log { su root root size 10M rotate 5 missingok compress notifempty copytruncate dateext dateformat %s olddir /var/log/rotated } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up