SUSE Support

Here When You Need Us

How to collect Rancher Diagnostic Package

This document (000021310) is provided subject to the disclaimer at the end of this document.

Environment

Rancher v2.7.x+

Situation

During troubleshooting with Rancher Support, you may be requested to provide a Rancher Diagnostic Package. A Rancher Diagnostic Package contains performance-related data, including the count of resources within clusters managed by a Rancher instance, and the time taken to retrieve these, in order to aid issue investigation by Rancher Support and Engineering.

Resolution

From the Hamburger menu in the top-left of the Rancher UI click About -> Diagnostics -> Download Diagnostics Package

  •  About -> Diagnostics:

 

  •  Download Diagnostic Package:
  •  Click Generate Response Times and Download Diagnostic Package:
  • The generated Rancher Diagnostic Package will be downloaded in your browser, which you can then share with Rancher Support via your support case.

Additional Information

If you are interested in analysing the data yourself you can run a few jq commands against the json data in the resulting diagostic package. 

You will need jq installed, a JSON processor detailed here: https://jqlang.github.io/jq/

You can then run the following selection of common jq queries on the diagnostic data. 

Top 10 resources in the local cluster:

jq '.resourceCounts[-1].counts[0:10][] | "\(.resource): \(.count)"' < *rancher-diagnostic-data.json

Total resources in the local cluster:

jq '[.resourceCounts[-1].counts[].count] | add'

CRD count in the local cluster:

jq '.resourceCounts[-1].counts[] | select(.resource == "apiextensions.k8s.io.customresourcedefinition") | "\(.resource): \(.count)"' <  *rancher-diagnostic-data.json

Secrets across upstream and all downstream clusters:

jq '[.resourceCounts[].counts[] | select(.resource == "secret") | .count] | add ' <  *rancher-diagnostic-data.json

Total Rancher users:

jq '.resourceCounts[-1].counts[] | select(.resource == "management.cattle.io.user")'  < *rancher-diagnostic-data.json

Total downstream cluster count:

jq '[.resourceCounts[].id] | length - 1' <  *rancher-diagnostic-data.json

 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021310
  • Creation Date: 27-Dec-2023
  • Modified Date:23-Oct-2024
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.