Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 2. Assessing and filtering your inventory


Assessing and filtering your inventory will help you identify and eliminate security, operations, and business risks in your fleet.

2.1. Inventory Application Programming Interface (API)

Red Hat Insights provides a set of APIs that you can use to interact with specific Insights for Red Hat Enterprise Linux applications, to obtain system details and recommendations.

We have designed our APIs to ensure the security of your data. All Insights APIs are Representational State Transfer (REST) APIs. REST APIs are stateless. Statelessness means that servers do not save client data between requests. Our APIs also use token-based authentication, which provides granular control over access permissions and enhances security.

Review the following resources to learn more about how you can use the inventory API to locate information, enact edits, and automate repetitive tasks:

Additional Resources

For more information about Red Hat Insights API, see the Red Hat Insights API reference guide: API Catalog

For more information about getting started with Red Hat Insights API, see the Red Hat Insights API cheat sheet: Insights API cheat sheet

For more information about the inventory API, see Managed Inventory: Managed Inventory API

2.2. Refining your view of systems in inventory

There are several ways to refine your inventory view to help you focus on the issues and systems that matter the most. You can filter by Name, Status, Operating System, Data Collector, remote host configuration status, Last seen, Workspace, or Tags. Follow the procedure below to filter your systems:

Prerequisites

  • You have Inventory Hosts viewer access.

Procedure

  1. Navigate to Red Hat Insights > RHEL > Inventory > Systems page.
  2. Click the Name filter drop-down. Choose an option from the drop-down menu, such as Name, Status, Operating System, Data Collector, RHC status, Last seen, Workspace or Tags.
  3. Select additional filters within your query. For example, if you chose the Operating System filter, click Filter by operating system in the header to choose a specific version of RHEL.
  4. Click the checkbox next to the RHEL version you want to filter.
  5. Optional: To add multiple filters to your query, click an additional filter (such as Data Collector). A second drop-down appears to the right of the Data Collector filter, called Filter by data collector.
  6. Choose the desired data collector. This first filter then appears just below the header. If desired, choose a second filter. You can apply all 8 available filters to your query.
  7. Click Reset filters to clear your query.

Additional Resources

For information about global filters, see the following:

System filtering and groups

2.3. Assigned system display names

Each system in your Red Hat Insights environment has an assigned display name that identifies that system within the Red Hat Hybrid Cloud Console. There are two ways to assign a display name to a system:

  • Automatically — Red Hat Insights inventory assigns a default name to the system. Red Hat Insights receives the default name from a data collector, such as Red Hat Subscription Manager (RHSM), and applies it to the system.
  • Manually — You create the display name and manually apply it to the system.

Once a system has an assigned display name, that name persists in the Red Hat Hybrid Cloud Console. Another application cannot overwrite the display name.

A data collector is a specific application or service responsible for sending host information, updates, or system profile data to Red Hat Insights inventory. For example, Red Hat Subscription Manager (RHSM) and Red Hat Satellite act as data collectors for Red Hat Insights.

A data collector can provide a default display name to Red Hat Insights during registration or a registration update. If the data collector does not provide a default name, Red Hat Insights uses the system fully qualified domain name (FQDN) as a default display name.

Each data collector that interacts with Red Hat Insights has an assigned priority. Red Hat Insights inventory uses the display name provided by the data collector with the highest priority. That means that the display name reported by a higher priority data collector overrides the display name set by a data collector with a lower priority.

Important

Red Hat Insights ignores a display name provided by a lower priority data collector if a higher priority data collector has already set the display name. The system always shows the display name from the highest priority data collector and ignores the rest.

The following table shows the data collectors in order of priority.

Expand
PriorityData CollectorDescription

1

Red Hat Insights UI, insights-client, or manual API request

Manually assigned display names have the highest priority.

2

rhsm-system-profile-bridge or system-conduit

These RHSM data collectors mirror display names from RHSM to Red Hat Insights. system-conduit is involved in updates. It runs nightly every 24 hours.

3

default (any other data collector)

Default priority for all non-specific data collectors that provide a display name, such as Red Hat Discovery Tool or Red Hat Satellite.

4

no data collector

If no data collector provides a default display name, Red Hat Insights automatically assigns the Fully Qualified Domain Name (FQDN) as the system display name.

Additional resources

2.3.2. Manually assigning a system display name

System display names that you assign receive the highest priority. This means that lower priority data collectors cannot override names that you set manually.

Procedure

  • Navigate to Red Hat Insights RHEL Inventory Systems. The Systems page displays a list of all of the systems in your environment.
  • Click on the More options icon (⋮) for the system for which you want to set the display name.
  • Select Edit display name from the drop-down menu. The Edit display name dialog box displays.
  • Enter the name you want to assign to the system.
  • Click Save to save the new display name.
  • To use the inventory API to set the system display name, issue the PATCH /hosts/{host_id_list} API call. For more information about using an API call, see the hosts section in the Red Hat Insights host inventory API catalog.

Red Hat Insights can identify systems that communicate through a proxy server. This helps you to ensure that all systems are routed through the proxy server in disconnected environments. You can manage connectivity in your environment from a single point.

When you use the configure-client.sh script to configure systems to use the Insights proxy, the script uses the Insights system tagging capability to identify the proxy server on the client systems. For more information about how to run the configure-client.sh script, see Configuring client systems.

Note

The script adds an entry in the /etc/insights-client/tags.yaml file on the client system that tags the proxy server. The entry takes the following format:

insights-proxy: <rhproxy-hostname>
Copy to Clipboard Toggle word wrap

For example, a client system that connects to the server myproxy.example.com could have the following line added to the tags.yaml file. In this example, myproxy.example.com has the hostname myproxy-example in Insights inventory.

insights-proxy: myproxy-example
Copy to Clipboard Toggle word wrap

When a client system uses a proxy server to communicate with Insights, you can view the proxy server in inventory in the Hybrid Cloud Console. The Filter by tags filter displays the proxy server tag grouped under the insights-client heading. You can select the proxy server tag to view the client systems connected to it. For more information about how tagging works, see Custom system tagging.

Important

After you configure the client system to use a proxy server, insights-client must perform an upload to Insights before the server can be identified by tag in inventory.

Note

If the proxy server for a client changes, re-run the configure-client.sh script. The script correctly handles the reconfiguration entry in the /etc/insights-client/tags.yaml file.

If you decide to stop using the Insights proxy, see Unconfiguring client systems when you want to disable the Insights proxy. Unconfiguring the client system removes the system tags that connect to the proxy server.

Important

After you unconfigure the client system to disable the connection to the proxy server, insights-client must perform an upload to Insights before its system tags are updated in inventory.

Once you have configured an Insights client system to use a proxy server, you can identify the system by its tag in the Hybrid Cloud Console. The insights-proxy tag also indicates the Insights proxy to which the system is connected.

Prerequisites

  • You have user permissions for the client systems in inventory.
  • The client systems are configured to communicate with Insights through the proxy server. For more information about the configuration script, see Configuring client systems.

Procedure

  1. On the Hybrid Cloud Console, navigate to Inventory > Systems. The list of systems displays.
  2. Select the client system you want to view. The client system name displays in a pop-up.
  3. Click the tag icon to the right of the system name. The tag icon links to a list of all system tags associated with the selected client system. This list includes the insights-proxy tag, along with the Insights proxy server hostname that the system uses.

You can use the inventory API to identify Insights proxy servers in your environment. You can also use API calls to identify Insights client systems that use a specified proxy server to communicate.

For step-by-step instructions about how to authenticate and query the inventory API, download the Red Hat Insights API Cheat Sheet.

Note

You must have login access to developers.redhat.com to access the API cheat sheet.

For information about how to make API calls, see Making API calls.

Prerequisites

  • You have authenticated to the inventory API.

Procedure

  • To obtain a list of deployed Insights proxy servers in your environment, use the following API call:
GET /api/inventory/v1/tags?search=insights-client/insights-proxy
Copy to Clipboard Toggle word wrap
  • To view the list of Insights client systems configured to use a specific proxy server, use the following API call. Substitute the name of the proxy server for <rhproxy-hostname>.
GET /api/inventory/v1/hosts?tags=insights-client/insights-proxy=<rhproxy-hostname>
Copy to Clipboard Toggle word wrap

2.5. Connecting image-based systems to inventory

Red Hat Insights unifies all system types into a single, streamlined view. You can view and manage RPM (package mode), image mode, and OSTree-based systems from the same page in inventory. Red Hat Insights also includes filters that you can use to select and display image-based systems.

You can connect an image-based system to Red Hat Insights in the following ways:

  • Connect automatically during image building
  • Use rhc (Remote host configuration) to connect manually
  • Use Red Hat Satellite to register the system

You can automatically connect an image-based RHEL system to Insights during the image building process. This method involves pre-configuring the image so that when the image-based system is deployed and boots for the first time, it automatically registers with Remote Host Configuration (rhc).

To connect an image-based system to Insights, add an activation key to your build configuration. See https://gitlab.com/fedora/bootc/examples/-/tree/main/insights for sample code and examples.

If your image-based system is directly connected to Red Hat services or connects through a proxy server, use rhc to connect the system to Insights.

Prerequisites

Procedure

  • Use the following rhc command to configure the connection and register your system to Insights. Substitute the activation key for <AK> and your Organization ID for <org_id>.

    # rhc connect -s <AK> -o <org_id>
    Copy to Clipboard Toggle word wrap

2.5.3. Using Red Hat Satellite to register image-based systems

Use your preferred registration method to register your image-based system with Red Hat Satellite. For more information about registration methods, see Registration methods.

For more information about how to register systems, see Registering hosts and setting up host integration.

For more information about how to use global registration, see Registering hosts by using global registration.

Important

Make sure that Insights registration is enabled in Satellite before you generate the registration command. Select Hosts Register Host Advanced and make sure that Set up Insights is enabled.

2.5.4. Viewing image-based systems in inventory

Use the Image-based system filter to view image-based systems in inventory. To show details for a system, click on the system name. The System Details page includes the image URL and its corresponding hash value.

The bootc panel on the System Details page shows information about the following:

  • Booted image
  • Booted image digest
  • Staged image
  • Staged image digest
  • Available image
  • Available image digest
  • Rollback image
  • Rollback image digest

For more information about viewing and managing image-based systems, see Managing image mode in Red Hat Insights.

Prerequisites

Procedure

  1. Navigate to Inventory Systems.
  2. Select Filter by System type from the Filter drop-down, and then select Image-based system. This displays all of the image-based systems in inventory.
  3. Click on the name of the system you want to view. The System Details page for that system displays.

2.5.5. Adding an image-based system to a workspace

Prerequisites

  • You have created a workspace in inventory.

Procedure

  1. Navigate to Inventory Workspaces and select a workspace.
  2. Click Add systems. The Add systems dialog box displays.
  3. Use the filters to locate the system you want to add.
  4. Select the checkbox next to the name of the system you want to add.
  5. Click Add systems. The console responds with a success message.
  6. Click Refresh to view the system in the workspace.

2.6. Deleting systems from inventory

When a system is obsolete or decommissioned, you might choose to remove it from inventory. Use the following procedure to do so:

Prerequisites

  1. You have Inventory Hosts administrator access.

Procedure

  1. Navigate to Red Hat Insights > RHEL > Inventory > Systems page.
  2. Check the box to the left of the system(s) you want to remove.
  3. Click the Delete button to the right of the filter. A Delete from Inventory confirmation dialog box appears.
  4. Click Delete to confirm this action.

A message box appears in the upper right corner of the screen, stating that the delete operation initiated. When the deletion is complete, a message box confirms that deletion was successful.

Important

The selected system(s) will be removed from ALL console.redhat.com applications and services.

Note

A system might reappear in inventory if data collectors are uploading data from systems that are still registered and subscribed. Refer to the documentation for the specific data collector(s) to determine how to permanently unregister or unsubscribe.

Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat