Start or stop Discovery Agent data collection
After the Discovery Agent is deployed and configured, if data collections stops you can restart it. You can start or stop data collection through the console or by making API calls through the AWS CLI. Both of these methods are described in the following procedures.
- Using the Migration Hub console
-
The following procedure shows how to start or stop the Discovery Agent data collection process, on the Data Collectors page of the Migration Hub console.
To start or stop data collection
-
In the navigation pane, choose Data Collectors.
-
Choose the Agents tab.
-
Select the check box of the agent you want to start or stop.
Tip
If you installed multiple agents but only want to start or stop data collection on certain hosts, the Hostname column in the agent's row identifies the host the agent is installed on.
-
Choose Start data collection or Stop data collection.
-
- Using the AWS CLI
-
To start or stop the Discovery Agent data collection process from the AWS CLI, you must first install the AWS CLI in your environment, and then you must set the CLI to use your selected Migration Hub home region.
To install the AWS CLI and start or stop data collection
-
If you have not already done so, install the AWS CLI appropriate to your OS type (Windows or Mac/Linux). See the AWS Command Line Interface User Guide for instructions.
-
Open the Command prompt (Windows) or Terminal (MAC/Linux).
-
Type
aws configure
and press Enter. -
Enter your AWS Access Key ID and AWS Secret Access Key.
-
Enter your home region for the Default Region Name, for example
. (We are assuming thatus-west-2
us-west-2
is your home region in this example.) -
Enter
text
for Default Output Format.
-
-
To find the ID of the agent you want to stop or start data collection for, type the following command:
aws discovery describe-agents
-
To start data collection by the agent, type the following command:
aws discovery start-data-collection-by-agent-ids --agent-ids
<agent ID>
To stop data collection by the agent, type the following command:
aws discovery stop-data-collection-by-agent-ids --agent-ids
<agent ID>
-