|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * network_observability/observing-network-traffic.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="network-observability-viewing-network-events_{context}"] |
| 7 | += Viewing network events |
| 8 | +:FeatureName: OVN-Kubernetes networking events tracking |
| 9 | +include::snippets/technology-preview.adoc[] |
| 10 | + |
| 11 | +You can edit the `FlowCollector` to view information about network traffic events, such as network flows that are dropped or allowed by the following resources: |
| 12 | + |
| 13 | +* `NetworkPolicy` |
| 14 | +* `AdminNetworkPolicy` |
| 15 | +* `BaselineNetworkPolicy` |
| 16 | +* `EgressFirewall` |
| 17 | +* `UserDefinedNetwork` isolation |
| 18 | +* Multicast ACLs |
| 19 | +
|
| 20 | +.Prerequisites |
| 21 | +* You must have `OVNObservability` enabled by setting the `TechPreviewNoUpgrade` feature set in the `FeatureGate` custom resource (CR) named `cluster`. For more information, see "Enabling feature sets using the CLI" and "Checking OVN-Kubernetes network traffic with OVS sampling using the CLI". |
| 22 | +* You have created at least one of the following network APIs: `NetworkPolicy`, `AdminNetworkPolicy`, `BaselineNetworkPolicy`, `UserDefinedNetwork` isolation, multicast, or `EgressFirewall`. |
| 23 | +
|
| 24 | +.Procedure |
| 25 | +. In the web console, navigate to *Operators* -> *Installed Operators*. |
| 26 | +. In the *Provided APIs* heading for the *NetObserv Operator*, select *Flow Collector*. |
| 27 | +. Select *cluster*, and then select the *YAML* tab. |
| 28 | +. Configure the `FlowCollector` CR to enable viewing `NetworkEvents`, for example: |
| 29 | ++ |
| 30 | +[id="network-observability-flowcollector-configuring-networkevents{context}"] |
| 31 | +.Example `FlowCollector` configuration |
| 32 | +[source, yaml] |
| 33 | +---- |
| 34 | +apiVersion: flows.netobserv.io/v1beta2 |
| 35 | +kind: FlowCollector |
| 36 | +metadata: |
| 37 | + name: cluster |
| 38 | +spec: |
| 39 | + agent: |
| 40 | + type: eBPF |
| 41 | + ebpf: |
| 42 | + # sampling: 1 <1> |
| 43 | + privileged: true <2> |
| 44 | + features: |
| 45 | + - "NetworkEvents" |
| 46 | +---- |
| 47 | +<1> Optional: The `sampling` parameter is set to a value of 1 so that all network events are captured. If sampling `1` is too resource heavy, set sampling to something more appropriate for your needs. |
| 48 | +<2> The `privileged` parameter is set to `true` because the `OVN observability` library needs to access local Open vSwitch (OVS) socket and OpenShift Virtual Network (OVN) databases. |
| 49 | + |
| 50 | +.Verification |
| 51 | +. Navigate to the *Network Traffic* view and select the *Traffic flows* table. |
| 52 | +. You should see the new column, *Network Events*, where you can view information about impacts of one of the following network APIs you have enabled: `NetworkPolicy`, `AdminNetworkPolicy`, `BaselineNetworkPolicy`, `UserDefinedNetwork` isolation, multicast, or egress firewalls. |
| 53 | + |
| 54 | +An example of the kind of events you could see in this column is as follows: |
| 55 | ++ |
| 56 | +.Example of Network Events output |
| 57 | +[source,text] |
| 58 | +---- |
| 59 | +<Dropped_or_Allowed> by <network_event_and_event_name>, direction <Ingress_or_Egress> |
| 60 | +---- |
0 commit comments