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