Self-hosted troubleshooting

View as Markdown

The runZero console includes a diagnostics collection script that gathers the performance statistics, log files, system configuration, and profile debug capture needed to troubleshoot a self-hosted environment, then compresses them into one archive you can send to runZero support. Collecting that data by hand means running many different commands and finding many files. The script checks permissions and dependencies first, and it works the same way on a system running your self-hosted console or an Explorer.

Requirements

Run the script on a Linux system with these dependencies installed:

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

Run it as root or with sudo so it can read the system files and the /opt/runzero and /etc/runzero directories.

Running the script

Using runzeroctl

To run the script through runzeroctl, use:

runzeroctl diagnostics run-script

Output goes to /opt/runzero/collector.

Manually

To run the script by hand, first write a copy of it to the current directory:

runzeroctl diagnostics write-script

The copy is named runZero-collector.sh. Run it with:

sudo ./runZero-collector.sh

The script also has a --help option.

The script performs these 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 logs every action to a file in /tmp and tells you the file name. When it finishes, it moves the log into the /opt/runzero/collector directory. Installing a runZero Explorer or runZero console doesn’t create that directory, so the script creates it if needed and places all of its files there.

Updated