Skip to content

feat(parse_aws_vpc_flow_log): Add support for v6-v8 fields #45746

Merged
andrewkroh merged 2 commits intoelastic:mainfrom
andrewkroh:filebeat/feat/vpc-flow-log-v8
Aug 8, 2025
Merged

feat(parse_aws_vpc_flow_log): Add support for v6-v8 fields #45746
andrewkroh merged 2 commits intoelastic:mainfrom
andrewkroh:filebeat/feat/vpc-flow-log-v8

Conversation

@andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Aug 5, 2025

Proposed commit message

The parse_aws_vpc_flow_log processor has been updated to parse new
fields introduced in AWS VPC Flow Logs versions 6, 7, and 8.

Version 6 adds Transit Gateway fields which don't map well to ECS.
Version 7 adds fields related to Amazon ECS tasks, which are now mapped
to ECS orchestrator.*, container.*, and service.name fields.
Version 8 adds the reject_reason field, which is mapped to
event.reason.

This change also includes updated documentation and adds new test cases
to validate the processing of v6 and v7 flow logs.

References

https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-vpc-flow-logs-for-elastic-container-services/
https://docs.aws.amazon.com/vpc/latest/userguide/flow-log-records.html#flow-logs-fields
https://docs.aws.amazon.com/vpc/latest/tgw/tgw-flow-logs.html#flow-log-records

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@andrewkroh andrewkroh added enhancement Filebeat Filebeat backport-skip Skip notification from the automated backport with mergify labels Aug 5, 2025
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2025

@andrewkroh andrewkroh force-pushed the filebeat/feat/vpc-flow-log-v8 branch 4 times, most recently from b33b02a to 8686ba1 Compare August 5, 2025 20:08
@andrewkroh andrewkroh changed the title feat(parse_aws_vpc_flow_log): Add support for v7 and v8 VPC flow logs Aug 5, 2025
@andrewkroh andrewkroh force-pushed the filebeat/feat/vpc-flow-log-v8 branch from 8686ba1 to 4260ef8 Compare August 5, 2025 20:14
The parse_aws_vpc_flow_log processor has been updated to parse new
fields introduced in AWS VPC Flow Logs versions 6, 7, and 8.

Version 6 adds Transit Gateway fields which don't map well to ECS.
Version 7 adds fields related to Amazon ECS tasks, which are now mapped
to ECS `orchestrator.*`, `container.*`, and `service.name` fields.
Version 8 adds the `reject_reason` field, which is mapped to
`event.reason`.

This change also includes updated documentation and adds new test cases
to validate the processing of v6 and v7 flow logs.

References

https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-vpc-flow-logs-for-elastic-container-services/
https://docs.aws.amazon.com/vpc/latest/userguide/flow-log-records.html#flow-logs-fields
https://docs.aws.amazon.com/vpc/latest/tgw/tgw-flow-logs.html#flow-log-records
@andrewkroh andrewkroh force-pushed the filebeat/feat/vpc-flow-log-v8 branch from 4260ef8 to 79b990c Compare August 5, 2025 20:15
@andrewkroh andrewkroh marked this pull request as ready for review August 6, 2025 04:05
@andrewkroh andrewkroh requested review from a team as code owners August 6, 2025 04:05
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Aug 6, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 6, 2025
@andrewkroh andrewkroh added the docs label Aug 6, 2025
Copy link
Contributor

@theletterf theletterf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewkroh To which versions do these changes apply? We might have to add applies_to comment where relevant, as per new docs strategy. +CC @colleenmcginnis

https://docs-v3-preview.elastic.dev/elastic/docs-builder/tree/main/syntax/applies

@andrewkroh
Copy link
Member Author

The enhancements will apply to >=9.2.0. Given how there are multiple different areas of the doc that only apply to the 9.2.0+ release I will probably need to restructure this to avoid having many tags. Any suggestions how to organize the information avoid tagging each piece of new content?

Do I need to do anything special with the asciidoc file that's present?

@theletterf
Copy link
Contributor

@andrewkroh No need to edit the Asciidoc file, we do cumulative docs only in the new Markdown format.

For table rows, you could add an inline annotation, like this:

| ecs_cluster_name | orchestrator.cluster.name {applies_to}`stack: ga 9.2` |

@colleenmcginnis Could you confirm?

Copy link
Contributor

@colleenmcginnis colleenmcginnis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I would suggest. There are a lot of tags, but they aren't too noisy on the rendered page since there's already a lot of whitespace in the tables.

Screenshot 2025-08-07 at 9 50 11 AM

Given how there are multiple different areas of the doc that only apply to the 9.2.0+ release I will probably need to restructure this to avoid having many tags.

However, if you wanted to reduce the number of tags you could split the rows that were added in 9.2.0 into a separate table with a heading like Fields added in 9.2.0. In my opinion, that would make for a worse reader experience, but you could try it out.

Co-authored-by: Colleen McGinnis <colleen.j.mcginnis@gmail.com>
@andrewkroh
Copy link
Member Author

andrewkroh commented Aug 8, 2025

Thanks for the edits. I have applied all of the suggested edits.

@andrewkroh andrewkroh requested a review from theletterf August 8, 2025 00:41
@andrewkroh andrewkroh merged commit de3de7a into elastic:main Aug 8, 2025
34 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip Skip notification from the automated backport with mergify docs enhancement Filebeat Filebeat Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

6 participants