Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSDOCS-10730: NetObserv 1.8 CLI reference #86824

Open
wants to merge 1 commit into
base: no-1.8
Choose a base branch
from

Conversation

skrthomas
Copy link
Contributor

@skrthomas skrthomas commented Jan 8, 2025

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 8, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 8, 2025

@skrthomas: This pull request references OSDOCS-10730 which is a valid jira issue.

In response to this:

Version(s):

Issue:

https://issues.redhat.com/browse/OSDOCS-10730
Link to docs preview:

QE review:

  • QE has approved this change.

Additional information:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 8, 2025
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Jan 8, 2025

@@ -72,18 +70,18 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
|--icmp_type| filter ICMP type | n/a
|--icmp_code| filter ICMP code | n/a
|--peer_ip| filter peer IP | n/a
|--drops| filter flows with only dropped packets | false
|--regexes| filter flows using regex | n/a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] RedHat.TermsErrors: Use 'regular expression' rather than 'regex'. For more information, see RedHat.TermsErrors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can expand this to "regular expression"

@@ -114,10 +115,57 @@ $ oc netobserv packets [<option>]
|--icmp_type| filter ICMP type | n/a
|--icmp_code| filter ICMP code | n/a
|--peer_ip| filter peer IP | n/a
|--drops| filter flows with only dropped packets | false
|--regexes| filter flows using regex | n/a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] RedHat.TermsErrors: Use 'regular expression' rather than 'regex'. For more information, see RedHat.TermsErrors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we expand to regular expression?

|--node-selector| capture on specific nodes | n/a
|--enable_filter| enable flow filter | false
|--direction| filter direction | n/a
|--cidr| filter CIDR | 0.0.0.0/0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] RedHat.CaseSensitiveTerms: Use 'CIDR' rather than 'cidr'. For more information, see RedHat.CaseSensitiveTerms.

|--icmp_code| filter ICMP code | n/a
|--peer_ip| filter peer IP | n/a
|--drops| filter flows with only dropped packets | false
|--regexes| filter flows using regex | n/a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] RedHat.TermsErrors: Use 'regular expression' rather than 'regex'. For more information, see RedHat.TermsErrors.

Copy link
Contributor Author

@skrthomas skrthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpinsonneau I left some comments for some things to adjust in the asciidoc source. We can talk about these further too if you have any questions or want to change anything.

= Network Observability CLI usage

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

[id="cli-syntax_{context}"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpinsonneau all the headings have to have a unique ID. Can we add the ones I have here just so there's not any future removal of them as we update the reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think last time I added these in peer review and didn't sync with the upstream. Its just a requirement for Pantheon docs builds.

Comment on lines -26 to +25
| Capture flows information. For subcommands, see the "Flows capture options" table.
| Capture flows information. For subcommands, see the "Flow capture subcommands" table.
| packets
| Capture packets data. For subcommands, see the "Packets capture options" table.
| Capture packets data. For subcommands, see the "Packet capture subcommand" table.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these two, can we revert back to "options" instead of "subcommands", or did you intend to change this? If its a change we want to make, then I can update the headings for those "Packet capture" and "Flow capture" sections.

Additionally, there's "Packets" vs "Packet". I think in previous releases, we've intentionally used the plural.

@@ -72,18 +70,18 @@ $ oc netobserv flows [<feature_option>] [<command_options>]
|--icmp_type| filter ICMP type | n/a
|--icmp_code| filter ICMP code | n/a
|--peer_ip| filter peer IP | n/a
|--drops| filter flows with only dropped packets | false
|--regexes| filter flows using regex | n/a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can expand this to "regular expression"

== Packets capture options
You can filter on port and protocol for packet capture data.
You can filter packet capture data as same as flow capture using the filters. However, the features are not available here.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can filter packet capture data as same as flow capture using the filters. However, the features are not available here.
You can filter packet capture data, the same as flow capture, using the filters. However, the features are not available here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "The features are not available here" mean? I'm a little confused. There is the --enable_filter option in the Packets captures options.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The features (pkt drop, dns, rtt and network events) are only available for flows and metrics capture.
The packet capture will return an error if you try to enable these.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, I got it sorry about that. Its THE features, not the filter. Sorry. I was focused too much on the "However" modifying the "filter" part of the preceding sentence but its about the "same as flow capture", noting that the features available in flow capture aren't available here. I suggest we could say that more explicitly, like:

Note that the features, such as packet drop, dns, rtt, and network events, are only available for flows and metrics capture

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks works for me ! Thanks for the feedback. I will open a PR to adress all of these changes

|--interfaces| interfaces to monitor | n/a
|===

.Example running flows capture on TCP protocol and port 49051 with PacketDrop and RTT features enabled:
.Example running flow capture on TCP protocol and port 49051 with PacketDrop and RTT features enabled:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another flow/flows question here.

@@ -114,10 +115,57 @@ $ oc netobserv packets [<option>]
|--icmp_type| filter ICMP type | n/a
|--icmp_code| filter ICMP code | n/a
|--peer_ip| filter peer IP | n/a
|--drops| filter flows with only dropped packets | false
|--regexes| filter flows using regex | n/a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we expand to regular expression?

[source,terminal]
----
$ oc netobserv packets --action=Accept --cidr=0.0.0.0/0 --protocol=TCP --port=49051
----
== Metrics capture options
You can enable features and use filters on metrics capture as same as flow capture. The generated graphs will fill accordingly.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can enable features and use filters on metrics capture as same as flow capture. The generated graphs will fill accordingly.
You can enable features and use filters on metrics capture, the same as flow capture. The generated graphs fill accordingly.

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

[id="cli-syntax_{context}"]
You can use the 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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can use the 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.
You can use the 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`.

Copy link

openshift-ci bot commented Jan 9, 2025

@skrthomas: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Comment on lines +35 to 36
Flow capture has mandatory commands as well as additional options, such as enabling extra features about packet drops, DNS latencies, Round-trip time, and filtering.
.`oc netobserv flows` syntax
Copy link
Contributor Author

@skrthomas skrthomas Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Flow capture has mandatory commands as well as additional options, such as enabling extra features about packet drops, DNS latencies, Round-trip time, and filtering.
.`oc netobserv flows` syntax
Flow capture has mandatory commands as well as additional options, such as enabling extra features about packet drops, DNS latencies, Round-trip time, and filtering.
.`oc netobserv flows` syntax

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a return here, otherwise the heading rendering is off:
image

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 9, 2025

@skrthomas: This pull request references OSDOCS-10730 which is a valid jira issue.

In response to this:

Version(s):

Issue:

https://issues.redhat.com/browse/OSDOCS-10730
Link to docs preview:

https://86824--ocpdocs-pr.netlify.app/openshift-enterprise/latest/observability/network_observability/netobserv_cli/netobserv-cli-reference.html
QE review:

  • QE has approved this change.

Additional information:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants