11// Automatically generated by './scripts/generate-doc.sh'. Do not edit, or make the NETOBSERV team aware of the editions.
22:_mod-docs-content-type: REFERENCE
3+
34[id="network-observability-netobserv-cli-reference_{context}"]
45= Network Observability CLI usage
56
6- You can use the Network Observability CLI (`oc netobserv` ) to pass command line arguments to capture flow data and packet data for further analysis, enable Network Observability Operator features, or pass configuration options to the eBPF agent and `flowlogs-pipeline` .
7+ You can use the The Network Observability CLI (`oc netobserv`) to pass command line arguments to capture flows data and packets data for further analysis, enable Network Observability Operator features or pass configuration options to the eBPF agent and `flowlogs-pipeline`.
78
89[id="cli-syntax_{context}"]
910== Syntax
10- The basic syntax for `oc netobserv` commands is as follows :
11+ The basic syntax for `oc netobserv` commands:
1112
1213.`oc netobserv` syntax
1314[source,terminal]
@@ -26,6 +27,14 @@ $ oc netobserv [<command>] [<feature_option>] [<command_options>] <1>
2627| Capture flows information. For subcommands, see the "Flows capture options" table.
2728| packets
2829| Capture packets data. For subcommands, see the "Packets capture options" table.
30+ | metrics
31+ | Capture metrics data. For subcommands, see the "Metrics capture options" table.
32+ | follow
33+ | Follow collector logs when running in background.
34+ | stop
35+ | Stop collection by removing agent daemonset.
36+ | copy
37+ | Copy collector generated files locally.
2938| cleanup
3039| Remove the Network Observability CLI components.
3140| version
@@ -36,7 +45,7 @@ $ oc netobserv [<command>] [<feature_option>] [<command_options>] <1>
3645
3746[id="cli-reference-flows-capture-options_{context}"]
3847== Flows capture options
39- Flows capture has mandatory commands as well as additional options, such as enabling extra features about packet drops, DNS latencies, Round-trip time, and filtering.
48+ flows capture has mandatory commands as well as additional options, such as enabling extra features about packet drops, DNS latencies, Round-trip time, and filtering.
4049
4150.`oc netobserv flows` syntax
4251[source,terminal]
@@ -46,32 +55,37 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
4655[cols="1,1,1",options="header"]
4756|===
4857| Option | Description | Default
49- |--enable_pktdrop | enable packet drop | false
58+ |--enable_all | enable all eBPF features | false
5059|--enable_dns| enable DNS tracking | false
51- |--enable_rtt| enable RTT tracking | false
5260|--enable_network_events| enable Network events monitoring | false
53- |--enable_filter| enable flow filter | false
61+ |--enable_pktdrop| enable packet drop | false
62+ |--enable_rtt| enable RTT tracking | false
63+ |--get-subnets| get subnets informations | false
64+ |--background| run in background | false
65+ |--copy| copy the output files locally | prompt
5466|--log-level| components logs | info
5567|--max-time| maximum capture time | 5m
5668|--max-bytes| maximum capture bytes | 50000000 = 50MB
57- |--copy| copy the output files locally | prompt
58- |--direction| filter direction | n/a
69+ |--action| filter action | Accept
5970|--cidr| filter CIDR | 0.0.0.0/0
60- |--protocol| filter protocol | n/a
61- |--sport| filter source port | n/a
71+ |--direction| filter direction | n/a
6272|--dport| filter destination port | n/a
63- |--port| filter port | n/a
64- |--sport_range| filter source port range | n/a
6573|--dport_range| filter destination port range | n/a
66- |--port_range| filter port range | n/a
67- |--sports| filter on either of two source ports | n/a
6874|--dports| filter on either of two destination ports | n/a
69- |--ports| filter on either of two ports | n/a
70- |--tcp_flags| filter TCP flags | n/a
71- |--action| filter action | Accept
72- |--icmp_type| filter ICMP type | n/a
75+ |--drops| filter flows with only dropped packets | false
7376|--icmp_code| filter ICMP code | n/a
77+ |--icmp_type| filter ICMP type | n/a
78+ |--node-selector| capture on specific nodes | n/a
7479|--peer_ip| filter peer IP | n/a
80+ |--port_range| filter port range | n/a
81+ |--port| filter port | n/a
82+ |--ports| filter on either of two ports | n/a
83+ |--protocol| filter protocol | n/a
84+ |--regexes| filter flows using regular expression | n/a
85+ |--sport_range| filter source port range | n/a
86+ |--sport| filter source port | n/a
87+ |--sports| filter on either of two source ports | n/a
88+ |--tcp_flags| filter TCP flags | n/a
7589|--interfaces| interfaces to monitor | n/a
7690|===
7791
@@ -80,10 +94,10 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
8094----
8195$ oc netobserv flows --enable_pktdrop=true --enable_rtt=true --enable_filter=true --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
8296----
83-
8497[id="cli-reference-packet-capture-options_{context}"]
8598== Packets capture options
86- You can filter on port and protocol for packet capture data.
99+ You can filter packets capture data as same as flows capture using the filters.
100+ Note that the features, such as packets drop, dns, rtt, and network events, are only available for flows and metrics capture.
87101
88102.`oc netobserv packets` syntax
89103[source,terminal]
@@ -93,31 +107,81 @@ $ oc netobserv packets [<option>]
93107[cols="1,1,1",options="header"]
94108|===
95109| Option | Description | Default
110+ |--background| run in background | false
111+ |--copy| copy the output files locally | prompt
96112|--log-level| components logs | info
97113|--max-time| maximum capture time | 5m
98114|--max-bytes| maximum capture bytes | 50000000 = 50MB
99- |--copy| copy the output files locally | prompt
100- |--direction| filter direction | n/a
115+ |--action| filter action | Accept
101116|--cidr| filter CIDR | 0.0.0.0/0
102- |--protocol| filter protocol | n/a
103- |--sport| filter source port | n/a
117+ |--direction| filter direction | n/a
104118|--dport| filter destination port | n/a
105- |--port| filter port | n/a
106- |--sport_range| filter source port range | n/a
107119|--dport_range| filter destination port range | n/a
108- |--port_range| filter port range | n/a
109- |--sports| filter on either of two source ports | n/a
110120|--dports| filter on either of two destination ports | n/a
111- |--ports| filter on either of two ports | n/a
112- |--tcp_flags| filter TCP flags | n/a
113- |--action| filter action | Accept
114- |--icmp_type| filter ICMP type | n/a
121+ |--drops| filter flows with only dropped packets | false
115122|--icmp_code| filter ICMP code | n/a
123+ |--icmp_type| filter ICMP type | n/a
124+ |--node-selector| capture on specific nodes | n/a
116125|--peer_ip| filter peer IP | n/a
126+ |--port_range| filter port range | n/a
127+ |--port| filter port | n/a
128+ |--ports| filter on either of two ports | n/a
129+ |--protocol| filter protocol | n/a
130+ |--regexes| filter flows using regular expression | n/a
131+ |--sport_range| filter source port range | n/a
132+ |--sport| filter source port | n/a
133+ |--sports| filter on either of two source ports | n/a
134+ |--tcp_flags| filter TCP flags | n/a
117135|===
118136
119137.Example running packets capture on TCP protocol and port 49051:
120138[source,terminal]
121139----
122140$ oc netobserv packets --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
123141----
142+ [id="cli-reference-metrics-capture-options_{context}"]
143+ == Metrics capture options
144+ You can enable features and use filters on metrics capture, the same as flows capture. The generated graphs fill accordingly in the dashboard.
145+
146+ .`oc netobserv metrics` syntax
147+ [source,terminal]
148+ ----
149+ $ oc netobserv metrics [<option>]
150+ ----
151+ [cols="1,1,1",options="header"]
152+ |===
153+ | Option | Description | Default
154+ |--enable_all| enable all eBPF features | false
155+ |--enable_dns| enable DNS tracking | false
156+ |--enable_network_events| enable Network events monitoring | false
157+ |--enable_pktdrop| enable packet drop | false
158+ |--enable_rtt| enable RTT tracking | false
159+ |--get-subnets| get subnets informations | false
160+ |--action| filter action | Accept
161+ |--cidr| filter CIDR | 0.0.0.0/0
162+ |--direction| filter direction | n/a
163+ |--dport| filter destination port | n/a
164+ |--dport_range| filter destination port range | n/a
165+ |--dports| filter on either of two destination ports | n/a
166+ |--drops| filter flows with only dropped packets | false
167+ |--icmp_code| filter ICMP code | n/a
168+ |--icmp_type| filter ICMP type | n/a
169+ |--node-selector| capture on specific nodes | n/a
170+ |--peer_ip| filter peer IP | n/a
171+ |--port_range| filter port range | n/a
172+ |--port| filter port | n/a
173+ |--ports| filter on either of two ports | n/a
174+ |--protocol| filter protocol | n/a
175+ |--regexes| filter flows using regular expression | n/a
176+ |--sport_range| filter source port range | n/a
177+ |--sport| filter source port | n/a
178+ |--sports| filter on either of two source ports | n/a
179+ |--tcp_flags| filter TCP flags | n/a
180+ |--interfaces| interfaces to monitor | n/a
181+ |===
182+
183+ .Example running metrics capture for TCP drops:
184+ [source,terminal]
185+ ----
186+ $ oc netobserv metrics --enable_pktdrop=true --enable_filter=true --protocol=TCP
187+ ----
0 commit comments