-
Notifications
You must be signed in to change notification settings - Fork 975
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
[aws-for-fluent-bit] Log Group retention time setting not working. #436
Comments
i'm also running into this issue as-well |
The plugin used to only set the log retention on new log groups. This means if you have run the same config before then the log group might already exist, and the plugin will not update the retention. We updated this recently and released it in AWS for Fluent Bit 2.10.0 for the |
I also have the same issue for both existing and new log groups. |
In my case it was missing action in AWS iam policy used by FB pods. "logs:putRetentionPolicy" solved problem |
I have the same problem in version |
The problem was indeed the missing nodeGroups:
- ...
iam:
withAddonPolicies:
cloudWatch: true In practice, nodes have this policy: {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cloudwatch:PutMetricData",
"ec2:DescribeVolumes",
"ec2:DescribeTags",
"logs:PutLogEvents",
"logs:DescribeLogStreams",
"logs:DescribeLogGroups",
"logs:CreateLogStream",
"logs:CreateLogGroup"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ssm:GetParameter"
],
"Resource": "arn:aws:ssm:*:*:parameter/AmazonCloudWatch-*"
}
]
} And that's the problem, these permissions are insufficient. |
@illagrenan, exactly. The AWS documentation needs to be updated. |
Have been seeing similar issue where "log_retention_days" was not being set on our "additionalOutputs" and stayed at "Never expire", Versions,
Extract from aws-for-fluentbit-values.yaml
After reading the previous posts I observed that if the missing permission "logs:PutRetentionPolicy" is manually added (as not there by default) and I rerun the pipeline the permission is removed again, this should be added to the permanent list. Error from the logs when trying to set log_retention_days,
Manually added the missing permission back, deleted the loggroups so they would be forced to recreate, restarted the daemonset for fluentbit which recreates the loggroups and the log retention is set correctly, |
Describe the bug
The option "cloudWatch.logRetentionDays" doesn't set the log retention days setting of the resulting CloudWatch log group.
Steps to reproduce
Expected outcome
The resulting log group should have a retention policy of 3 days. However it is set with a "Never expire" retention policy.
Environment
The text was updated successfully, but these errors were encountered: