-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Make log rotation configurable #211
Make log rotation configurable #211
Conversation
| $logfile_rotation_interval = '0h' | ||
| $logfile_rotation_max_size = '0MB' | ||
| $logfile_rotation_max_archives = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding the data here, please directly assign it in the init.pp. That enables puppet-strings to pick it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure that is the best way, I did it this way to be 100% consistent with the existing code, e.g. logfile.
In fact all values in init.pp reference telegraf::params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it's the best way :) That's the standard we defined at https://voxpupuli.org/docs/reviewing_pr/ and we need to migrate the modules. We don't want more technical debt.
| telegraf::logfile_rotation_interval: "0h" | ||
| telegraf::logfile_rotation_max_size: "0MB" | ||
| telegraf::logfile_rotation_max_archives: 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding this should not be required
Pull Request (PR) description
Add log rotation parameters
This Pull Request (PR) fixes the following issues
Replaces pull request #149
Rebased the module using v5.0.0
Adding agent parameters:
logfile_rotation_interval, default = "0h"
logfile_rotation_max_size, default = "0MB"
logfile_rotation_max_archives, default = 5
I have added test data, setting these values to their default values.
Tested with bundle exec rake beaker - no errors
Tested in my environment on CentOS7, Ubuntu 18.04 & Windows 2019 - I just tested that the telegaf.conf file was updated appropriately