Skip to content

Commit 40abf1a

Browse files
gwynnemonahankalexand-rh
authored andcommitted
OSDOCS-16179 [NETOBSERV] CLI Updates 1.10
1 parent baf1da2 commit 40abf1a

File tree

1 file changed

+104
-131
lines changed

1 file changed

+104
-131
lines changed

modules/network-observability-netobserv-cli-reference.adoc

Lines changed: 104 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[id="network-observability-netobserv-cli-reference_{context}"]
55
= Network Observability CLI usage
66

7-
You can use the Network Observability CLI (`oc netobserv`) to pass command-line arguments to capture flows data, packets data, and metrics for further analysis and enable features supported by the Network Observability Operator.
7+
You can use the Network Observability CLI (`oc netobserv`) to pass command line arguments to capture flows data, packets data, and metrics for further analysis and enable features supported by the Network Observability Operator.
88

99
[id="cli-syntax_{context}"]
1010
== Syntax
@@ -55,44 +55,45 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
5555
[cols="1,1,1",options="header"]
5656
|===
5757
| Option | Description | Default
58-
|--enable_all| enable all eBPF features | false
59-
|--enable_dns| enable DNS tracking | false
60-
|--enable_ipsec| enable IPsec tracking | false
61-
|--enable_network_events| enable network events monitoring | false
62-
|--enable_pkt_translation| enable packet translation | false
63-
|--enable_pkt_drop| enable packet drop | false
64-
|--enable_rtt| enable RTT tracking | false
65-
|--enable_udn_mapping| enable User Defined Network mapping | false
66-
|--get-subnets| get subnets information | false
67-
|--sampling| value that determines the ratio of packets being sampled | 1
68-
|--background| run in background | false
69-
|--copy| copy the output files locally | prompt
70-
|--log-level| components logs | info
71-
|--max-time| maximum capture time | 5m
72-
|--max-bytes| maximum capture bytes | 50000000 = 50MB
73-
|--action| filter action | Accept
74-
|--cidr| filter CIDR | 0.0.0.0/0
75-
|--direction| filter direction | –
76-
|--dport| filter destination port | –
77-
|--dport_range| filter destination port range | –
78-
|--dports| filter on either of two destination ports | –
79-
|--drops| filter flows with only dropped packets | false
80-
|--icmp_code| filter ICMP code | –
81-
|--icmp_type| filter ICMP type | –
82-
|--node-selector| capture on specific nodes | –
83-
|--peer_ip| filter peer IP | –
84-
|--peer_cidr| filter peer CIDR | –
85-
|--port_range| filter port range | –
86-
|--port| filter port | –
87-
|--ports| filter on either of two ports | –
88-
|--protocol| filter protocol | –
89-
|--query| filter flows by using a custom query | –
90-
|--sport_range| filter source port range | –
91-
|--sport| filter source port | –
92-
|--sports| filter on either of two source ports | –
93-
|--tcp_flags| filter TCP flags | –
94-
|--interfaces| list of interfaces to monitor, comma separated | –
95-
|--exclude_interfaces| list of interfaces to exclude, comma separated | lo
58+
|--enable_all| enable all eBPF features | false
59+
|--enable_dns| enable DNS tracking | false
60+
|--enable_ipsec| enable IPsec tracking | false
61+
|--enable_network_events| enable network events monitoring | false
62+
|--enable_pkt_translation| enable packet translation | false
63+
|--enable_pkt_drop| enable packet drop | false
64+
|--enable_rtt| enable RTT tracking | false
65+
|--enable_udn_mapping| enable User Defined Network mapping | false
66+
|--get-subnets| get subnets information | false
67+
|--privileged| force eBPF agent privileged mode | auto
68+
|--sampling| packets sampling interval | 1
69+
|--background| run in background | false
70+
|--copy| copy the output files locally | prompt
71+
|--log-level| components logs | info
72+
|--max-time| maximum capture time | 5m
73+
|--max-bytes| maximum capture bytes | 50000000 = 50MB
74+
|--action| filter action | Accept
75+
|--cidr| filter CIDR | 0.0.0.0/0
76+
|--direction| filter direction | -
77+
|--dport| filter destination port | -
78+
|--dport_range| filter destination port range | -
79+
|--dports| filter on either of two destination ports | -
80+
|--drops| filter flows with only dropped packets | false
81+
|--icmp_code| filter ICMP code | -
82+
|--icmp_type| filter ICMP type | -
83+
|--node-selector| capture on specific nodes | -
84+
|--peer_ip| filter peer IP | -
85+
|--peer_cidr| filter peer CIDR | -
86+
|--port_range| filter port range | -
87+
|--port| filter port | -
88+
|--ports| filter on either of two ports | -
89+
|--protocol| filter protocol | -
90+
|--query| filter flows using a custom query | -
91+
|--sport_range| filter source port range | -
92+
|--sport| filter source port | -
93+
|--sports| filter on either of two source ports | -
94+
|--tcp_flags| filter TCP flags | -
95+
|--interfaces| list of interfaces to monitor, comma separated | -
96+
|--exclude_interfaces| list of interfaces to exclude, comma separated | lo
9697
|===
9798

9899
.Example running flows capture on TCP protocol and port 49051 with PacketDrop and RTT features enabled:
@@ -113,32 +114,32 @@ $ oc netobserv packets [<option>]
113114
[cols="1,1,1",options="header"]
114115
|===
115116
| Option | Description | Default
116-
|--background| run in background | false
117-
|--copy| copy the output files locally | prompt
118-
|--log-level| components logs | info
119-
|--max-time| maximum capture time | 5m
120-
|--max-bytes| maximum capture bytes | 50000000 = 50MB
121-
|--action| filter action | Accept
122-
|--cidr| filter CIDR | 0.0.0.0/0
123-
|--direction| filter direction | –
124-
|--dport| filter destination port | –
125-
|--dport_range| filter destination port range | –
126-
|--dports| filter on either of two destination ports | –
127-
|--drops| filter flows with only dropped packets | false
128-
|--icmp_code| filter ICMP code | –
129-
|--icmp_type| filter ICMP type | –
130-
|--node-selector| capture on specific nodes | –
131-
|--peer_ip| filter peer IP | –
132-
|--peer_cidr| filter peer CIDR | –
133-
|--port_range| filter port range | –
134-
|--port| filter port | –
135-
|--ports| filter on either of two ports | –
136-
|--protocol| filter protocol | –
137-
|--query| filter flows by using a custom query | –
138-
|--sport_range| filter source port range | –
139-
|--sport| filter source port | –
140-
|--sports| filter on either of two source ports | –
141-
|--tcp_flags| filter TCP flags | –
117+
|--background| run in background | false
118+
|--copy| copy the output files locally | prompt
119+
|--log-level| components logs | info
120+
|--max-time| maximum capture time | 5m
121+
|--max-bytes| maximum capture bytes | 50000000 = 50MB
122+
|--action| filter action | Accept
123+
|--cidr| filter CIDR | 0.0.0.0/0
124+
|--direction| filter direction | -
125+
|--dport| filter destination port | -
126+
|--dport_range| filter destination port range | -
127+
|--dports| filter on either of two destination ports | -
128+
|--drops| filter flows with only dropped packets | false
129+
|--icmp_code| filter ICMP code | -
130+
|--icmp_type| filter ICMP type | -
131+
|--node-selector| capture on specific nodes | -
132+
|--peer_ip| filter peer IP | -
133+
|--peer_cidr| filter peer CIDR | -
134+
|--port_range| filter port range | -
135+
|--port| filter port | -
136+
|--ports| filter on either of two ports | -
137+
|--protocol| filter protocol | -
138+
|--query| filter flows using a custom query | -
139+
|--sport_range| filter source port range | -
140+
|--sport| filter source port | -
141+
|--sports| filter on either of two source ports | -
142+
|--tcp_flags| filter TCP flags | -
142143
|===
143144

144145
.Example running packets capture on TCP protocol and port 49051:
@@ -158,76 +159,48 @@ $ oc netobserv metrics [<option>]
158159
[cols="1,1,1",options="header"]
159160
|===
160161
| Option | Description | Default
161-
|--enable_all| enable all eBPF features | false
162-
|--enable_dns| enable DNS tracking | false
163-
|--enable_ipsec| enable IPsec tracking | false
164-
|--enable_network_events| enable network events monitoring | false
165-
|--enable_pkt_translation| enable packet translation | false
166-
|--enable_pkt_drop| enable packet drop | false
167-
|--enable_rtt| enable RTT tracking | false
168-
|--enable_udn_mapping| enable User Defined Network mapping | false
169-
|--get-subnets| get subnets information | false
170-
|--sampling| value that defines the ratio of packets being sampled | 1
171-
|--action| filter action | Accept
172-
|--cidr| filter CIDR | 0.0.0.0/0
173-
|--direction| filter direction | –
174-
|--dport| filter destination port | –
175-
|--dport_range| filter destination port range | –
176-
|--dports| filter on either of two destination ports | –
177-
|--drops| filter flows with only dropped packets | false
178-
|--icmp_code| filter ICMP code | –
179-
|--icmp_type| filter ICMP type | –
180-
|--node-selector| capture on specific nodes | –
181-
|--peer_ip| filter peer IP | –
182-
|--peer_cidr| filter peer CIDR | –
183-
|--port_range| filter port range | –
184-
|--port| filter port | –
185-
|--ports| filter on either of two ports | –
186-
|--protocol| filter protocol | –
187-
|--query| filter flows by using a custom query | –
188-
|--sport_range| filter source port range | –
189-
|--sport| filter source port | –
190-
|--sports| filter on either of two source ports | –
191-
|--tcp_flags| filter TCP flags | –
192-
|--include_list| list of metric names to generate, comma separated | namespace_flows_total,node_ingress_bytes_total,node_egress_bytes_total,workload_ingress_bytes_total
193-
|--interfaces| list of interfaces to monitor, comma separated | –
194-
|--exclude_interfaces| list of interfaces to exclude, comma separated | lo
162+
|--enable_all| enable all eBPF features | false
163+
|--enable_dns| enable DNS tracking | false
164+
|--enable_ipsec| enable IPsec tracking | false
165+
|--enable_network_events| enable network events monitoring | false
166+
|--enable_pkt_translation| enable packet translation | false
167+
|--enable_pkt_drop| enable packet drop | false
168+
|--enable_rtt| enable RTT tracking | false
169+
|--enable_udn_mapping| enable User Defined Network mapping | false
170+
|--get-subnets| get subnets information | false
171+
|--privileged| force eBPF agent privileged mode | auto
172+
|--sampling| packets sampling interval | 1
173+
|--background| run in background | false
174+
|--log-level| components logs | info
175+
|--max-time| maximum capture time | 1h
176+
|--action| filter action | Accept
177+
|--cidr| filter CIDR | 0.0.0.0/0
178+
|--direction| filter direction | -
179+
|--dport| filter destination port | -
180+
|--dport_range| filter destination port range | -
181+
|--dports| filter on either of two destination ports | -
182+
|--drops| filter flows with only dropped packets | false
183+
|--icmp_code| filter ICMP code | -
184+
|--icmp_type| filter ICMP type | -
185+
|--node-selector| capture on specific nodes | -
186+
|--peer_ip| filter peer IP | -
187+
|--peer_cidr| filter peer CIDR | -
188+
|--port_range| filter port range | -
189+
|--port| filter port | -
190+
|--ports| filter on either of two ports | -
191+
|--protocol| filter protocol | -
192+
|--query| filter flows using a custom query | -
193+
|--sport_range| filter source port range | -
194+
|--sport| filter source port | -
195+
|--sports| filter on either of two source ports | -
196+
|--tcp_flags| filter TCP flags | -
197+
|--include_list| list of metric names to generate, comma separated | namespace_flows_total,node_ingress_bytes_total,node_egress_bytes_total,workload_ingress_bytes_total
198+
|--interfaces| list of interfaces to monitor, comma separated | -
199+
|--exclude_interfaces| list of interfaces to exclude, comma separated | lo
195200
|===
196201

197202
.Example running metrics capture for TCP drops
198203
[source,terminal]
199204
----
200205
$ oc netobserv metrics --enable_pkt_drop --protocol=TCP
201-
----
202-
203-
.Example running metrics capture for list of metric names to generate
204-
[source,terminal]
205-
----
206-
$ oc netobserv metrics --include_list=node,workload
207-
----
208-
209-
[source,terminal]
210-
----
211-
$ oc netobserv metrics --include_list=node_egress_bytes_total,workload_egress_packets_total
212-
----
213-
214-
[source,terminal]
215-
----
216-
$ oc netobserv metrics --enable_all --include_list=node,namespace,workload
217-
----
218-
219-
.Example output for list of metric names
220-
[source, terminal]
221-
----
222-
opt: include_list, value: node,workload
223-
Matching metrics:
224-
- node_egress_bytes_total
225-
- node_ingress_bytes_total
226-
- workload_egress_bytes_total
227-
- workload_ingress_bytes_total
228-
- workload_egress_packets_total
229-
- workload_ingress_packets_total
230-
- workload_flows_total
231-
- workload_drop_packets_total
232-
- workload_drop_bytes_total
233206
----

0 commit comments

Comments
 (0)