osdctl icon indicating copy to clipboard operation
osdctl copied to clipboard

Add example and description for the dynatrace command

Open feichashao opened this issue 1 year ago • 2 comments

As a first-time user of the command osdctl cluster dynatrace, I would like to know the expected behavior of these commands in the help text.

This PR adds examples and long descriptions of the dynatrace commands.

feichashao avatar Aug 12 '24 07:08 feichashao

@mjlshen Thanks for reviewing!

Made some changes in the new commit, now the output looks like,

$ osdctl cluster dt logs -h       
Fetch logs from Dynatrace and display the logs like oc logs.

  This command also prints the Dynatrace URL and the corresponding DQL in the output.

Usage:
  osdctl cluster dynatrace logs <cluster-id> [flags]

Examples:

  # Get the logs of HCP cluster hcp-cluster-id-123.
  # Specify to get the logs of the pod alertmanager-main-0 in namespace openshift-monitoring
  osdctl cluster dynatrace logs hcp-cluster-id-123 --namespace openshift-monitoring --pod alertmanager-main-0

and

$ osdctl cluster dt gather-logs -h      
Gathers pods logs and evnets of a given HCP from Dynatrace.

  This command fetches the logs from the HCP namespace, the hypershift namespace and cert-manager related namespaces.
  Logs will be dumped to a directory with prefix hcp-must-gather.

Usage:
  osdctl cluster dynatrace gather-logs <cluster-id> [flags]

Aliases:
  gather-logs, gl

Examples:

  # Gather logs for a HCP cluster with cluster id hcp-cluster-id-123
  osdctl cluster dynatrace gather-logs hcp-cluster-id-123


feichashao avatar Aug 29 '24 08:08 feichashao

@feichashao: 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.

openshift-ci[bot] avatar Aug 29 '24 09:08 openshift-ci[bot]

/label tide/merge-method-squash

mjlshen avatar Aug 29 '24 12:08 mjlshen

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feichashao, mjlshen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Aug 29 '24 12:08 openshift-ci[bot]