How discovery Agents can export to Cloud instance
プラットフォームについて: Cloud、Server、および Data Center - この記事はすべてのプラットフォームに等しく適用されます。
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.
*Fisheye および Crucible は除く
要約
Assets Discovery agents can transfer their local scan results file using File Copy or SFTP export where they will be picked up by a Collector or by Assets Discovery tool.
There is a suggestion JSDCLOUD-11802 - Getting issue details... STATUS where it will be more efficient if a Discovery Agent can upload its local scan directly to a cloud instance and trigger the import.
Until the feature request gets prioritised and worked on, to export the Agents results to Cloud, you can use a Discovery Collector
Here we will show how to export Discovery Agents results to Cloud using a Collector.
環境
Discovery Agent is installed locally, Assets is running in a Jira Cloud Instance
ソリューション
Let's assume the following scenario:
- Remote laptops cannot be scanned by the discovery tool
- Discovery Agents results should be uploaded to Assets in Cloud
要件
- Discovery agents installed in each of the devices (Only available Windows Environment)
- Discovery Collector installed on a Windows device or on a Linux system. The latter, you need to install the latest Mono packages on your Linux System and it should be done from the native linux GUI. Please refer to Using Discovery on Linux
- A shared path folder needs to be available where the Discovery Agent and Collector can access
- Shared path folder could also be a SFTP directory
Let's begin
- Install the Discovery Agents
- 「Discovery_x.x.x.zip」の中には「Discovery_Agent_Setup.msi」インストーラー パッケージが入っています。
- By default, scan result will be stored in the local device within the Agent installation directory\scans directory
Manually edit the Agent.cfg within the Agent installation directory and ensure you set DirectCopyPath element with the shared path where results will be exported. In this KB, we use as an example:
C:\Program Files\Atlassian\Discovery Agent Installer\exportExample - Agent.cfg<?xml version="1.0" encoding="utf-8"?> <Settings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ScanLogLevel>Debug</ScanLogLevel> <NextScanDate>2022-10-24T19:40:39.0555278+02:00</NextScanDate> <ScanInterval>24</ScanInterval> <AgentPort>51337</AgentPort> <JustUseFirstIP>false</JustUseFirstIP> <DeleteLogsAfter>7</DeleteLogsAfter> <DisableTCPListener>false</DisableTCPListener> <DirectCopyPath>C:\Program Files\Atlassian\Discovery Agent Installer\export</DirectCopyPath> <SFTPSettings> <TransferReties>5</TransferReties> <TranserRetryInterval>30</TranserRetryInterval> </SFTPSettings> </Settings>
In the above example, we use a local path but it could also be a remote path or even a SFTP as long as the Discovery Agent can access it as well as the collector host.
- Discovery Agents run a scan every 24 hours (by default). This setting can also be changed.
- Discovery Agents run a scan every 24 hours (by default). This setting can also be changed.
- Install Discovery Collector on a different device
- Run the Command Prompt with Administrator Privileges. You need to be within the Discovery Installation directory
Install the Collector tool as a service
Collector.exe -i
Open the Collector-Tool Settings. You need to be within the Discovery Installation directory
Collector.exe -s
In the "Import Folder" field, set the share path where the Agents scan results are being exported. See Step #2
Go to Export tab and set Export Type to Cloud
Add Auth token. You must generate a key that allows the external app to securely transfer the data into Assets. This is called a Single Sign-On (SSO) token, or just token.
Please refer to Generate a token for importing
- Close the collector-Tool Settings
- Discovery Collector will run every 30 minutes (by default) and if any Agent scan results are found in the Import Folder, it will export them to Cloud.
その他
Other Discovery Agents and Collector settings can be found on: