Skip to content
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

Add to Transform Filter to support remove_entry_if_equal and remove_entry_if_not_equal #273

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

KalmanMeth
Copy link
Collaborator

Add to Transform Filter the ability to filter out flow logs based on whether a certain field is equal or not equal to some value.
This functionality is needed by Palmetto to filter out flow logs that do or do not satisfy some condition (such as direction of the flow).

@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2022

Codecov Report

Merging #273 (85bf981) into main (6c1dae1) will increase coverage by 0.12%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #273      +/-   ##
==========================================
+ Coverage   66.83%   66.96%   +0.12%     
==========================================
  Files          73       73              
  Lines        4149     4159      +10     
==========================================
+ Hits         2773     2785      +12     
+ Misses       1197     1194       -3     
- Partials      179      180       +1     
Flag Coverage Δ
unittests 66.96% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/api/transform_filter.go 100.00% <ø> (ø)
pkg/pipeline/transform/transform_filter.go 95.74% <100.00%> (+1.15%) ⬆️
pkg/pipeline/ingest/ingest_collector.go 49.62% <0.00%> (+1.50%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us.

Type string `yaml:"type,omitempty" json:"type,omitempty" enum:"TransformFilterOperationEnum" doc:"one of the following:"`
Input string `yaml:"input,omitempty" json:"input,omitempty" doc:"entry input field"`
Type string `yaml:"type,omitempty" json:"type,omitempty" enum:"TransformFilterOperationEnum" doc:"one of the following:"`
Value interface{} `yaml:"value,omitempty" json:"value,omitempty" enum:"TransformFilterOperationEnum" doc:"specified value of input field:"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that the enum:"TransformFilterOperationEnum" tag of Value is redundant. If so, then docs/api.md should be updated as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The Value is needed to specify the equal / not_equal to match the key supplied in Input to decide whether to remove flow entries.

@KalmanMeth KalmanMeth merged commit 5e21b77 into netobserv:main Aug 9, 2022
@KalmanMeth KalmanMeth deleted the filter-entries branch January 29, 2023 11:09
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.

3 participants