Commit 3b6b580654615da3ed656a9ca32d87f77b061543
1 parent
4ff23212
Exists in
master
and in
9 other branches
Add documentation for Runit logging
Showing
2 changed files
with
41 additions
and
0 deletions
Show diff stats
CHANGELOG
@@ -17,6 +17,7 @@ omnibus-gitlab repository. | @@ -17,6 +17,7 @@ omnibus-gitlab repository. | ||
17 | - Include Python and docutils for reStructuredText support | 17 | - Include Python and docutils for reStructuredText support |
18 | - Update Ruby to version 2.1.1 | 18 | - Update Ruby to version 2.1.1 |
19 | - Update Git to version 2.0.0 | 19 | - Update Git to version 2.0.0 |
20 | +- Make Runit log rotation configurable | ||
20 | 21 | ||
21 | 6.9.2 | 22 | 6.9.2 |
22 | - Create the authorized-keys.lock file for gitlab-shell 1.9.4 | 23 | - Create the authorized-keys.lock file for gitlab-shell 1.9.4 |
README.md
@@ -455,6 +455,45 @@ Omnibus-gitlab uses four different directories. | @@ -455,6 +455,45 @@ Omnibus-gitlab uses four different directories. | ||
455 | - `/var/log/gitlab` contains all log data generated by components of | 455 | - `/var/log/gitlab` contains all log data generated by components of |
456 | omnibus-gitlab. | 456 | omnibus-gitlab. |
457 | 457 | ||
458 | +## Logs | ||
459 | + | ||
460 | +### Tail logs in a console on the server | ||
461 | + | ||
462 | +If you want to 'tail', i.e. view live log updates of GitLab logs you can use | ||
463 | +`gitlab-ctl tail`. | ||
464 | + | ||
465 | +```shell | ||
466 | +# Tail all logs; press Ctrl-C to exit | ||
467 | +sudo gitlab-ctl tail | ||
468 | + | ||
469 | +# Drill down to a sub-directory of /var/log/gitlab | ||
470 | +sudo gitlab-ctl tail gitlab-rails | ||
471 | + | ||
472 | +# Drill down to an individual file | ||
473 | +sudo gitlab-ctl tail nginx/gitlab_error.log | ||
474 | +``` | ||
475 | + | ||
476 | +### Runit logs | ||
477 | + | ||
478 | +The Runit-managed services in omnibus-gitlab generate log data using | ||
479 | +[svlogd][svlogd]. See the [svlogd documentation][svlogd] for more information | ||
480 | +about the files it generates. | ||
481 | + | ||
482 | +You can modify svlogd settings via `/etc/gitlab/gitlab.rb` with the following settings: | ||
483 | + | ||
484 | +```ruby | ||
485 | +# Below are the default values | ||
486 | +logging['svlogd_size'] = 200 * 1024 * 1024 # rotate after 200 MB of log data | ||
487 | +logging['svlogd_num'] = 30 # keep 30 rotated log files | ||
488 | +logging['svlogd_timeout'] = 24 * 60 * 60 # rotate after 24 hours | ||
489 | +logging['svlogd_filter'] = "gzip" # compress logs with gzip | ||
490 | +logging['svlogd_udp'] = nil # transmit log messages via UDP | ||
491 | +logging['svlogd_prefix'] = nil # custom prefix for log messages | ||
492 | + | ||
493 | +# Optionally, you can override the prefix for e.g. Nginx | ||
494 | +nginx['svlogd_prefix'] = "nginx" | ||
495 | +``` | ||
496 | + | ||
458 | ## Starting a Rails console session | 497 | ## Starting a Rails console session |
459 | 498 | ||
460 | If you need access to a Rails production console for your GitLab installation | 499 | If you need access to a Rails production console for your GitLab installation |
@@ -543,3 +582,4 @@ This omnibus installer project is based on the awesome work done by Chef in | @@ -543,3 +582,4 @@ This omnibus installer project is based on the awesome work done by Chef in | ||
543 | [database.yml.postgresql]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/database.yml.postgresql | 582 | [database.yml.postgresql]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/database.yml.postgresql |
544 | [database.yml.mysql]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/database.yml.mysql | 583 | [database.yml.mysql]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/database.yml.mysql |
545 | [gitlab.yml.example]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example | 584 | [gitlab.yml.example]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example |
585 | +[svlogd]: http://smarden.org/runit/svlogd.8.html |