Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Add log rotation techniques as configurable variable #22

Open
jsosulska opened this issue Oct 1, 2020 · 1 comment · May be fixed by #31
Open

Add log rotation techniques as configurable variable #22

jsosulska opened this issue Oct 1, 2020 · 1 comment · May be fixed by #31
Labels
enhancement New feature or request

Comments

@jsosulska
Copy link

FEATURE REQUEST

I would like to have log_path configurable as a variable, and have access to some of the logging features consul provides. The three use cases I can think of are:

  1. Users don't want to manually configure logging . So, lets just turn it on by default. If they want to change it, they can. Reading the startup script will make it clear.
  2. If this module is used in conjunction with splunk, the endpoint variables for location can be easily interpolated.
  3. Changing default configuration for log location to make troubleshooting easier.

Considerations

  1. I'd like a sane default like /opt/consul/logs/ as a path, that is only able to be written to by the Consul user, with read for consul group. No open read for others.
  2. Optionally, toggle enable_syslog
  3. I'd like to leverage sane log rotation techniques. Namely

Time-based rotation - If a cluster is left running, someone won't accidentally burn all their drive storage on logs

  • log_rotate_duration - Set this to the default of 24hrs, but make configurable.
  • log_rotate_max_files - Set this to 32, but make configurable.

Size based rotation - If a cluster is frequently used, it will never use more than half the default size of its disk space of the machine on Consul logs

  • log_rotate_bytes - set to 250MB
  • log_rotate_max_files - set to 100
@jsosulska jsosulska added the enhancement New feature or request label Oct 1, 2020
@jsosulska
Copy link
Author

For log permissions, see: hashicorp/consul#5441 Consul doesn't have a native way to set this.

@jsosulska jsosulska linked a pull request Nov 4, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant