Device Discovery and Registration
Overview
This document describes how devices are discovered and registered within the system. The process consists of two main phases:
- Device Discovery - Identifying device characteristics and operating system details
- Device Registration - Placing devices into appropriate groups based on their characteristics
Device Discovery
Device discovery is the process of identifying and collecting information about a device when it first connects to the system or when its configuration changes.
Discovery Methods
The system uses different discovery methods depending on whether the device is local or remote:
Local Device Discovery
For devices running the agent locally, the system performs direct discovery by:
- Network Information: Collecting IPv4, IPv6, and MAC addresses from active network interfaces
- Operating System Detection: Identifying the OS type, version, and whether it's a server or desktop edition
- Hardware Information: Gathering CPU details including family, description, and processor count
- Environment Variables: Capturing system environment variables for use in policies and scripts
Remote Device Discovery
For remote devices accessed through credentials, the system:
- Executes remote commands to gather environment information
- Determines if the system is Windows or Unix/Linux based
- Collects basic platform information including device name and network details
- Handles special cases for cloud, ESX, Splunk, and database connections
Supported Operating Systems
The system supports discovery and management of the following operating systems:
Windows
- Windows 10
- Windows 11
- Windows Server 2016
- Windows Server 2019
- Windows Server 2022
- Windows Server 2025
Linux Distributions
- CentOS: Versions 7, 8, 9, 10
- Red Hat Enterprise Linux (RHEL): Versions 7, 8, 9, 10
- Ubuntu: Versions 16, 18, 20, 22, 24
- Debian: Versions 10, 11, 12, 13, 14
- SUSE Linux Enterprise: Versions 12, 15, 16
- Oracle Linux: Versions 7, 8, 9, 10
- Amazon Linux: Versions 1 (2018), 2, 2023
- Rocky Linux: Versions 8, 9, 10
- Fedora: Version 39
Unix Systems
- Oracle Solaris: Versions 10, 11
- FreeBSD
- Mac OS X
- AIX: Version 7
Operating System Detection Methods
Windows OS Type Detection
Windows operating system detection uses build numbers to accurately identify the OS version, as the standard version information is not reliable for Windows Server 2012 R2 and later versions.
Detection Process:
-
Registry Information: The system reads from
HKLM\Software\Microsoft\Windows NT\CurrentVersion:ProductName: Identifies if it's a server or desktop editionCurrentVersion: Major.Minor version numberCurrentBuild: Build number (critical for accurate detection)
-
Build Number Mapping: The system uses specific build numbers to identify OS versions:
- 9600: Windows Server 2012 R2 / Windows 8.1
- 14393: Windows Server 2016 / Windows 10
- 17763: Windows Server 2019 / Windows 10
- 20348: Windows Server 2022
- 21996+: Windows 11
- 26100+: Windows Server 2025
-
Server vs Desktop: The
ProductNameregistry value is checked for the word "server" to distinguish between server and desktop editions
Example: A system with build number 20348 and "server" in the product name is identified as Windows Server 2022, while the same build without "server" would be Windows 10.
Linux Platform Detection
Linux platform detection uses a three-method sequential approach to ensure accurate identification across different distributions:
Method 1: LSB (Linux Standard Base)
The system first attempts to use the lsb_release command if available:
- Checks if
lsb_releasecommand exists usingwhich lsb_release - If found, executes
lsb_release -sdto get distribution description - Parses the output to identify distribution name and version
- Extracts version number from the description string
Method 2: Release Files
If LSB is not available, the system examines release files in /etc/:
- Searches for files matching
/etc/*release(including symlinks) - Reads and parses these files as key-value pairs
- Looks for specific keys:
PRETTY_NAME: Preferred human-readable nameNAME: Distribution nameVERSION_ID: Version numberCPE_NAME: Common Platform Enumeration identifier
- Identifies distribution by matching keywords (centos, ubuntu, redhat, debian, suse, oracle, amazon, rocky, fedora)
Method 3: uname Command
If the previous methods fail, the system falls back to the uname -a command:
- Executes
uname -ato get kernel and system information - Searches the output for distribution-specific keywords
- Uses generic "Unix" or "Linux" classification if no specific match found
Version Refinement: Once the distribution family is identified, the system maps the major version number to specific OS types (e.g., Ubuntu 20, Ubuntu 22, Ubuntu 24).
Example Detection Sequence:
- System tries
lsb_release -sd→ Returns "Ubuntu 22.04.1 LTS" - Parses to identify: Distribution = Ubuntu, Version = 22.04
- Maps to OS Type: LinuxUbuntu22
Discovery Process Details
The discovery process collects the following information:
- Device Name: The hostname or computer name
- Fully Qualified Domain Name (FQDN): Complete domain name if available
- IP Addresses: Both IPv4 and IPv6 addresses from active network interfaces
- MAC Addresses: Physical addresses of network adapters
- Operating System: Type, version, and edition (server vs. desktop) - detected using methods described above
- Platform Information: Architecture and system details
- CPE Name: Common Platform Enumeration identifier (for Linux systems)
- Agent Version: Version of the installed agent software
Device Registration
Device registration is the process of placing newly discovered devices into appropriate groups based on their characteristics and any custom business rules.
Registration Process Flow
When a device is first discovered or re-registered, it follows this sequence:
-
Initial Placement: Device is placed in both the "New Devices" and "Awaiting Registration" groups
- The "New Devices" group serves as a safety net - if the registration process fails for any reason, the device can still be found here
- This ensures devices are never "lost" during the registration process
-
Registration Report Execution: A registration report is run to collect device characteristics
- The report gathers information such as operating system type, version, and other attributes
- This data is used to determine appropriate group placement
-
Group Assignment: Based on the report results and custom scripts, the device is assigned to groups
- Custom registration scripts can examine the collected data and apply business logic
- If no custom script exists, default OS-based group assignment is used
-
Final Placement: Device is moved from "Awaiting Registration" to its target groups
- If appropriate groups are found, the device is removed from "New Devices" and added to target groups
- If no appropriate groups are found or registration fails, the device remains in "New Devices" for manual review
- Device is always added to the "All Devices" group regardless of other group assignments
Default Group Assignment
The registration process uses the "New Device Registration Process" report to determine group placement. By default, devices are assigned to groups based on their operating system:
Windows Groups
- Windows (generic)
- Windows 10
- Windows 11
- Windows 2016
- Windows 2019
- Windows 2022
- Windows 2025
Linux Groups
- Linux (generic)
- Linux Centos (versions 7-10)
- Linux Redhat (versions 7-10)
- Linux Debian (versions 10-14)
- Linux Fedora (version 39)
- Linux Suse (versions 12, 15, 16)
- Linux Ubuntu (versions 16, 18, 20, 22, 24)
- Linux Amazon (versions 1, 2, 2023)
- Linux Oracle (versions 7-10)
- Rocky Linux (versions 8-10)
Other OS Groups
- Oracle Solaris (versions 10, 11)
- Mac OSX
- AIX (version 7)
Custom Registration Scripts
Organizations can customize the registration process by providing a custom registration script. This script can:
- Examine device characteristics collected by the registration report
- Apply custom business logic to determine group membership
- Assign devices to multiple groups based on complex criteria
- Override default OS-based group assignments
When a custom script identifies multiple groups for a device, all identified groups will be assigned (subject to the AllRegistrationGroupsExist configuration setting).
Group Assignment Sequence
The system follows this sequence when assigning groups:
-
Initial State: Device is already in both "New Devices" and "Awaiting Registration" groups (placed there during initial discovery)
-
Remove from Awaiting Registration: Device is removed from the "Awaiting Registration" group
-
Evaluate Custom Script: If a custom registration script exists, it is executed with the device characteristics
-
Determine Target Groups: Groups are identified based on:
- Custom script results (if script exists)
- Default OS-based mapping from the registration report (if no script)
-
Validate Groups: If
AllRegistrationGroupsExistis enabled, all identified groups must exist- If any group doesn't exist, the entire registration is aborted
- Device remains in "New Devices" for manual intervention
-
Remove from Previous OS Groups: If
EnableAutoReregisterAgentAfterOsChangeis enabled, device is removed from previous OS-specific groups (during re-registration scenarios) -
Add to Target Groups: Device is added to all identified groups (if validation passed)
-
Add to All Devices: Device is always added to the "All Devices" group
-
Handle New Devices Group:
- If custom or OS-specific groups were successfully assigned, device is removed from "New Devices"
- If no groups were found or registration failed, device remains in "New Devices" as a safety net
- This ensures administrators can always find devices that need manual group assignment
Registration Failure Handling
If the registration process encounters issues, the device remains in the "New Devices" group where it was initially placed:
-
No Response: If a device doesn't respond to the registration report, it remains in "New Devices" group (never removed from it)
-
Missing Groups: If
AllRegistrationGroupsExistis enabled and any identified group doesn't exist, the device remains in "New Devices" and a warning is logged -
Script Errors: If the custom registration script fails, the device remains in "New Devices" by default and the error is logged
-
Validation Failures: Any validation failure during the registration process results in the device staying in "New Devices"
This safety-net approach ensures that devices requiring manual intervention can always be found in the "New Devices" group, preventing devices from being "lost" in the system.
Configuration Settings
AllRegistrationGroupsExist
Purpose: Controls whether all groups identified for a device must exist before the device is moved from "New Devices".
Default Value: false
Behaviour:
- When
true: If any identified group doesn't exist, the device remains in "New Devices" and a warning is logged - When
false: Device is added to groups that exist; missing groups are logged as errors but don't prevent registration
Use Case: Enable this setting in production environments to ensure devices are only registered when all required groups are properly configured.
EnableAutoReregisterAgentAfterOsChange
Purpose: Controls whether devices are automatically re-registered when an operating system change is detected.
Default Value: false
Behaviour:
- When
true: If a device's OS changes (e.g., after an upgrade), it is automatically moved back to "Awaiting Registration" and the registration process runs again - When
false: OS changes do not trigger automatic re-registration
Use Case: Enable this setting if you want devices to be automatically reassigned to appropriate OS-specific groups after operating system upgrades.
Logging Configuration
To troubleshoot device discovery and registration issues, you can enable detailed logging for specific components.
Device Discovery Logging
To enable detailed logging for device discovery, set the log level for DesktopDevicePlatformDiscovery:
Location: Agent log4net.config file
<logger name="DesktopDevicePlatformDiscovery">
<level value="DEBUG" />
</logger>
Information Logged:
- Operating system detection details
- Network interface discovery
- Hardware information collection
- Remote discovery command execution
- Version parsing and OS family identification
Device Registration Logging
To enable detailed logging for device registration, set the log level for CollateComplianceReportDataBackgroundTaskWorker:
Location: Hub log4net.config file
<logger name="CollateComplianceReportDataBackgroundTaskWorker">
<level value="DEBUG" />
</logger>
Information Logged:
- Registration report processing
- Custom script execution results
- Group assignment decisions
- Device movement between groups
- Configuration setting evaluations
- Timing information for performance analysis
Additional Logging
For comprehensive troubleshooting, you may also want to enable DEBUG logging for:
AgentTaskManager: For agent task creation and pollingDirectoryManager: For group membership operationsEventRepository: For registration event processing
Troubleshooting
OS Type Not Correctly Identified
Impact: If the agent cannot correctly identify the operating system type, the device registration process will encounter problems because both the registration report and custom registration scripts depend on accurate OS Type information.
Possible Causes:
- Outdated Agent: Agent version doesn't recognize newer operating systems
- New OS Release: Operating system is newer than the agent's OS detection code
- Unsupported OS: Operating system variant not included in detection logic
- Registry/System File Issues: On Windows, registry keys may be missing or corrupted; on Linux, release files may be non-standard
Common Scenarios:
- New Windows OS Release: A completely new Windows version is released (e.g., Windows 12, Windows Server 2027) before agent code is updated to recognize it
- Note: New builds of existing OS versions (e.g., Windows 11 updates) are handled by build number ranges and won't cause issues
- New Linux Distribution or Major Version: A new Linux distribution or major version is released that doesn't match existing detection patterns
- Beta/Preview OS: Running preview or beta versions of operating systems with non-standard version information or identifiers
Symptoms:
- Device shows generic OS type (e.g., "Windows" instead of "Windows 2022", or "Linux" instead of "Linux Ubuntu 22")
- Device not assigned to correct OS-specific group during registration
- Registration report may fail or return unexpected results
- Custom registration script may not execute correctly due to missing or incorrect OS information
Resolution Steps:
-
Check Agent Version:
- Verify the agent version on the affected device
- Compare with the latest available agent version
- Review agent release notes for OS support information
-
Review OS Detection Logs:
- Enable DEBUG logging for
DesktopDevicePlatformDiscovery - Check logs for OS detection details
- Look for warnings about unrecognized build numbers or distribution names
- Enable DEBUG logging for
-
Verify OS Information:
- Windows: Check registry values at
HKLM\Software\Microsoft\Windows NT\CurrentVersion- Verify
CurrentBuildvalue exists and is numeric - Check
ProductNamecontains expected OS name
- Verify
- Linux: Check release files in
/etc/directory- Verify
/etc/os-releaseor/etc/*releasefiles exist - Check if
lsb_releasecommand is available
- Verify
- Windows: Check registry values at
-
Update Agent:
- If a newer agent version is available that supports the OS, upgrade the agent
- After upgrade, the device may need to be re-registered (see
EnableAutoReregisterAgentAfterOsChange)
-
Temporary Workaround:
- Manually assign device to appropriate groups
- Document the OS type issue for future reference
- Consider using custom registration script to handle the specific OS variant
-
Report to Support:
- If the OS should be supported but isn't recognized, contact support with:
- Agent version
- Operating system details (name, version, build number)
- OS detection logs with DEBUG enabled
- Registry/release file contents
- If the OS should be supported but isn't recognized, contact support with:
Prevention:
- Keep agents updated to the latest version
- Test new OS versions in non-production environments before deployment
- Monitor agent release notes for new OS support
- Plan agent upgrades before deploying new operating systems
Device Not Appearing in Expected Group
Possible Causes:
- Custom registration script returned unexpected group names
- Target group doesn't exist and
AllRegistrationGroupsExistis enabled - Registration report didn't complete successfully
- Device didn't respond to registration report task
Resolution Steps:
- Enable DEBUG logging for
CollateComplianceReportDataBackgroundTaskWorker - Check logs for group assignment decisions
- Verify all target groups exist in the system
- Review custom registration script logic if applicable
- Check that device responded to registration report task
Device Stuck in "Awaiting Registration"
Possible Causes:
- Registration report hasn't run yet
- Device is offline or not responding
- Registration report task timed out
Resolution Steps:
- Check device connectivity
- Verify agent is running and can communicate with Hub
- Review registration report schedule
- Check for task timeout issues in logs
Device Not Re-registering After OS Upgrade
Possible Causes:
EnableAutoReregisterAgentAfterOsChangeis disabled- OS change wasn't detected by the system
- Agent hasn't polled since the OS change
Resolution Steps:
- Enable
EnableAutoReregisterAgentAfterOsChangeconfiguration setting - Restart the agent to force a poll
- Enable DEBUG logging for
AgentTaskManagerto see OS change detection
Multiple Devices in Wrong Groups After Registration
Possible Causes:
- Custom registration script has logic errors
- Registration report collecting incorrect data
- Group names in script don't match actual group names
Resolution Steps:
- Review custom registration script logic
- Test script with sample device data
- Verify group display names match script output
- Enable
AllRegistrationGroupsExistto prevent partial registrations
Best Practices
-
Test Custom Scripts: Always test custom registration scripts in a non-production environment before deployment
-
Enable AllRegistrationGroupsExist: In production environments, enable this setting to ensure devices are only registered when all required groups exist
-
Monitor Registration Logs: Regularly review registration logs to identify patterns or issues
-
Create Groups Before Registration: Ensure all target groups exist before running registration reports
-
Use Descriptive Group Names: Use clear, descriptive group names that match your organizational structure
-
Document Custom Logic: If using custom registration scripts, document the business rules and group assignment logic
-
Plan for OS Upgrades: If you perform OS upgrades, consider enabling
EnableAutoReregisterAgentAfterOsChangeto automatically reassign devices -
Regular Audits: Periodically audit device group memberships to ensure they remain accurate
Summary
The device discovery and registration process provides a flexible framework for automatically organizing devices based on their characteristics. By understanding the discovery methods, supported operating systems, registration flow, and configuration options, you can effectively manage device onboarding and ensure devices are placed in appropriate groups for policy application and reporting.