Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Data Collected by the Discovery Agent
3.
Installation Prerequisites for Discovery Agent
4.
Agent Installation on Linux
5.
Agent Installation on Windows
6.
Agent Data Collection
6.1.
Using the migration hub console
6.1.1.
To begin or end data collection.
7.
Frequently Asked Questions
7.1.
Should I use agentless application discovery or agent-based application discovery?
7.2.
What is the home region of the Migration Hub?
7.3.
How is data protected while being transported to AWS?
7.4.
Is it possible to run agentless Discovery in my EC2 instances?
8.
Conclusion
Last Updated: Mar 27, 2024

AWS Application Discovery Agent

Author Prerna Tiwari
0 upvote
Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @

Introduction

In this blog, we will learn about how AWS Discovery Agent works, and how data is collected by AWS Discovery Agent. We will also see how we can install Agent on Windows and  Linux. AWS Application Discovery Service collects usage and configuration data from your on-premises servers to assist you in planning your migration to the AWS cloud. AWS Migration Hub is integrated with the Application Discovery Service, which simplifies migration tracking by aggregating migration status information into a single console. From the Migration Hub console, you can analyze the discovered servers, group them into applications, and track the migration status of each application.

One can export system performance and utilization data for your discovered servers using Application Discovery Service APIs. Enter this information into your cost model to calculate the cost of running those servers on AWS. Now, let us learn how data is collected by the Discovery Agent.

Data Collected by the Discovery Agent

AWS Application Discovery Agent is software installed on on-premises servers and virtual machines (VMs). The Discovery Agent gathers system configuration, time-series utilization or performance data, process data, and TCP network connections. 

The following is the table data collected by Discovery Agent:

  • The term "host" can refer to either a physical server or a virtual machine.
  • Unless otherwise specified, data is contained in kilobytes (KB).
  • Comparable data are reported in megabytes (MB) in the Migration Hub console.
  • The polling intervals are approximately 15 minutes.
  • Data fields marked with an asterisk (*) are only available in.csv files generated by the agent's API export function.
Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Installation Prerequisites for Discovery Agent

The prerequisites and tasks you must complete before installing the AWS Application Discovery Agent are as follows.

  • Before installing Discovery Agent, you must first configure an AWS Migration Hub home region.
     
  • If the 1.x version of the agent is already installed, you must uninstall it before installing the most recent version.
     
  • If the agent has to be installed on a Linux host, ensure that the host supports the Intel i686 CPU architecture (also known as the P6 microarchitecture).
     
  • If your network's outbound connections are restricted, you'll need to update your firewall settings. Agents must have access to the arsenal via TCP port 443. They do not necessitate the opening of any inbound ports.
     
  • For auto-upgrade to work, you must have access to Amazon S3 in your home region.
     
  • Create an IAM (AWS Identity and Access Management ) user and attach the existing AWSApplicationDiscoveryAgentAccess IAM managed policy in the console. This policy authorizes the user to carry out necessary agent actions on your behalf. See AWS Managed (Predefined) Policies for Application Discovery Service for more information on managed policies.
     
  • Examine the time skew from your Network Time Protocol (NTP) servers and make any necessary adjustments. The agent registration call fails due to incorrect time synchronization.

Agent Installation on Linux

These are the steps to install the AWS agent installation on Linux:

Step1: Create a new directory for your agent components on your Linux-based server or virtual machine.

Step 2: Change to the new directory and use the command line or the terminal to download the installation script.

  • Run the following command to download from the command line.

 

curl -o ./aws-discovery-agent.tar.gz https://s3-us-west-2.amazonaws.com/awsdiscovery-agent.us-west-2/linux/latest/aws-discovery-agent.tar.gz

 

  • Follow these steps to download from the Migration Hub console:
    • Open the console and go to the Discovery Tools page.
    • Choose Download agent in the Discovery Agent box, then Linux in the Resultant List box. Your download will begin right away.

 

Step 3: Use the following three commands to verify the installation package's cryptographic signature:

curl -o ./agent.sig https://s3.us-west-2.amazonaws.com/aws-discovery-agent.us-west-2/linux/latest/aws-discovery-agent.tar.gz.sig

curl -o ./discovery.gpg https://s3.us-west-2.amazonaws.com/aws-discovery-agent.uswest-2/linux/latest/discovery.gpg

gpg --no-default-keyring --keyring ./discovery.gpg --verify agent.sig aws-discoveryagent.tar.gz

 

Step 4: Extract the files from the tarball as shown below.

tar -xzf aws-discovery-agent.tar.gz


Step 5: Installing Discovery Agent 

Run the agent install command as indicated in the example below to install the agent. Replace your-home-region with your home region's name, aws-access-key-id with your access key id, and aws-secret-access-key with your secret access key in the example.

sudo bash install -r your-home-region -k aws-access-key-id -s aws-secret-accesskey

Agent Installation on Windows

Step 1: Download the Windows agent installer, but don't double-click it to start it in Windows.


Note: If you try to start the installer from within Windows by double-clicking it, it will fail. Only the command prompt is used to install the agent. (If you already double-clicked the installer, go to Add/Remove Programs and uninstall the agent before proceeding with the subsequent procedures.)

If the Windows agent installer detects no version of the Visual C++ x86 runtime on the host, the Visual C++ x86 2015–2019 runtime is automatically installed before the agent software is installed.

Step 2: As an administrator, open a command line and go to the directory where you saved the installation package.


Step 3: Installing Discovery Agent 

Run the agent install command as indicated in the example below to install the agent. Replace your-home-region with your home region's name, aws-access-key-id with your access key id, and aws-secret-access-key with your secret access key in the example.

We can specify the folder path C:install-location for the INSTALLLOCATION argument to set the agent installation location. 

INSTALLLOCATION="C:installlocation" is an example. [INSTALLLOCATION path]AWS Discovery is the resulting folder hierarchy.

The Program Files folder is the default installation location.

Agent Data Collection

If data collection stops after deploying and configuring the Discovery Agent, you can restart it. You can start and stop data collection via the console or use the AWS CLI to make API calls. The procedures that follow describe both of these methods.

Using the migration hub console

On the Data Collectors page of the Migration Hub console, the following procedure shows how to start or stop the Discovery Agent data collection process.

To begin or end data collection.

  • Select Data Collectors from the navigation pane.
  • Select the Agents tab.
  • Check the box next to the agent to start or stop.
  • Select either Start or Stop data collection.

Frequently Asked Questions

Should I use agentless application discovery or agent-based application discovery?

Agentless Application Discovery is recommended for VMware customers because it eliminates the need for customers to install an agent on each host and collects server information regardless of the operating system of the VM. It does not gather data from non-VMware environments.

If you are running a non-VMware environment or need process and network connection information, use the AWS Application Discovery Agent. You can use both agent-based and agentless application Discovery at the same time.

What is the home region of the Migration Hub?

You must first select a Migration Hub home region from the Migration Hub Settings page or via the Migration Hub Config API before using the Migration Hub and Application Discovery Service. The Migration Hub home region is the only AWS region used by the Application Discovery Service to store your discovery and planning data. The data in the Migration Hub home region serves as a single repository of Discovery and migration planning information for your entire portfolio, as well as a unified view of migrations into multiple AWS regions. To learn more about the Migration Hub's home region, consult the documentation.

The Migration Hub home region cannot be changed once it is set.

How is data protected while being transported to AWS?

The AWS Application Discovery Agent sends data to the AWS Application Discovery Service via HTTPS/TLS. The AWS Application Discovery Agent can be run in offline mode, which writes data to a local file, allowing customers to review collected data before enabling online mode.

Is it possible to run agentless Discovery in my EC2 instances?

No, the AWS Agentless Discovery Connector is installed on VMware and only collects data from VMware vCenter.

Conclusion

In this article, we have discussed concepts of AWS Application Discovery Agent. We started with an introduction, of how data is collected by the discovery agent, then we saw how we can install the agent on Linux and Windows, and in the end, concluded with agent data collection of AWS Application Discovery Agent.

We hope that this blog has helped you enhance your knowledge regarding AWS Application Discovery Agent and if you would like to learn more, check out our article AWS Step Functions.

For peeps out there who want to learn more about Data Structures, Algorithms, Power programming, JavaScript, or any other upskilling, please refer to guided paths on Coding Ninjas Studio. Enroll in our courses, go for mock tests and solve problems available and interview puzzles. Also, you can put your attention towards interview stuff- interview experiences and an interview bundle for placement preparations. Do upvote our blog to help other ninjas grow.

Do upvote our blog to help other ninjas grow. Happy Coding!

 

Previous article
AWS Application Discovery Service
Next article
AWS DataSync
Live masterclass