Skip to content

Commit 46565ae

Browse files
authored
Merge pull request #204 from novmar/logrotate_hourly
Changed logrotate scripty to hourly
2 parents 55f0275 + 8640443 commit 46565ae

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ RUN true \
3232
&& mkdir -p \
3333
/var/log/carbon \
3434
/var/log/graphite \
35+
&& mv /etc/periodic/daily/logrotate /etc/periodic/hourly/logrotate \
3536
&& touch /var/log/messages
3637

3738
# optional packages (e.g. not exist on S390 in alpine 3.13 yet)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Use `RELAY=1` environment variable to enable carbon relay instance. Use `[relay]
202202
carbon-relay LINE_RECEIVER_PORT in [`statsd`](https://github.com/statsd/statsd/blob/master/exampleConfig.js) config.
203203

204204
## Logrotate
205-
By default logs are rotated daily, using built-in `/etc/periodic/daily/logrotate` script. Please note, that according to Docker [logging best practices](https://success.docker.com/article/logging-best-practices) "Ideally, applications log to stdout/stderr, and Docker sends those logs to the configured logging destination.". You can use `-` as log file name for such behaviour.
205+
By default logs are rotated daily, based on configuration in `/etc/logrotate.d/graphite-statsd`. You can variate rotation by adding `size 10M` or changing time up to `hourly` (instead of `daily`), because of logrotate is is evaluated hourly by `/etc/periodic/hourly/logrotate`. Please note, that according to Docker [logging best practices](https://success.docker.com/article/logging-best-practices) "Ideally, applications log to stdout/stderr, and Docker sends those logs to the configured logging destination.". You can use `-` as log file name for such behaviour.
206206

207207
## Runit
208208
Each service started and controlled by runit will be gracefully shutdown when stopping the container : wait up to 7 seconds for the service to become down, then it will be killed. The runit environment variable `$SVWAIT` overrides this default timeout. Additionnally, a global timeout can be also specified with the docker-run option `--stop-timeout`.

0 commit comments

Comments
 (0)