-
Notifications
You must be signed in to change notification settings - Fork 49
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
common question: There are two different templating features, one here and one in cloudwatch_logs plugin #289
Comments
@nikhilo - hopefully you found your way through. Like you, I was looking to implement additional log streams by using templates. I found out that the Long story short, I got it to work with an OUTPUT like so:
With Also found out that the variables I could use are (in the case of an ECS task running on EC2):
Hope this helps. |
@nikhilo there are two templating features in two different plugins.
Each feature is different. @ojacques Your example works because you are using the built-in metadata keys provided by FireLens: An alternative to templating: using init image with env vars in the configWe have this new image build with an init script: https://github.com/aws/aws-for-fluent-bit/blob/mainline/use_cases/init-process-for-fluent-bit/README.md#how-init-process-works It can set env vars with ECS Metadata. You can reference env vars in the config. This is an alternative to templating that is more efficient since templating has a CPU overhead. For example:
|
@PettitWesley The init image worked as expected. Thank you! 🎉 |
Keeping this open as guidance/common question. |
Possible I have the same issue (and I am also confused on where to report it). I did create an issue at aws/eks-charts#927 but possible here is the better place. Small summary:
does not work (accessor error in the log) but the following does work:
If anyone can point me in the right direction that would be great. |
I'm not sure what's going wrong @Mattie112, see my answer here: aws/eks-charts#927 (comment) |
This is regarding the cloudwatch_logs plugin.
We have been facing an issue where several ECS tasks are writing to the same log stream, and might be getting throttled by CloudWatch. I tried to set the
log_stream_template
to$(ecs_task_id)
and$(uuid)
. But none of them seemed to work. I got following errors,log_stream_template
config ?The text was updated successfully, but these errors were encountered: