Skip to content

Commit 1a43a8e

Browse files
committed
OSDOCS-10730: NetObserv 1.8 CLI reference
1 parent 6e028b5 commit 1a43a8e

File tree

1 file changed

+73
-11
lines changed

1 file changed

+73
-11
lines changed

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

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
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-
[id="network-observability-netobserv-cli-reference_{context}"]
3+
4+
[id="network-observability-cli-usage_{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

8-
[id="cli-syntax_{context}"]
9+
[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]
@@ -16,7 +17,7 @@ $ oc netobserv [<command>] [<feature_option>] [<command_options>] <1>
1617
----
1718
<1> Feature options can only be used with the `oc netobserv flows` command. They cannot be used with the `oc netobserv packets` command.
1819

19-
[id="cli-basic-commands_{context}"]
20+
[id=cli-basic-commands_{context}]
2021
== Basic commands
2122
[cols="3a,8a",options="header"]
2223
.Basic commands
@@ -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
@@ -34,9 +43,9 @@ $ oc netobserv [<command>] [<feature_option>] [<command_options>] <1>
3443
| Show help.
3544
|===
3645

37-
[id="cli-reference-flows-capture-options_{context}"]
46+
[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]
@@ -50,11 +59,13 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
5059
|--enable_dns| enable DNS tracking | false
5160
|--enable_rtt| enable RTT tracking | false
5261
|--enable_network_events| enable Network events monitoring | false
53-
|--enable_filter| enable flow filter | false
62+
|--get-subnets| get subnets informations | false
5463
|--log-level| components logs | info
5564
|--max-time| maximum capture time | 5m
5665
|--max-bytes| maximum capture bytes | 50000000 = 50MB
66+
|--background| run in background | false
5767
|--copy| copy the output files locally | prompt
68+
|--node-selector| capture on specific nodes | n/a
5869
|--direction| filter direction | n/a
5970
|--cidr| filter CIDR | 0.0.0.0/0
6071
|--protocol| filter protocol | n/a
@@ -72,6 +83,8 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
7283
|--icmp_type| filter ICMP type | n/a
7384
|--icmp_code| filter ICMP code | n/a
7485
|--peer_ip| filter peer IP | n/a
86+
|--drops| filter flows with only dropped packets | false
87+
|--regexes| filter flows using regular expression | n/a
7588
|--interfaces| interfaces to monitor | n/a
7689
|===
7790

@@ -80,10 +93,10 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
8093
----
8194
$ oc netobserv flows --enable_pktdrop=true --enable_rtt=true --enable_filter=true --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
8295
----
83-
84-
[id="cli-reference-packet-capture-options_{context}"]
96+
[id=cli-reference-packet-capture-options_{context}]
8597
== Packets capture options
86-
You can filter on port and protocol for packet capture data.
98+
You can filter packets capture data as same as flows capture using the filters.
99+
Note that the features, such as packets drop, dns, rtt, and network events, are only available for flows and metrics capture.
87100

88101
.`oc netobserv packets` syntax
89102
[source,terminal]
@@ -96,7 +109,9 @@ $ oc netobserv packets [<option>]
96109
|--log-level| components logs | info
97110
|--max-time| maximum capture time | 5m
98111
|--max-bytes| maximum capture bytes | 50000000 = 50MB
112+
|--background| run in background | false
99113
|--copy| copy the output files locally | prompt
114+
|--node-selector| capture on specific nodes | n/a
100115
|--direction| filter direction | n/a
101116
|--cidr| filter CIDR | 0.0.0.0/0
102117
|--protocol| filter protocol | n/a
@@ -114,10 +129,57 @@ $ oc netobserv packets [<option>]
114129
|--icmp_type| filter ICMP type | n/a
115130
|--icmp_code| filter ICMP code | n/a
116131
|--peer_ip| filter peer IP | n/a
132+
|--drops| filter flows with only dropped packets | false
133+
|--regexes| filter flows using regular expression | n/a
117134
|===
118135

119136
.Example running packets capture on TCP protocol and port 49051:
120137
[source,terminal]
121138
----
122139
$ oc netobserv packets --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
123140
----
141+
[id=cli-reference-metrics-capture-options_{context}]
142+
== Metrics capture options
143+
You can enable features and use filters on metrics capture, the same as flows capture. The generated graphs fill accordingly in the dashboard.
144+
145+
.`oc netobserv metrics` syntax
146+
[source,terminal]
147+
----
148+
$ oc netobserv metrics [<option>]
149+
----
150+
[cols="1,1,1",options="header"]
151+
|===
152+
| Option | Description | Default
153+
|--enable_pktdrop| enable packet drop | false
154+
|--enable_dns| enable DNS tracking | false
155+
|--enable_rtt| enable RTT tracking | false
156+
|--enable_network_events| enable Network events monitoring | false
157+
|--get-subnets| get subnets informations | false
158+
|--node-selector| capture on specific nodes | n/a
159+
|--direction| filter direction | n/a
160+
|--cidr| filter CIDR | 0.0.0.0/0
161+
|--protocol| filter protocol | n/a
162+
|--sport| filter source port | n/a
163+
|--dport| filter destination port | n/a
164+
|--port| filter port | n/a
165+
|--sport_range| filter source port range | n/a
166+
|--dport_range| filter destination port range | n/a
167+
|--port_range| filter port range | n/a
168+
|--sports| filter on either of two source ports | n/a
169+
|--dports| filter on either of two destination ports | n/a
170+
|--ports| filter on either of two ports | n/a
171+
|--tcp_flags| filter TCP flags | n/a
172+
|--action| filter action | Accept
173+
|--icmp_type| filter ICMP type | n/a
174+
|--icmp_code| filter ICMP code | n/a
175+
|--peer_ip| filter peer IP | n/a
176+
|--drops| filter flows with only dropped packets | false
177+
|--regexes| filter flows using regular expression | n/a
178+
|--interfaces| interfaces to monitor | n/a
179+
|===
180+
181+
.Example running metrics capture for TCP drops:
182+
[source,terminal]
183+
----
184+
$ oc netobserv metrics --enable_pktdrop=true --enable_filter=true --protocol=TCP
185+
----

0 commit comments

Comments
 (0)