Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 64 additions & 64 deletions docs/netobserv_cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[id="network-observability-netobserv-cli-reference_{context}"]
= Network Observability CLI usage

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`.
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.

[id="cli-syntax_{context}"]
== Syntax
Expand Down Expand Up @@ -62,45 +62,45 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
|--enable_pkt_drop| enable packet drop | false
|--enable_rtt| enable RTT tracking | false
|--enable_udn_mapping| enable User Defined Network mapping | false
|--get-subnets| get subnets informations | false
|--get-subnets| get subnets information | false
|--background| run in background | false
|--copy| copy the output files locally | prompt
|--log-level| components logs | info
|--max-time| maximum capture time | 5m
|--max-bytes| maximum capture bytes | 50000000 = 50MB
|--action| filter action | Accept
|--cidr| filter CIDR | 0.0.0.0/0
|--direction| filter direction | n/a
|--dport| filter destination port | n/a
|--dport_range| filter destination port range | n/a
|--dports| filter on either of two destination ports | n/a
|--direction| filter direction | -
|--dport| filter destination port | -
|--dport_range| filter destination port range | -
|--dports| filter on either of two destination ports | -
|--drops| filter flows with only dropped packets | false
|--icmp_code| filter ICMP code | n/a
|--icmp_type| filter ICMP type | n/a
|--node-selector| capture on specific nodes | n/a
|--peer_ip| filter peer IP | n/a
|--peer_cidr| filter peer CIDR | n/a
|--port_range| filter port range | n/a
|--port| filter port | n/a
|--ports| filter on either of two ports | n/a
|--protocol| filter protocol | n/a
|--regexes| filter flows using regular expression | n/a
|--sport_range| filter source port range | n/a
|--sport| filter source port | n/a
|--sports| filter on either of two source ports | n/a
|--tcp_flags| filter TCP flags | n/a
|--interfaces| interfaces to monitor | n/a
|--icmp_code| filter ICMP code | -
|--icmp_type| filter ICMP type | -
|--node-selector| capture on specific nodes | -
|--peer_ip| filter peer IP | -
|--peer_cidr| filter peer CIDR | -
|--port_range| filter port range | -
|--port| filter port | -
|--ports| filter on either of two ports | -
|--protocol| filter protocol | -
|--regexes| filter flows using regular expression | -
|--sport_range| filter source port range | -
|--sport| filter source port | -
|--sports| filter on either of two source ports | -
|--tcp_flags| filter TCP flags | -
|--interfaces| interfaces to monitor | -
|===

.Example running flows capture on TCP protocol and port 49051 with PacketDrop and RTT features enabled:
[source,terminal]
----
$ 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
$ oc netobserv flows --enable_pkt_drop --enable_rtt --enable_filter --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
----
[id="cli-reference-packet-capture-options_{context}"]
== Packets capture options
You can filter packets capture data as same as flows capture using the filters.
Note that the features, such as packets drop, DNS, RTT, and network events, are only available for flows and metrics capture.
You can filter packets capture data the as same as flows capture by using the filters.
Certain features, such as packets drop, DNS, RTT, and network events, are only available for flows and metrics capture.

.`oc netobserv packets` syntax
[source,terminal]
Expand All @@ -117,25 +117,25 @@ $ oc netobserv packets [<option>]
|--max-bytes| maximum capture bytes | 50000000 = 50MB
|--action| filter action | Accept
|--cidr| filter CIDR | 0.0.0.0/0
|--direction| filter direction | n/a
|--dport| filter destination port | n/a
|--dport_range| filter destination port range | n/a
|--dports| filter on either of two destination ports | n/a
|--direction| filter direction | -
|--dport| filter destination port | -
|--dport_range| filter destination port range | -
|--dports| filter on either of two destination ports | -
|--drops| filter flows with only dropped packets | false
|--icmp_code| filter ICMP code | n/a
|--icmp_type| filter ICMP type | n/a
|--node-selector| capture on specific nodes | n/a
|--peer_ip| filter peer IP | n/a
|--peer_cidr| filter peer CIDR | n/a
|--port_range| filter port range | n/a
|--port| filter port | n/a
|--ports| filter on either of two ports | n/a
|--protocol| filter protocol | n/a
|--regexes| filter flows using regular expression | n/a
|--sport_range| filter source port range | n/a
|--sport| filter source port | n/a
|--sports| filter on either of two source ports | n/a
|--tcp_flags| filter TCP flags | n/a
|--icmp_code| filter ICMP code | -
|--icmp_type| filter ICMP type | -
|--node-selector| capture on specific nodes | -
|--peer_ip| filter peer IP | -
|--peer_cidr| filter peer CIDR | -
|--port_range| filter port range | -
|--port| filter port | -
|--ports| filter on either of two ports | -
|--protocol| filter protocol | -
|--regexes| filter flows using regular expression | -
|--sport_range| filter source port range | -
|--sport| filter source port | -
|--sports| filter on either of two source ports | -
|--tcp_flags| filter TCP flags | -
|===

.Example running packets capture on TCP protocol and port 49051:
Expand All @@ -162,33 +162,33 @@ $ oc netobserv metrics [<option>]
|--enable_pkt_drop| enable packet drop | false
|--enable_rtt| enable RTT tracking | false
|--enable_udn_mapping| enable User Defined Network mapping | false
|--get-subnets| get subnets informations | false
|--get-subnets| get subnets information | false
|--action| filter action | Accept
|--cidr| filter CIDR | 0.0.0.0/0
|--direction| filter direction | n/a
|--dport| filter destination port | n/a
|--dport_range| filter destination port range | n/a
|--dports| filter on either of two destination ports | n/a
|--direction| filter direction | -
|--dport| filter destination port | -
|--dport_range| filter destination port range | -
|--dports| filter on either of two destination ports | -
|--drops| filter flows with only dropped packets | false
|--icmp_code| filter ICMP code | n/a
|--icmp_type| filter ICMP type | n/a
|--node-selector| capture on specific nodes | n/a
|--peer_ip| filter peer IP | n/a
|--peer_cidr| filter peer CIDR | n/a
|--port_range| filter port range | n/a
|--port| filter port | n/a
|--ports| filter on either of two ports | n/a
|--protocol| filter protocol | n/a
|--regexes| filter flows using regular expression | n/a
|--sport_range| filter source port range | n/a
|--sport| filter source port | n/a
|--sports| filter on either of two source ports | n/a
|--tcp_flags| filter TCP flags | n/a
|--interfaces| interfaces to monitor | n/a
|--icmp_code| filter ICMP code | -
|--icmp_type| filter ICMP type | -
|--node-selector| capture on specific nodes | -
|--peer_ip| filter peer IP | -
|--peer_cidr| filter peer CIDR | -
|--port_range| filter port range | -
|--port| filter port | -
|--ports| filter on either of two ports | -
|--protocol| filter protocol | -
|--regexes| filter flows using regular expression | -
|--sport_range| filter source port range | -
|--sport| filter source port | -
|--sports| filter on either of two source ports | -
|--tcp_flags| filter TCP flags | -
|--interfaces| interfaces to monitor | -
|===

.Example running metrics capture for TCP drops:
.Example running metrics capture for TCP drops
[source,terminal]
----
$ oc netobserv metrics --enable_pkt_drop=true --enable_filter=true --protocol=TCP
$ oc netobserv metrics --enable_pkt_drop --enable_filter --protocol=TCP
----
13 changes: 7 additions & 6 deletions scripts/generate-doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "// Automatically generated by '$0'. Do not edit, or make the NETOBSERV tea
[id=\"network-observability-netobserv-cli-reference_{context}\"]
= Network Observability CLI usage

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\`.
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.

[id=\"cli-syntax_{context}\"]
== Syntax
Expand Down Expand Up @@ -75,14 +75,14 @@ echo "
.Example running flows capture on TCP protocol and port 49051 with PacketDrop and RTT features enabled:
[source,terminal]
----
$ 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
$ oc netobserv flows --enable_pkt_drop --enable_rtt --enable_filter --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
----"

# packets table
echo "[id=\"cli-reference-packet-capture-options_{context}\"]
== Packets capture options
You can filter packets capture data as same as flows capture using the filters.
Note that the features, such as packets drop, DNS, RTT, and network events, are only available for flows and metrics capture.
You can filter packets capture data the as same as flows capture by using the filters.
Certain features, such as packets drop, DNS, RTT, and network events, are only available for flows and metrics capture.

.\`oc netobserv packets\` syntax
[source,terminal]
Expand Down Expand Up @@ -122,10 +122,10 @@ specific_filters_usage
echo -e "|==="
# Metrics example
echo "
.Example running metrics capture for TCP drops:
.Example running metrics capture for TCP drops
[source,terminal]
----
$ oc netobserv metrics --enable_pkt_drop=true --enable_filter=true --protocol=TCP
$ oc netobserv metrics --enable_pkt_drop --enable_filter --protocol=TCP
----"
} >> $ADOC

Expand All @@ -134,6 +134,7 @@ sed -i.bak "s/ */ /" $ADOC
# add table rows
sed -i.bak "/^ /s/ --*/|--/" $ADOC
# add table columns
sed -i.bak "/^|/s/(default: n\/a/| -/" $ADOC # replace n/a by - in the docs
sed -i.bak "/^|/s/(default:/|/" $ADOC
sed -i.bak "/^|/s/: /|/" $ADOC
sed -i.bak "/^|/s/)//" $ADOC
Expand Down
2 changes: 1 addition & 1 deletion scripts/help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function features_usage {
echo " --enable_pkt_drop: enable packet drop (default: false)"
echo " --enable_rtt: enable RTT tracking (default: false)"
echo " --enable_udn_mapping: enable User Defined Network mapping (default: false)"
echo " --get-subnets: get subnets informations (default: false)"
echo " --get-subnets: get subnets information (default: false)"
}

# collector options
Expand Down