Chapter 10. Command options for insights-client

You can use the insights-client command and its options to control the Insights client operation on your system. Because the insights-client.rpm is updated less frequently than individual components in Insights, the man page might not include the most recent information about insights-client command operation.

As a system administrator with root privileges, each time you enter the insights-client command the client collects data and sends it to Red Hat Insights.

Note

Using the insights-client --display-name command to set the display name takes effect immediately but does not run the Insights client.

Table 10.1. insights-client user command options

OptionDescription

--help

-h

Display help information

--register

Register the host to Insights using the information in /etc/hostname. Will automatically enable the nightly cron job unless --disable-schedule is set.

--unregister

Unregister the host from Insights.

--display-name=DISPLAY_NAME

Set or change the host display name in the GUI. Use with --register to set a display_name when the host is registered if you want a different name than is in /etc/hostname.

--group=GROUP

Add host to GROUP during registration. Group names are defined in /etc/insights-client/tags.yaml

--retry=RETRIES

Set the number of times to retry an upload. The default is 1. The retry interval is 180 seconds, which is how long the Insights client waits until retrying the upload.

NOTE: In the scheduler, the number of retries is 3.

--validate

Validate the structure of the /etc/insights-client/remove.conf file.

--quiet

Only log error messages to console.

--silent

Log nothing to console.

--enable-schedule

Enable the job schedule. By default, the Insights client runs daily, at or near midnight.

NOTE: If you are using Client 1.x, use the --register option to enable the schedule.

--disable-schedule

Disable the nightly job schedule.

--conf=CONF

-c=CONF

Use a custom configuration file CONF instead of the default /etc/insights-client/insights-client.conf file.

--compressor

Select the compressor that is used when creating the archive. Available options are gz, bz2, xz, none. Defaults to gz. The none option creates a tar file with no compression.

--no-upload

Runs the client but does not upload the archive to Red Hat Insights or CMSfR web application. The archive is stored in the /var/tmp/ directory. The file name is displayed when insights-client completes.

--offline

Run the client without using network functionality. Implies --no-upload.

--logging-file=LOGFILE

Output the log data to the specified LOGFILE. The default log file is /var/log/insights-client/insights-client.log.

--diagnosis

Fetch diagnostic information from the API. The system must be registered and uploaded at least once before using --diagnosis.

--compliance

Scan the system with OpenSCAP and upload the report.

--payload=PAYLOAD

Upload a specific archive PAYLOAD file to Red Hat Insights. Requires --content-type.

--content-type=TYPE

Set the content-type for the PAYLOAD file. Type can be gz, bz2, xz, and none. The TYPE must match the --compressor used with the PAYLOAD.

--check-results

Retrieve analysis results from Red Hat Insights.

--show-results

Display analysis results fetched by --check-results.

--output-dir=DIR

Write collection to a specified directory instead of uploading.

--output-file=FILE

Write collection to a specified archive instead of uploading.

The insights-client command has several options that are useful when debugging its operation.

Table 10.2. insights-client debug options

OptionDescription

--version

Print the versions of insights-client Client and Core.

--test-connection

Test connectivity to the Red Hat Insights services.

--force-reregister

Re-register the system with Insights and use a new ID. This action duplicates an already-registered system.

--verbose

Log all debug output to the console.

--no-upload

Runs the client but does not upload the archive. The archive is stored in the /var/tmp/ directory. The file name is displayed when insights-client completes.

--keep-archive

Keep the archive after uploading.

--support

Generate a diagnostic log for support.

--status

Display host registration status.

--net-debug

Log network calls to the console.