Chapter 10. Run and manage deep scans
After you add sources and credentials for the parts of your IT infrastructure that you want to scan, you can begin running scans. In a few situations, running standard scans is not sufficient to find the environment and product data that is required to report on your Red Hat products.
By default, Red Hat Discovery searches for and fingerprints products by using known metadata that relates to those products. However, it is possible that you have installed these products with a process or in an installation location that makes the search and fingerprinting algorithms less effective. In that case, you need to use deep scanning to find those products.
10.1. Run scans with deep scanning Copy linkLink copied to clipboard!
Run a deep scan to detect products installed in nonstandard locations. Deep scans use the find command and can be CPU-intensive, so use discretion on production systems. After you run a scan for the first time, the scan is saved to the Scans view. From that view, you can run the scan again to update its data.
Prerequisites
- You have added the sources that you want to scan and the credentials to access those sources.
Procedure
- From the Sources view, select one or more sources. You can select sources of different types to combine them into a single scan.
Click the Scan button that is appropriate for the selected sources:
- For a single source, click Scan on the row for that source. Selecting the check box for the source is optional.
- If you selected multiple sources, click Scan in the toolbar.
The Scan wizard opens.
- In the Name field, enter a descriptive name for the scan.
- If you want to change the default number of maximum concurrent scans, set a new value in the Maximum concurrent scans field. This value is the maximum number of physical machines or virtual machines that are scanned in parallel during a scan.
To use the deep scanning process on one or more products, supply the following information:
- Select the applicable Deep scan for these products check boxes.
-
Optional: Enter the directories that you want Discovery to scan. The default directories that are used in a deep scan are the
/,/opt,/app,/home, and/usrdirectories.
- To begin the scan process, click Scan.
Verification
When the scan process begins, a notification displays in the Sources view. The running scan also displays in the Scans view, with a message about the progress of the scan.
10.2. Run a new scan job Copy linkLink copied to clipboard!
After you name a scan and run it for the first time, it is added to the Scans view. You can then run a new instance of that scan, known as a scan job, to update the data that is gathered for that scan.
Procedure
From the Scans view, click the Run Scan icon in the scan details.
NoteIn the scan details, if the most recent scan job did not complete successfully, this icon is labeled Retry Scan.
Verification
When the scan process begins, a notification displays with a message about the progress of the scan. If you want to view a completed scan, you can view the scan details and expand Previous to view all previous scan jobs.
10.3. Cancel scans Copy linkLink copied to clipboard!
Cancel a running scan job to free system resources or address higher-priority operational needs.
Procedure
- From the Scans view, find the scan that contains the scan job that you want to cancel.
- Click Cancel Scan.
Verification
- In the Scans view, verify that the scan job status shows as canceled.
10.4. Delete scans Copy linkLink copied to clipboard!
Deleting a scan is a nonreversible action that deletes the scan and all scan jobs for that scan. Deleted scans cannot be retrieved.
Prerequisites
- A scan has been run and is displayed in the Scans navigation.
Procedure
- From the navigation, click Scans.
- Find the row that contains the scan that you would like to delete.
- Click the Delete icon for that row.
Verification
- In the Scans view, verify that the deleted scan no longer appears in the scans list.
10.5. Scans and scan jobs Copy linkLink copied to clipboard!
After you create sources and credentials, you can create scans. A scan groups sources into a reproducible inspection unit. Each time a saved scan runs, that instance is stored as a scan job. The output of a scan job is a report containing the facts gathered for all IT resources in the scanned sources.
A scan includes at least one source and the credentials that were associated with that source at source creation time. When the scan job runs, it uses the provided credentials to contact the assets contained in the source. It then inspects the assets to gather facts about those assets for the report. You can add multiple sources to a single scan, including a combination of different types of sources into a single scan.
Currently, you cannot combine a OpenShift source with any other type of source in a scan. However, a single OpenShift scan can contain multiple OpenShift sources, each of which is associated with a single cluster only.
10.6. Scan job inspection tasks Copy linkLink copied to clipboard!
A scan job manages one or more inspection tasks that gather data from systems defined in the scan’s sources. These tasks handle all aspects of connecting to systems and collecting information needed to generate the scan’s reports.
When a scan job runs, Discovery creates an inspection task for each source assigned to the scan. Each inspection task connects to systems defined by its source and collects facts that Discovery uses to produce the scan’s reports.
If a source includes multiple systems, the inspection task attempts to connect to and inspect each one. If some systems are unreachable, the task records partial results based on the systems it was able to inspect.
In scans with multiple sources, each source’s inspection task runs independently of the inspection tasks for other sources. A scan job is marked as completed only if all inspection tasks across all sources finish successfully. If any inspection task fails or cannot connect to any systems in its source, the scan job is marked as failed.
10.7. Scan job life cycle Copy linkLink copied to clipboard!
A scan job, or individual instance of a scan, moves through several states during its life cycle.
When you start a scan, a scan job is created and the scan job is in the created state. The scan job is then queued for processing and the scan job transitions to the pending state. Scan jobs run serially, in the order that they are started.
As the Discovery server reaches a specific scan job in the queue, that scan job transitions from the pending state to the running state as the processing of that scan job begins. If the scan process completes successfully, the scan job transitions to the completed state and the scan job produces results that can be viewed in a report. If the scan process results in an error that prevents successful completion of the scan, the scan job halts and the scan job transitions to the failed state. An additional status message for the failed scan contains information to help determine the cause of the failure.
Other states for a scan job result from user action that is taken on the scan job. You can pause or cancel a scan job while it is pending or running. A scan job in the paused state can be resumed. A scan job in the canceled state cannot be resumed.