Skip to content

Commit

Permalink
Adding logrotate, and its documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
deniszh committed Jan 16, 2019
1 parent 5fbc233 commit fe84a3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN true \
collectd-nginx \
findutils \
librrd \
logrotate \
memcached \
nginx \
nodejs \
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Additional environment variables can be set to adjust performance.
* GRAPHITE_WSGI_MAX_REQUESTS: (1000) limit on the number of requests a daemon process should process before it is shutdown and restarted.
* GRAPHITE_WSGI_REQUEST_LINE: (0) The maximum size of HTTP request line in bytes.

### Graphite-web
### Graphite-web
* GRAPHITE_ALLOWED_HOSTS: (*) In Django 1.5+ set this to the list of hosts your graphite instances is accessible as. See: [https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-ALLOWED_HOSTS](https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-ALLOWED_HOSTS)
* GRAPHITE_TIME_ZONE: (Etc/UTC) Set your local timezone
* GRAPHITE_LOG_ROTATION: (true) rotate logs
Expand Down Expand Up @@ -150,7 +150,7 @@ Additional environment variables can be set to adjust performance.
Graphite stores tag information in a separate tag database (TagDB). Please check [tags documentation](https://graphite.readthedocs.io/en/latest/tags.html) for details.

* GRAPHITE_TAGDB: ('graphite.tags.localdatabase.LocalDatabaseTagDB') TagDB is a pluggable store, by default it uses the local SQLite database.
* REDIS_TAGDB: (false) if set to true will use local Redis instance to store tags.
* REDIS_TAGDB: (false) if set to true will use local Redis instance to store tags.
* GRAPHITE_TAGDB_CACHE_DURATION: (60) Time to cache seriesByTag results.
* GRAPHITE_TAGDB_AUTOCOMPLETE_LIMIT: (100) Autocomplete default result limit.
* GRAPHITE_TAGDB_REDIS_HOST: ('localhost') Redis TagDB host
Expand All @@ -167,6 +167,9 @@ Use `COLLECTD=1` environment variable to enable local collectd instance
## Carbon-relay
Use `RELAY=1` environment variable to enable carbon relay instance. Use `[relay]` section of carbon.conf to configure it.

## Logrotate
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.

## Change the Configuration

Read up on Graphite's [post-install tasks](https://graphite.readthedocs.org/en/latest/install.html#post-install-tasks).
Expand Down

0 comments on commit fe84a3d

Please sign in to comment.