Skip to content

Adding optional regex segment to parse vpc flow logs with hourly partition to fix grafana/lambda-promtail#9 - #202

Open
BhruguR wants to merge 1 commit into
grafana:mainfrom
BhruguR:fix/vpc-logs-regex-hourly-partition
Open

Adding optional regex segment to parse vpc flow logs with hourly partition to fix grafana/lambda-promtail#9#202
BhruguR wants to merge 1 commit into
grafana:mainfrom
BhruguR:fix/vpc-logs-regex-hourly-partition

Conversation

@BhruguR

@BhruguR BhruguR commented Aug 7, 2026

Copy link
Copy Markdown

Fixes #9

All I am doing is simply adding an optional regex segment to parse VPC flow logs with hourly partition.

The regex concerned here is (?:(?P<hour>\d+)\/)?:

  • ?: makes sure we do not keep track of something like 20/ as that is what the outer group is matching
  • ?P adding an 'hour' named group
  • \d+ While d{2} would have been the better option, I am trying to follow the format that other calendar expressions are using
  • / VPC flow logs with hourly partition will have a number like 20/ which we will have to match.

Tests

I have added a unit test to test this change, and I have locally tested this change in my aws account using terraform successfully.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Signed commits report

All 1 commit between main and fix/vpc-logs-regex-hourly-partition have verified signatures. ✅

@cla-assistant

cla-assistant Bot commented Aug 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Aug 7, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


b.rajput seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@BhruguR
BhruguR force-pushed the fix/vpc-logs-regex-hourly-partition branch 3 times, most recently from 7896932 to fd3b716 Compare August 7, 2026 05:05
@BhruguR
BhruguR force-pushed the fix/vpc-logs-regex-hourly-partition branch from fd3b716 to 416c3cb Compare August 7, 2026 05:15
@BhruguR

BhruguR commented Aug 12, 2026

Copy link
Copy Markdown
Author

@jeschkies Can you please take a look when you get a chance (no rush)? I am very eager to have this merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lambda-promtail regex fails for vpc flow logs with hourly partition

1 participant