Skip to content

Commit c9a25e3

Browse files
Update docs (#173)
* Adding peer review feedback * update scripts --------- Co-authored-by: Sara Thomas <sarthoma@redhat.com>
1 parent 3a66f73 commit c9a25e3

File tree

3 files changed

+72
-71
lines changed

3 files changed

+72
-71
lines changed

docs/netobserv_cli.adoc

Lines changed: 64 additions & 64 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 and packets 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 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
@@ -62,45 +62,45 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
6262
|--enable_pkt_drop| enable packet drop | false
6363
|--enable_rtt| enable RTT tracking | false
6464
|--enable_udn_mapping| enable User Defined Network mapping | false
65-
|--get-subnets| get subnets informations | false
65+
|--get-subnets| get subnets information | false
6666
|--background| run in background | false
6767
|--copy| copy the output files locally | prompt
6868
|--log-level| components logs | info
6969
|--max-time| maximum capture time | 5m
7070
|--max-bytes| maximum capture bytes | 50000000 = 50MB
7171
|--action| filter action | Accept
7272
|--cidr| filter CIDR | 0.0.0.0/0
73-
|--direction| filter direction | n/a
74-
|--dport| filter destination port | n/a
75-
|--dport_range| filter destination port range | n/a
76-
|--dports| filter on either of two destination ports | n/a
73+
|--direction| filter direction | -
74+
|--dport| filter destination port | -
75+
|--dport_range| filter destination port range | -
76+
|--dports| filter on either of two destination ports | -
7777
|--drops| filter flows with only dropped packets | false
78-
|--icmp_code| filter ICMP code | n/a
79-
|--icmp_type| filter ICMP type | n/a
80-
|--node-selector| capture on specific nodes | n/a
81-
|--peer_ip| filter peer IP | n/a
82-
|--peer_cidr| filter peer CIDR | n/a
83-
|--port_range| filter port range | n/a
84-
|--port| filter port | n/a
85-
|--ports| filter on either of two ports | n/a
86-
|--protocol| filter protocol | n/a
87-
|--regexes| filter flows using regular expression | n/a
88-
|--sport_range| filter source port range | n/a
89-
|--sport| filter source port | n/a
90-
|--sports| filter on either of two source ports | n/a
91-
|--tcp_flags| filter TCP flags | n/a
92-
|--interfaces| interfaces to monitor | n/a
78+
|--icmp_code| filter ICMP code | -
79+
|--icmp_type| filter ICMP type | -
80+
|--node-selector| capture on specific nodes | -
81+
|--peer_ip| filter peer IP | -
82+
|--peer_cidr| filter peer CIDR | -
83+
|--port_range| filter port range | -
84+
|--port| filter port | -
85+
|--ports| filter on either of two ports | -
86+
|--protocol| filter protocol | -
87+
|--regexes| filter flows using regular expression | -
88+
|--sport_range| filter source port range | -
89+
|--sport| filter source port | -
90+
|--sports| filter on either of two source ports | -
91+
|--tcp_flags| filter TCP flags | -
92+
|--interfaces| interfaces to monitor | -
9393
|===
9494

9595
.Example running flows capture on TCP protocol and port 49051 with PacketDrop and RTT features enabled:
9696
[source,terminal]
9797
----
98-
$ oc netobserv flows --enable_pkt_drop=true --enable_rtt=true --enable_filter=true --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
98+
$ oc netobserv flows --enable_pkt_drop --enable_rtt --enable_filter --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
9999
----
100100
[id="cli-reference-packet-capture-options_{context}"]
101101
== Packets capture options
102-
You can filter packets capture data as same as flows capture using the filters.
103-
Note that the features, such as packets drop, DNS, RTT, and network events, are only available for flows and metrics capture.
102+
You can filter packets capture data the as same as flows capture by using the filters.
103+
Certain features, such as packets drop, DNS, RTT, and network events, are only available for flows and metrics capture.
104104

105105
.`oc netobserv packets` syntax
106106
[source,terminal]
@@ -117,25 +117,25 @@ $ oc netobserv packets [<option>]
117117
|--max-bytes| maximum capture bytes | 50000000 = 50MB
118118
|--action| filter action | Accept
119119
|--cidr| filter CIDR | 0.0.0.0/0
120-
|--direction| filter direction | n/a
121-
|--dport| filter destination port | n/a
122-
|--dport_range| filter destination port range | n/a
123-
|--dports| filter on either of two destination ports | n/a
120+
|--direction| filter direction | -
121+
|--dport| filter destination port | -
122+
|--dport_range| filter destination port range | -
123+
|--dports| filter on either of two destination ports | -
124124
|--drops| filter flows with only dropped packets | false
125-
|--icmp_code| filter ICMP code | n/a
126-
|--icmp_type| filter ICMP type | n/a
127-
|--node-selector| capture on specific nodes | n/a
128-
|--peer_ip| filter peer IP | n/a
129-
|--peer_cidr| filter peer CIDR | n/a
130-
|--port_range| filter port range | n/a
131-
|--port| filter port | n/a
132-
|--ports| filter on either of two ports | n/a
133-
|--protocol| filter protocol | n/a
134-
|--regexes| filter flows using regular expression | n/a
135-
|--sport_range| filter source port range | n/a
136-
|--sport| filter source port | n/a
137-
|--sports| filter on either of two source ports | n/a
138-
|--tcp_flags| filter TCP flags | n/a
125+
|--icmp_code| filter ICMP code | -
126+
|--icmp_type| filter ICMP type | -
127+
|--node-selector| capture on specific nodes | -
128+
|--peer_ip| filter peer IP | -
129+
|--peer_cidr| filter peer CIDR | -
130+
|--port_range| filter port range | -
131+
|--port| filter port | -
132+
|--ports| filter on either of two ports | -
133+
|--protocol| filter protocol | -
134+
|--regexes| filter flows using regular expression | -
135+
|--sport_range| filter source port range | -
136+
|--sport| filter source port | -
137+
|--sports| filter on either of two source ports | -
138+
|--tcp_flags| filter TCP flags | -
139139
|===
140140

141141
.Example running packets capture on TCP protocol and port 49051:
@@ -162,33 +162,33 @@ $ oc netobserv metrics [<option>]
162162
|--enable_pkt_drop| enable packet drop | false
163163
|--enable_rtt| enable RTT tracking | false
164164
|--enable_udn_mapping| enable User Defined Network mapping | false
165-
|--get-subnets| get subnets informations | false
165+
|--get-subnets| get subnets information | false
166166
|--action| filter action | Accept
167167
|--cidr| filter CIDR | 0.0.0.0/0
168-
|--direction| filter direction | n/a
169-
|--dport| filter destination port | n/a
170-
|--dport_range| filter destination port range | n/a
171-
|--dports| filter on either of two destination ports | n/a
168+
|--direction| filter direction | -
169+
|--dport| filter destination port | -
170+
|--dport_range| filter destination port range | -
171+
|--dports| filter on either of two destination ports | -
172172
|--drops| filter flows with only dropped packets | false
173-
|--icmp_code| filter ICMP code | n/a
174-
|--icmp_type| filter ICMP type | n/a
175-
|--node-selector| capture on specific nodes | n/a
176-
|--peer_ip| filter peer IP | n/a
177-
|--peer_cidr| filter peer CIDR | n/a
178-
|--port_range| filter port range | n/a
179-
|--port| filter port | n/a
180-
|--ports| filter on either of two ports | n/a
181-
|--protocol| filter protocol | n/a
182-
|--regexes| filter flows using regular expression | n/a
183-
|--sport_range| filter source port range | n/a
184-
|--sport| filter source port | n/a
185-
|--sports| filter on either of two source ports | n/a
186-
|--tcp_flags| filter TCP flags | n/a
187-
|--interfaces| interfaces to monitor | n/a
173+
|--icmp_code| filter ICMP code | -
174+
|--icmp_type| filter ICMP type | -
175+
|--node-selector| capture on specific nodes | -
176+
|--peer_ip| filter peer IP | -
177+
|--peer_cidr| filter peer CIDR | -
178+
|--port_range| filter port range | -
179+
|--port| filter port | -
180+
|--ports| filter on either of two ports | -
181+
|--protocol| filter protocol | -
182+
|--regexes| filter flows using regular expression | -
183+
|--sport_range| filter source port range | -
184+
|--sport| filter source port | -
185+
|--sports| filter on either of two source ports | -
186+
|--tcp_flags| filter TCP flags | -
187+
|--interfaces| interfaces to monitor | -
188188
|===
189189

190-
.Example running metrics capture for TCP drops:
190+
.Example running metrics capture for TCP drops
191191
[source,terminal]
192192
----
193-
$ oc netobserv metrics --enable_pkt_drop=true --enable_filter=true --protocol=TCP
193+
$ oc netobserv metrics --enable_pkt_drop --enable_filter --protocol=TCP
194194
----

scripts/generate-doc.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ echo "// Automatically generated by '$0'. Do not edit, or make the NETOBSERV tea
1111
[id=\"network-observability-netobserv-cli-reference_{context}\"]
1212
= Network Observability CLI usage
1313
14-
You can use 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\`.
14+
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.
1515
1616
[id=\"cli-syntax_{context}\"]
1717
== Syntax
@@ -75,14 +75,14 @@ echo "
7575
.Example running flows capture on TCP protocol and port 49051 with PacketDrop and RTT features enabled:
7676
[source,terminal]
7777
----
78-
$ oc netobserv flows --enable_pkt_drop=true --enable_rtt=true --enable_filter=true --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
78+
$ oc netobserv flows --enable_pkt_drop --enable_rtt --enable_filter --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
7979
----"
8080

8181
# packets table
8282
echo "[id=\"cli-reference-packet-capture-options_{context}\"]
8383
== Packets capture options
84-
You can filter packets capture data as same as flows capture using the filters.
85-
Note that the features, such as packets drop, DNS, RTT, and network events, are only available for flows and metrics capture.
84+
You can filter packets capture data the as same as flows capture by using the filters.
85+
Certain features, such as packets drop, DNS, RTT, and network events, are only available for flows and metrics capture.
8686
8787
.\`oc netobserv packets\` syntax
8888
[source,terminal]
@@ -122,10 +122,10 @@ specific_filters_usage
122122
echo -e "|==="
123123
# Metrics example
124124
echo "
125-
.Example running metrics capture for TCP drops:
125+
.Example running metrics capture for TCP drops
126126
[source,terminal]
127127
----
128-
$ oc netobserv metrics --enable_pkt_drop=true --enable_filter=true --protocol=TCP
128+
$ oc netobserv metrics --enable_pkt_drop --enable_filter --protocol=TCP
129129
----"
130130
} >> $ADOC
131131

@@ -134,6 +134,7 @@ sed -i.bak "s/ */ /" $ADOC
134134
# add table rows
135135
sed -i.bak "/^ /s/ --*/|--/" $ADOC
136136
# add table columns
137+
sed -i.bak "/^|/s/(default: n\/a/| -/" $ADOC # replace n/a by - in the docs
137138
sed -i.bak "/^|/s/(default:/|/" $ADOC
138139
sed -i.bak "/^|/s/: /|/" $ADOC
139140
sed -i.bak "/^|/s/)//" $ADOC

scripts/help.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function features_usage {
6464
echo " --enable_pkt_drop: enable packet drop (default: false)"
6565
echo " --enable_rtt: enable RTT tracking (default: false)"
6666
echo " --enable_udn_mapping: enable User Defined Network mapping (default: false)"
67-
echo " --get-subnets: get subnets informations (default: false)"
67+
echo " --get-subnets: get subnets information (default: false)"
6868
}
6969

7070
# collector options

0 commit comments

Comments
 (0)