A Discovery extension supplements the information collected during a discovery job. It runs other commands through the Protocol used by the job and uses the command output to:
Create Custom Attributes that are not part of the standard inventory.
Replace a standard inventory value with a value returned by an extension command.
Populate a standard inventory value only when normal discovery does not return that value.
This example explains how to configure an SSH Command set for an Ubuntu device. The command set collects the device system name as a Custom attribute and updates the standard FQDN field.
Protocol: Run an SSH discovery job to execute an SSH command set.
Example scenario
An infrastructure administrator manages Ubuntu servers discovered through SSH. Standard discovery collects the device inventory, but the administrator also wants to:
Store the hostname returned by the remote operating system as a custom attribute named System Name.
Set the standard node.fqdn inventory field by running an SSH command on the target device.
Run the added commands only on devices that match Ubuntu 20.04.4 LTS.
To meet these requirements, the administrator creates an SSH command set named Ubuntu SSH, adds two commands, and runs an SSH discovery job against the target devices.
How the configuration works
The command set contains the following commands:
Command | Trigger | Command output | Inventory result |
|---|---|---|---|
Custom New Field | New Field | Output of hostname | Creates a custom attribute named System Name. |
FQDN | Override | Output of hostname -f | Replaces the standard node.fqdn value. |

Figure: SSH Command Set
The extension follows this processing flow:
The SSH discovery job connects to the target device.
Standard SSH discovery identifies the operating system and collects the normal device inventory.
The extension checks whether the discovered operating system matches the command-set OS Filter.
If the filter matches, the extension runs each enabled command in the command set.
The configured Output parser extracts a value from each command result.
The extension saves the parsed value as either a custom attribute or a standard inventory field, depending on the selected trigger.
The updated values appear on the Discovered Device Details page after the job completes.
In the following example, the SSH extension is not applied, or the administrator disables the extension before running the SSH job. You do not see custom attributes, and the FQDN value does not change as defined in the extension.

Figure: Discovery Extension job not applied
Now, the SSH extension is active, and the SSH job runs. You can see custom attributes on the Discovered Devices page and the FQDN change.

Figure: Discovery Extension job applied
Trigger options
Each command uses a trigger to determine how the parsed output gets stored.
New Field
Use New Field to create a custom attribute without changing a standard inventory field.
When you select this trigger, configure a Custom Attribute Key. The key becomes the label shown on the Custom Attributes tab of the discovered device.
Example:
Custom Attribute Key: System Name
Shell Command: hostname
Parsed output: labubuntu20-01
Result: The Custom Attributes tab displays System Name: labubuntu20-01.

Figure: Custom Attributes
Override
Use Override to replace a selected standard inventory field every time the extension returns a usable value.
When you select this trigger, configure the Standard Field to Set. The field list contains supported fields from the standard inventory model, such as node.fqdn.
Example:
Standard Field to Set: node.fqdn
Shell Command: uname
Parsed output: linux
Result: The extension sets the standard FQDN field to linux, even if standard discovery already populated another value.
Caution: Override replaces the existing standard value. Use Override only when the command output is more reliable or better formatted than the value collected through standard discovery.