fluent / fluent/fluent-bit

out_cloudwatch_logs: add support for record accessor

Open
#3,246 21 comments 22 reactions 1 assignee Claimed by @PettitWesley View on GitHub
AWS enhancement
Dominant language
C
Stars
8.1k
Forks
2k
Avg merge
4d 20h
Merged PRs (30d)
71

Description

**Is your feature request related to a problem? Please describe.**

I would like to dynamically add the Kubernetes namespace in the Cloudwatch Logs group name. This is useful to:
- restrict user log access to certain namespaces.
- log ingestion monitoring (Cloudwatch Logs metrics are per log group name).

**Describe the solution you'd like**
I believe the solution would be to implement [record accessor](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/record-accessor) in the `out_cloudwatch_logs` plugin. That way the user could freely name its log groups and log streams based on record information.

Example:
```
[OUTPUT]
Name cloudwatch_logs
Match *
region us-east-1
log_group_name /aws/containerinsights/${CLUSTER_NAME}/namespace/$kubernetes['namespace_name']
```

**Describe alternatives you've considered**
Is there any?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.