-
Notifications
You must be signed in to change notification settings - Fork 111
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
Adding configuration for redirecting journalctl logs to a file #7508
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
👷 Deploy Preview for chef-automate processing.
|
* cns Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Logrotate setup Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Changes Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * PAtch changes Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * PAtch changes Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Added string conf Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Ran system command Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Added changes Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Final changes Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> * Removing unwanted loggers Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * Adding correct combination for logrotate Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> * logrotate Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> Signed-off-by: Pappu Kumar <pappu.kumar@progress.com> Signed-off-by: Yashvi Jain <yashvi.jain@progress.com> Co-authored-by: Pappu Kumar <pappu.kumar@progress.com> Co-authored-by: Yashvi Jain <yashvi.jain@progress.com>
@YashviJain01 @daveaugustus Please record a demo video and attach it to this PR. |
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
SyslogFinal.mov |
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
kalroy
approved these changes
Nov 7, 2022
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Dmaddu
requested changes
Nov 7, 2022
Dmaddu
reviewed
Nov 7, 2022
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Kudos, SonarCloud Quality Gate passed! |
Dmaddu
approved these changes
Nov 7, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔩 Description: What code changed, and why?
After adding the below configuration the logs will be redirecting to /var/log/automate.log
[global.v1.log]
redirect_sys_log = true
redirect_log_file_path = "/var/tmp/"
compress_rotated_logs = true
max_size_rotate_logs = "10M"
max_number_rotated_logs = 2
⛓️ Related Resources
https://chefio.atlassian.net/browse/STALWART-231
https://chefio.atlassian.net/browse/STALWART-232
https://chefio.atlassian.net/browse/STALWART-227
👍 Definition of Done
Whenever users patches this command a file named automate.log will be formed in /var/log/ folder. Which will have logrotate policies enabled.
if redirect_sys_log is set to be true, it will give an error if redirect_log_file_path is not having any value. That is its a required parameter
The default value is as follows for others:
compress_rotated_logs =false
max_size_rotate_logs = "100M"
max_number_rotated_logs = 10
👟 How to Build and Test the Change
rebuild components/automate-deployment/
rebuild components/automate-cli/
Patch the below file :
[global.v1.log]
redirect_sys_log = true
compress_rotated_logs = true
max_size_rotate_logs = "10M"
max_number_rotated_logs = 2
✅ Checklist
All PRs must tick these:
With occasional exceptions, all PRs from Progress employees must tick these:
make spell
in any component directory)All PRs from Progress employees should tick these if appropriate:
Please add a note next to any checkbox above if you are NOT ticking it.
📷 Screenshots, if applicable