Chapter 5. Debugging issues
Central saves information to its container logs.
5.1. Prerequisites Copy linkLink copied to clipboard!
You have configured the
ROX_ENDPOINTenvironment variable using the following command:export ROX_ENDPOINT=<host:port>
$ export ROX_ENDPOINT=<host:port>1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The host and port information that you want to store in the
ROX_ENDPOINTenvironment variable.
5.2. Viewing the logs Copy linkLink copied to clipboard!
You can use either the oc or kubectl command to view the logs for the Central pod.
Procedure
To view the logs for the Central pod by using
kubectl, run the following command :kubectl logs -n stackrox <central_pod>
$ kubectl logs -n stackrox <central_pod>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To view the logs for the Central pod by using
oc, run the following command :oc logs -n stackrox <central_pod>
$ oc logs -n stackrox <central_pod>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Viewing the current log level Copy linkLink copied to clipboard!
You can change the log level to see more or less information in Central logs.
Procedure
Run the following command to view the current log level:
roxctl central debug log
$ roxctl central debug logCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.4. Changing the log level Copy linkLink copied to clipboard!
Procedure
Run the following command to change the log level:
roxctl central debug log --level=<log_level>
$ roxctl central debug log --level=<log_level>1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The acceptable values for
<log_level>arePanic,Fatal,Error,Warn,Info, andDebug.
5.5. Retrieving debugging information Copy linkLink copied to clipboard!
Procedure
Run the following command to gather the debugging information for investigating issues:
roxctl central debug dump
$ roxctl central debug dumpCopy to Clipboard Copied! Toggle word wrap Toggle overflow - To generate a diagnostic bundle with the RHACS administrator password or API token and central address, follow the procedure in Generating a diagnostic bundle by using the roxctl CLI.
5.6. roxctl central debug command overview Copy linkLink copied to clipboard!
Debug the Central service.
Usage
roxctl central debug [flags]
$ roxctl central debug [flags]
5.6.1. roxctl central debug command options inherited from the parent command Copy linkLink copied to clipboard!
The roxctl central debug command supports the following options inherited from the parent roxctl command:
| Option | Description |
|---|---|
|
|
Specify a custom CA certificate file path for secure connections. Alternatively, you can specify the file path by using the |
|
|
Set |
|
|
Set the endpoint for the service to contact. Alternatively, you can set the endpoint by using the |
|
|
Force the use of HTTP/1 for all connections. Alternatively, by setting the |
|
|
Enable insecure connection options. Alternatively, by setting the |
|
|
Skip the TLS certificate validation. Alternatively, by setting the |
|
|
Disable the color output. Alternatively, by setting the |
|
|
Specify the password for basic authentication. Alternatively, you can set the password by using the |
|
|
Use an unencrypted connection. Alternatively, by setting the |
|
|
Set the TLS server name to use for SNI. Alternatively, you can set the server name by using the |
|
|
Use the API token provided in the specified file for authentication. Alternatively, you can set the token by using the |
These options are applicable to all the sub-commands of the roxctl central debug command.
5.6.2. roxctl central debug db Copy linkLink copied to clipboard!
Control the debugging of the database.
Usage
roxctl central debug db [flags]
$ roxctl central debug db [flags]
| Option | Description |
|---|---|
|
|
Specify the timeout for API requests representing the maximum duration of a request. The default value is |
5.6.3. roxctl central debug log Copy linkLink copied to clipboard!
Retrieve the current log level.
Usage
roxctl central debug log [flags]
$ roxctl central debug log [flags]
| Option | Description |
|---|---|
|
|
Specify the log level to which you want to set the modules. Valid values include |
|
| Specify the modules to which you want to apply the command. |
|
|
Specify the timeout after which API requests are retried. A value of zero means that the entire request duration is waited for without retrying. The default value is |
|
|
Specify the timeout for API requests, which is the maximum duration of a request. The default value is |
5.6.4. roxctl central debug dump Copy linkLink copied to clipboard!
Download a bundle containing the debug information for Central.
Usage
roxctl central debug dump [flags]
$ roxctl central debug dump [flags]
| Option | Description |
|---|---|
|
|
If set to |
|
| Specify the output directory for the bundle content. The default value is an automatically generated directory name within the current directory. |
|
|
Specify the timeout for API requests, which is the maximum duration of a request. The default value is |
5.6.5. roxctl central debug db stats Copy linkLink copied to clipboard!
Control the statistics of the Central database.
Usage
roxctl central debug db stats [flags]
$ roxctl central debug db stats [flags]
5.6.6. roxctl central debug authz-trace Copy linkLink copied to clipboard!
Enable or disable authorization tracing in Central for debugging purposes.
Usage
roxctl central debug authz-trace [flags]
$ roxctl central debug authz-trace [flags]
| Option | Description |
|---|---|
|
|
Specify the timeout for API requests representing the maximum duration of a request. The default value is |
5.6.7. roxctl central debug db stats reset Copy linkLink copied to clipboard!
Reset the statistics of the Central database.
Usage
roxctl central debug db stats reset [flags]
$ roxctl central debug db stats reset [flags]
5.6.8. roxctl central debug download-diagnostics Copy linkLink copied to clipboard!
Download a bundle containing a snapshot of diagnostic information about the platform.
Usage
roxctl central debug download-diagnostics [flags]
$ roxctl central debug download-diagnostics [flags]
| Option | Description |
|---|---|
|
| Specify a comma-separated list of the Sensor clusters from which you want to collect the logs. |
|
| Specify the output directory in which you want to save the diagnostic bundle. |
|
| Specify the timestamp from which you want to collect the logs from the Sensor clusters. |
|
|
Specify the timeout for API requests, which specifies the maximum duration of a request. The default value is |