-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS-14601 [NETOBSERV-2053] Flowlogs Flp filtering #93270
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
Open
gwynnemonahan
wants to merge
5
commits into
openshift:no-1.9
Choose a base branch
from
gwynnemonahan:OSDOCS-14601
base: no-1.9
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f2453bd
[NETOBSERV-2053] Flowlogs Flp filtering
gwynnemonahan fa65652
Additional resources in assembly under config-flows-at-ingestion, flo…
gwynnemonahan 15f9347
Updates, style and sentence structure things, added syntax explanatio…
gwynnemonahan e96d9db
Add in syntax explanation as mixed defintion list. Commit also to che…
gwynnemonahan 11c70c9
Tweaks (Squash)
gwynnemonahan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
modules/network-observability-config-flows-at-ingestion.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// Module included in the following assemblies: | ||
|
||
// * networking/network_observability/configuring-operators.adoc | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="network-observability-config-flows-at-ingestion_{context}"] | ||
|
||
= Filtering network flows at ingestion | ||
|
||
You can create filters to reduce the number of generated network flows. Filtering network flows can help reduce the resource usage of the Network Observability Operator. | ||
|
||
There are two different kinds of filters that you can configure: | ||
|
||
[id="ebpf-agent-filters_{context}"] | ||
== eBPF agent filters | ||
|
||
eBPF agent filters maximize performance because they take effect at the earliest stage of the Network Observability Operator process. | ||
|
||
To configure eBPF agent filters with the Network Observability Operator, see "Filtering eBPF flow data using multiple rules". | ||
|
||
[id="flowlogs-pipeline-filters_{context}"] | ||
== Flowlogs-pipeline filters | ||
|
||
Flowlogs-pipeline filters provide greater control over traffic selection because they take effect later in the Network Observability process. They are primarily used to improve data storage. | ||
|
||
[id="flowlogs-pipeline-filters-query-language_{context}"] | ||
=== Flowlogs-pipeline filters query language | ||
|
||
Flowlogs-pipeline filters use a simple query language to filter network flows: | ||
|
||
[source] | ||
---- | ||
(srcnamespace="netobserv" OR (srcnamespace="ingress" AND dstnamespace="netobserv")) AND srckind!="service" | ||
---- | ||
|
||
The query language uses the following syntax: | ||
|
||
Logical boolean operators (not case-sensitive):: | ||
* `and` | ||
* `or` | ||
Comparison operators:: | ||
* equals ``=` | ||
* not equals `!=` | ||
* matches regexp `=~` | ||
* not matches regexp `!~` | ||
* less than (or equal) `<` / `<=` | ||
* greater than (or equal) `>` / `>=` | ||
Unary operations:: | ||
* field is present: `with(field)` | ||
* field is absent: `without(field)` | ||
Parenthesis-based priority:: | ||
{empty} | ||
|
||
[id="flowlogs-pipeline-configure_{context}"] | ||
=== Flowlogs-pipeline configuration | ||
You can configure flowlogs-pipeline filters in the `spec.processor.filters` parameter of the `FlowCollector` resource. For example: | ||
|
||
.Example YAML Flowlogs-pipeline filter | ||
[source,yaml] | ||
---- | ||
apiVersion: flows.netobserv.io/v1beta2 | ||
kind: FlowCollector | ||
metadata: | ||
name: cluster | ||
spec: | ||
namespace: netobserv | ||
agent: | ||
processor: | ||
filters: | ||
- query: | | ||
(SrcK8S_Namespace="netobserv" OR (SrcK8S_Namespace="openshift-ingress" AND DstK8S_Namespace="netobserv")) | ||
outputTarget: Loki <1> | ||
sampling: 10 <2> | ||
---- | ||
<1> Sends matching flows to a specific output, such as Loki, Prometheus, or an external system. | ||
<2> Optional. Applies a sampling ratio to limit the number of flows that match the query. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need more explanation about sampling. Will let @jotak put it into words |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.