Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive logs to separate folder #9906

Open
nikhilagrawaldotnet opened this issue Mar 19, 2021 · 3 comments
Open

Archive logs to separate folder #9906

nikhilagrawaldotnet opened this issue Mar 19, 2021 · 3 comments
Labels
theme/config Relating to Consul Agent configuration, including reloading type/enhancement Proposed improvement or new feature

Comments

@nikhilagrawaldotnet
Copy link

nikhilagrawaldotnet commented Mar 19, 2021

Feature Description

Consul logs files are archived in same location as they are created , thus making the folder crowded. For someone wanting to keep only latest file and move rest to an archive folder does not have any option.

For backward compatibility, this location would be an optional feature and if not provided, consul will work as before.

Such option is provided by other logging frameworks like NLog, Log4Net etc.

Use Case(s)

This feature will be beneficial for logs monitoring software to focus only 1 file (as rest will be in another folder). Currently its not possible as log file do not have fixed names (unix time is appended to log file name) that's why such softwares need to be provided filters like *.log or Consul*.log.

I'll be happy to raise a PR if this feature looks useful.

@jsosulska jsosulska added theme/config Relating to Consul Agent configuration, including reloading type/enhancement Proposed improvement or new feature labels Mar 23, 2021
@jsosulska
Copy link
Contributor

Hi @nikhilagrawaldotnet

Thanks for your feature request! We'd love a PR specifically for making the time stamp optional. Please include some tests as well to validate that existing log names are not broken by default, and that the new log format maintains configuring the log name and file type.

For Linux, logrotate , as well as tools like Logstash and Splunk, already exist for more advanced log management. This particular request would allow Consul to play more nicely with the new log tooling out there 😄

Please feel free to @ tag me when the PR is submitted!

@jsosulska jsosulska added the waiting-reply Waiting on response from Original Poster or another individual in the thread label Mar 25, 2021
@jkirschner-hashicorp jkirschner-hashicorp removed the waiting-reply Waiting on response from Original Poster or another individual in the thread label Sep 2, 2021
@jkirschner-hashicorp
Copy link
Contributor

Hi @nikhilagrawaldotnet,

I'm thinking about a related request (#10976) and want to make sure that I understand your use case (and the ways in which it may differ from #10976).

If you're interested in discussing some options and how they do (or don't) support your use cases, send me a brief message at the email address in my Github profile. We could schedule a time to talk in a few weeks.

@nikhilagrawaldotnet
Copy link
Author

Hi @jkirschner-hashicorp,

My issue had 2 concerns -

  1. Remove DateTime from the active log file. (Covered by Remove timestamp from active log file #10976)
  2. Archive/Move inactive log file to another location. (Differ/Extra from what's covered in Remove timestamp from active log file #10976)

Would appreciate it if the second requirement is also implemented as well. In that case, log monitoring software (e.g. Geneos, Filebeat etc.) can only focus on Consul.log and inactive log files can be in another folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/config Relating to Consul Agent configuration, including reloading type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

3 participants