How to prevent Jira Insight/Assets Discovery scans to time out when retrieving users and groups from Windows hosts
Platform Notice: Cloud, Server, and Data Center - This article applies equally to all platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
This article relates to scans performed by agent-free. Using the Discovery agent avoids the timeouts as the scan is performed locally.
Diagnosis & Cause
When the scanned Windows host is part of a Domain and Jira Insight/Asset discovery is retrieving users and groups the scan may times out after 10 minutes in large domains.
This happens because the default pattern command to get the user list uses the "SELECT * FROM Win32_UserAccount", retrieving data from all users in the domain.
Solution
To increase the performance of the scans, which shall avoid times out, the discovery pattern can be modified to scan only local users. For that please change the Discovery pattern files as below:
Windows_Group.pat
From | To |
---|---|
SELECT * FROM Win32_Group | SELECT * FROM Win32_Group WHERE LocalAccount=true |
Windows_User.pat
From | To |
---|---|
SELECT * FROM Win32_UserAccount | SELECT * FROM Win32_UserAccount WHERE LocalAccount=true |
If the entire user list from the domain is required do not proceed with the changes, the alternative would be running the original pattern file for a single host however using a different scan setting in the Discovery tool (only for that host).