Chapter 5. System tags and groups

Red Hat Insights enables administrators to filter systems in inventory and in individual services using group tags. Groups are identified by the method of system data ingestion to Insights. Insights enables filtering groups of systems by those running SAP workloads, by Satellite host group, and by custom tags that are defined by system administrators with root access to configure the Insights client on the system.

Note

As of Fall 2020, Inventory, Advisor, Vulnerability, Patch, Drift, and Policies enable filtering by groups and tags. Other services will follow.

Use the global, Search tags box to filter by SAP workloads, Satellite host groups, or custom tags added to the Insights client configuration file.

inv search tags

Prerequisites

The following prerequisites and conditions must be met to use the tagging features in Red Hat Insights:

  • The Red Hat Insights client is installed and registered on each system.
  • To create custom tags, root permissions, or their equivalent, are required to add to or change the /etc/insights-client/tags.yaml file.

5.1. SAP workloads

As Linux becomes the mandatory operating system for SAP ERP workloads in 2025, Red Hat Enterprise Linux and Red Hat Insights are working to make Insights the management tool of choice for SAP administrators.

As part of this ongoing effort, Insights automatically tags systems running SAP workloads and by SAP ID (SID), without any customization needed by administrators. Users can easily filter those workloads throughout the Insights application by using the global Search tags dropdown menu.

inv search tags 2

5.2. Satellite host groups

Satellite host groups are configured in Satellite and recognized automatically by Insights.

5.3. Custom system tagging

By applying custom grouping and tagging to your systems, you can add contextual markers to individual systems, filter by those tags in the Insights application, and more easily focus on related systems. This functionality can be especially valuable when deploying Insights at scale, with many hundreds or thousands of systems under management.

Note

To create custom tags, root permissions, or their equivalent, are required to add to or change the /etc/insights-client/tags.yaml file.

5.3.1. Tag structure

Tags use a namespace/key=value paired structure.

  • Namespace. The namespace is the name of the ingestion point, insights-client, and cannot be changed. The tags.yaml file is abstracted from the namespace, which is injected by the client before upload.
  • Key. The key can be a user-chosen key or a predefined key from the system. You can use a mix of capitalization, letters, numbers, symbols and whitespace.
  • Value. Define your own descriptive string value. You can use a mix of capitalization, letters, numbers, symbols and whitespace.

5.3.2. The tags.yaml file

User-defined tags are added to the /etc/insights-client/tags.yaml file. You can add any number of key=value pairs to tags.yaml, as needed. The YAML syntax makes the contents easy to understand and modify.

Running insights-client --group=eastern-sap creates the tagging configuration file, /etc/insights-client/tags.yaml and adds the entry group: eastern-sap. The following example of a tags.yaml file shows additional tags added for the group “eastern-sap.”

Note

You can use any mix of capitalization, letters, numbers, symbols, and whitespace when creating key=value pairs.

Example

# tags
---
group: eastern-sap
name: Jane Example
contact: jexample@corporate.com
Zone: eastern time zone
Location:
- gray_rack
- basement
Application: SAP

5.3.3. Creating a custom group and the tags.yaml file

Create and add tags to /etc/insights-client/tags.yaml simply by using insights-client --group=<name-you-choose>, which performs the following actions:

  • Creates the etc/insights-client/tags.yaml file
  • Adds the group= key and <name-you-choose> value to tags.yaml
  • Uploads a fresh archive from the system to the Insights application so the new tag is immediately visible along with your latest results

After creating the initial group tag, add additional tags as needed by editing the /etc/insights-client/tags.yaml file.

The following procedure shows how to create the initial group, as well as the /etc/insights-client/tags.yaml file, then verify the tag exists in the Insights inventory.

Procedure

  1. Run the following command as root, adding your custom group name after --group=:
[root@server ~]# insights-client --group=<name-you-choose>

Verify your custom group was created

  1. Navigate to Red Hat Insights > Inventory and log in if necessary.
  2. Click the Search tags dropdown menu.
  3. Scroll through the list or use the search function to locate the tag.
  4. Click the tag to filter by it.
  5. Verify that your system is among the results on the Advisor systems list.

Verify the system is tagged

  1. Navigate to Red Hat Insights > Inventory and log in if necessary.
  2. Activate the Name filter and begin typing the system name until you see your system, then select it.
  3. Verify that, next to the system name, the tag symbol is darkened and shows a number representing the correct number of tags applied.

    inv systems tags

5.3.4. Editing tags.yaml to add or change tags

After creating the group tag, edit the contents of /etc/insights-client/tags.yaml as needed to add or modify tags. You can add multiple, filterable tags to a system.

Procedure

  1. Using the command line, open the tag configuration file for editing.

    [root@server ~]# vi /etc/insights-client/tags.yaml

  2. Edit content or add additional values as needed. The following example shows how you can organize tags.yaml when adding multiple tags to a system.

    # tags
    ---
    group: eastern-sap
    location: Boston
    description:
    - RHEL8
    - SAP
    key 4: value
    Note

    Add as many key=value pairs as you need. Use a mix of capitalization, letters, numbers, symbols, and whitespace.

  3. Save your changes and close the editor.
  4. Generate an upload to Insights.

    [root@server ~]# insights-client

Verification steps

  1. Navigate to Red Hat Insights > Inventory and log in if necessary.
  2. In the Search tags box, click the down arrow and select one of the tags or enter the name of the tag and select it.
  3. Find your system among the results.
  4. Verify that the tag icon is darkened and shows a number representing the number of tags applied to the system.

    inv system with tags

  5. Click the tag to see each of the tags applied to that system.

5.4. Adding tags to systems

The easiest way to start adding tags to tags.yaml is by using insights-client --group=<name-you-choose>, which performs the following actions:

  1. Creates the etc/insights-client/tags.yaml file
  2. Adds the group key and <name-you-choose> value to tags.yaml
  3. Uploads a fresh archive from the system to cloud.redhat.com so that the new tag is immediately visible along with your latest results

After creating the initial group tag, can add additional tags as needed by editing tags.yaml.

The following procedure shows how to create the initial group, as well as the tags.yaml file, then verify the tag in the Insights inventory.

Procedure

  1. Run the following command, adding your group name after --group=:
[root@server ~]# insights-client --group=<name-you-choose>

Verification steps

  1. Navigate to Red Hat Insights > Inventory and log in if necessary.
  2. Click the Filters dropdown menu and select Tags.

    inv filter tags

  3. In the search box, click the down arrow and select one of the tags or enter the name of the tag.

    Note

    You can search by the tag key or value.

  4. Find your system among the results and verify that the tag icon is darkened and shows a number representing the number of tags applied to the system. inv system tags
  5. Click the tag to see each of the tags applied to that system.

5.5. Editing tags.yaml to add or change tags

After creating the group tag, you can edit the contents of tags.yaml to add or modify tags, as needed. You to add multiple, filterable tags to a system.

Procedure

  1. Using the command line, open the tag configuration file for editing.

    [root@server ~]# vi /etc/insights-client/tags.yaml
  2. Edit content or add additional key=value pairs as needed. The following example shows how you can organize tags.yaml when adding multiple tags to a system.

    # tags
    ---
    group: eastern-sap
    location: Boston
    description:
    - RHEL8
    - SAP
    key 4: value
    Note

    Add as many key=value pairs as you need. Use a mix of capitalization, letters, numbers, symbols, and whitespace.

  3. Save your changes and close the editor.
  4. Generate an upload to Insights.

    [root@server ~]# insights-client

Verification steps

  1. Navigate to Red Hat Insights > Inventory and log in if necessary.
  2. Click the Filters dropdown menu and select Tags.
  3. In the search box, click the down arrow and select one of the tags or enter the name of the tag and select it.

    Note

    You can search by the tag key or value.

  4. Find your system among the results.
  5. Verify that the tag icon is darkened and shows a number representing the number of tags applied to the system.
  6. Click the tag to see each of the tags applied to that system.