Report system information from the agent

The Red Hat Edge Manager agent collects built-in and custom system information from each device and reports it in device status under status.systemInfo. You configure which fields are collected independently of device labels. Labels are optional consumers of that data at enrollment time.

System information and device labels

System information collection and enrollment labels are configured independently:

  • System information (system-info, system-info-custom): Controls what the agent collects and reports in status.systemInfo (including customInfo for user-defined collectors).
  • Enrollment labels (default-labels, label-from-systeminfo): Controls which labels the agent requests when it enrolls the device. Mapping with label-from-systeminfo reads values that you have already enabled for collection.

You do not need to map system information to labels for the agent to report it in device status. For enrollment-time labels, including the device alias, see Device alias and enrollment labels in the Additional resources section.

Agent configuration for system information

The agent reads system information settings from /etc/flightctl/config.yaml. You can override supported keys with drop-in files under /etc/flightctl/conf.d/. Drop-in files currently support log-level, system-info, system-info-custom, system-info-timeout, and label-from-systeminfo.

The following parameters control system information collection:

Table 1. System information collection parameters
Parameter Description

system-info

Built-in and managed system information fields to include in device status updates beyond the always-reported core fields (architecture, operatingSystem, agentVersion, bootID). Default: hostname, kernel, distroName, distroVersion, productName, productUuid, productSerial, netInterfaceDefault, netIpDefault, netMacDefault, managementCertNotAfter, managementCertSerial, tpmVendorInfo. See Built-in system information fields and Managed system information collectors in the Additional resources section.

system-info-custom

Keys for custom collectors whose executables live under /usr/lib/flightctl/custom-info.d/. Reported values appear under status.systemInfo.customInfo. See Custom system information collectors in the Additional resources section.

system-info-timeout

Maximum time allowed to collect system information. Default: 2m.

Inspecting collected system information

On the device, list the values that built-in and custom collectors return:

sudo flightctl-agent system-info | jq '.'

After enrollment, view reported system information in the device resource. For example:

flightctl get device/<device_name> -o yaml

The status.systemInfo section includes core fields and any fields you enabled with system-info or system-info-custom. For more information about viewing device status, see View device inventory and device details in the Additional resources section.

Built-in system information fields

You can enable additional built-in collectors by listing their keys under system-info in config.yaml.

Table 2. Built-in system information fields
Field Description

hostname

System hostname

kernel

Running Linux kernel version

distroName

Operating system distribution name

distroVersion

Operating system distribution version

productName

Product or model name (from Desktop Management Interface (DMI) data)

productSerial

Hardware serial number (if available)

productUuid

UUID of the system board or chassis

biosVendor

BIOS or firmware vendor

biosVersion

BIOS or firmware version

netInterfaceDefault

Default network interface name

netIpDefault

First usable IP address on the default network interface

netMacDefault

MAC address of the default network interface

gpu

Detected GPU devices

memoryTotalKb

Total RAM in kilobytes

cpuCores

Number of physical CPU cores

cpuProcessors

Number of logical processors

cpuModel

CPU vendor and model name

The following example enables a subset of built-in fields:

system-info: [hostname, kernel, distroName, distroVersion]

Managed system information collectors

The agent populates the following fields internally. They reflect agent lifecycle state and update only when the underlying state changes, such as certificate rotation or Trusted Platform Module (TPM) initialization:

Table 3. Managed system information fields
Field Description

managementCertSerial

Serial number of the active device management certificate

managementCertNotAfter

Expiration time (NotAfter) of the active device management certificate

tpmVendorInfo

TPM vendor information derived from the device TPM manufacturer data

These fields follow the same configuration and reporting semantics as built-in collectors. Include or exclude them from device status by listing them under system-info in config.yaml. They are included in the default system-info list.

Custom system information collectors

You can report site-specific or application-specific values under status.systemInfo.customInfo by using custom collectors.

To add a custom field:

  1. Create an executable script named after the collector key in /usr/lib/flightctl/custom-info.d/. The script must print a single line of output (the value).
  2. Add the key to system-info-custom in /etc/flightctl/config.yaml.

Custom keys must be camel case with no spaces or special characters. Script file names can be camel case or lowercase.

The following example reports FIPS mode status:

  1. Create /usr/lib/flightctl/custom-info.d/fips with executable permissions:
    #!/bin/sh
    
    fips-mode-setup --is-enabled
    case $? in
        0) echo "enabled";;
        1) echo "inconsistent";;
        2) echo "disabled";;
        *) echo "unknown";;
    esac
  2. Enable the collector in config.yaml:
    system-info-custom: [fips]

Reported device status includes:

status:
  systemInfo:
    customInfo:
      fips: disabled

To map custom values to enrollment labels, enable the collector first, then use the customInfo.<key> syntax in label-from-systeminfo. For more information, see Enrollment-time label mapping in the Additional resources section.