Self-hosted troubleshooting

The runZero console includes a diagnostics collection script inspired by the need to troubleshoot a self-hosted environment. Collecting the necessary performance statistics, log files, system configuration, and profile debug capture was difficult for customers since there are many different commands and files involved. After checking permissions and dependencies, the diagnostic script gathers and compresses troubleshooting data into a convenient archive file that can be provided to runZero support. The script provides a consistent method for data collection whether it be from a system running your self-hosted console or an Explorer.

Requirements

The diagnostic script must be run from a Linux system. Additionally, the following dependencies must be installed for the script to run successfully:

Dependency To install (Ubuntu) To install (RHEL, CentOS, Fedora, Oracle Linux)
zip apt install zip dnf install zip
unzip apt install unzip dnf install unzip
lsscsi apt install lsscsi dnf install lsscsi
iostat apt install sysstat dnf install sysstat
curl apt install curl dnf install curl

The script must be run as root or with sudo in order to gather information from the system files and the /opt/runzero and /etc/runzero directories.

Running the script

Using runzeroctl

To run the script via the runzeroctl command, use:

runzeroctl diagnostics run-script

Output will be placed in /opt/runzero/collector.

Manually

To run the script manually, use the command below to write a copy of the script to the current directory:

runzeroctl diagnostics write-script

The script will be written as runZero-collector.sh. To run it:

sudo ./runZero-collector.sh

The script also has a --help option.

This script will perform the following tasks:

  • Check for the required permissions.
  • Check for the dependency commands (lsscsi / zip / unzip/ iostat / curl).
  • Check that the operating system is Linux.
  • Check that either a runZero Explorer or runZero console is installed.
  • Collect system configuration information.
  • Collect system performance statistics.
  • Collect database configuration information.
  • Collect some basic statistics from the database.
  • Collect runZero debug information from the console or log files from the Explorer.
  • Create a zip file of the data collected and the log from the script.

Logging

The script will log all actions in /tmp and will provide the file name. Upon completion the log file is moved to the /opt/runzero/collector directory. This directory does not exist with the installation of a runZero Explorer or runZero console. The script will create the directory if it doesn’t exist and place all files into that directory.

Updated