|
| 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: Viewing `NetworkEvents` |
| 9 | +include::snippets/technology-preview.adoc[] |
| 10 | + |
| 11 | +You can view network events, such as network flows that are dropped or allowed by a network policy, by editing the `FlowCollector` to the specifications in the following YAML example. |
| 12 | + |
| 13 | +.Prerequisites |
| 14 | +* Must have the `OVNObservability` enabled by enabling the `TechPreviewNoUpgrade` feature set in the `FeatureGate` 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" in the "Additional resources" of this section. |
| 15 | +
|
| 16 | +.Procedure |
| 17 | +. In the web console, navigate to *Operators* -> *Installed Operators*. |
| 18 | +. In the *Provided APIs* heading for the *NetObserv Operator*, select *Flow Collector*. |
| 19 | +. Select *cluster*, and then select the *YAML* tab. |
| 20 | +. Configure the `FlowCollector` custom resource to enable viewing `NetworkEvents`, for example: |
| 21 | ++ |
| 22 | +[id="network-observability-flowcollector-configuring-networkevents{context}"] |
| 23 | +.Example `FlowCollector` configuration |
| 24 | +[source, yaml] |
| 25 | +---- |
| 26 | +apiVersion: flows.netobserv.io/v1beta2 |
| 27 | +kind: FlowCollector |
| 28 | +metadata: |
| 29 | + name: cluster |
| 30 | +spec: |
| 31 | + agent: |
| 32 | + type: eBPF |
| 33 | + ebpf: |
| 34 | + sampling: 1 <1> |
| 35 | + privileged: true <2> |
| 36 | + features: |
| 37 | + - "NetworkEvents" |
| 38 | +---- |
| 39 | +<1> The `sampling` parameter is set to a value of 1 so that all network events are captured. |
| 40 | +<2> The `privileged` parameter is set to `true` because the `OVN observability` library needs to access local OVS socket and OVN databases |
| 41 | + |
| 42 | +.Verification |
| 43 | +. Navigate to the *Network Traffic* view and select the *Traffic flows* table. |
| 44 | +. You should see the new column, *Network Events*, where you can view information about impacts that network policies, admin policies, and egress firewalls have on network flows. Here are some examples of the kinds of events you could see in this column: |
| 45 | ++ |
| 46 | +.Examples of Network Events output |
| 47 | +[source,text] |
| 48 | +---- |
| 49 | +Dropped by cluster multicast policy, direction Ingress |
| 50 | +---- |
| 51 | ++ |
| 52 | +[source,text] |
| 53 | +---- |
| 54 | +Allowed by network policy iperf.iperf3-server-access-egress, direction Egress |
| 55 | +---- |
| 56 | ++ |
| 57 | +[source,text] |
| 58 | +---- |
| 59 | +Allowed by admin network policy allow-egress-iperf, direction Egress |
| 60 | +---- |
0 commit comments