How to Install .NET agent on AWS Elastic Beanstalk?

How to Install .NET agent on AWS Elastic Beanstalk?

One of the two options listed below can be used to install APM Insight agent onto a .NET web application hosted in Elastic Beanstalk environment via ebextensions.
  1. Deployment through AWS kit for Visual Studio.
  2. Deployment via uploading packages to AWS S3.
Deployment through AWS tool kit for Visual Studioshortlink
Deployment via uploading packages to AWS S3shortlink
Deployment through AWS tool kit for Visual Studioshortlink
Prerequisites
  1. AWS tool kit for Visual Studio.
  2. AWS Developer access keys. 
Steps
1. Open the project in visual studio, and add a folder with the name .ebextensions (if not present already).
2. Under the .ebextensions folder add a file named apminsightExtn.config.
3. Paste the following content in the file. Update the Applications Manager host, port, License key and Applications name in the parameters: 
  1. license.key=<YOUR_LICENSE_KEY> 
  2. apm.host=<APM_HOST>
  3. apm.port=<APM_SSL_PORT>
  4. SITE24X7_APP_NAME=<YOUR_APPLICATION_NAME>
  1. files:
  2. "C:\\ProgramData\\install.ps1":
  3. content: |
  4. Invoke-WebRequest -Uri https://www.manageengine.com/products/applications_manager/54974026/apminsight-dotnetagent.msi -OutFile C:\\ProgramData\\APMInsightAgent.msi
  5. msiexec.exe /i "C:\\ProgramData\\APMInsightAgent.msi" /qb license.key=<YOUR_LICENSE_KEY> editconfig=false useappfilters=false apm.host=<APM_HOST> apm.port=<APM_SSL_PORT> apm.protocol.https=True SITE24X7_APP_NAME=<YOUR_APPLICATION_NAME>

  6. commands:
  7. install_agent:
  8. command: powershell -NoProfile -ExecutionPolicy Bypass -file C:\\ProgramData\\install.ps1
4. To customize your application name: Open web.config in your application
  1. <configuration>
  2. <app settings>
  3. <add key="apminsight.name" value="Your_application_name" />  
5. Publish the web app using the Publish to AWS option, and follow the wizard.
6. Once the deployment is successful, generate some traffic to view data in Applications Manager UI.    
Deployment via uploading packages to AWS S3shortlink
Steps
1. In the web application to be published, add a folder named .ebextensions (if not present already).
2. Under the .ebextensions folder add a file named apminsightExtn.config.
3. Paste the following content in the file. Update the Applications Manager host, port, License key and Applications name in the parameters: 
  1. license.key=<YOUR_LICENSE_KEY> 
  2. apm.host=<APM_HOST>
  3. apm.port=<APM_SSL_PORT>
  4. SITE24X7_APP_NAME=<YOUR_APPLICATION_NAME>
  1. files:
  2. "C:\\ProgramData\\install.ps1":
  3. content: |
  4. Invoke-WebRequest -Uri https://www.manageengine.com/products/applications_manager/54974026/apminsight-dotnetagent.msi -OutFile C:\\ProgramData\\APMInsightAgent.msi
  5. msiexec.exe /i "C:\\ProgramData\\APMInsightAgent.msi" /qb license.key=<YOUR_LICENSE_KEY> editconfig=false useappfilters=false apm.host=<APM_HOST> apm.port=<APM_SSL_PORT> apm.protocol.https=True SITE24X7_APP_NAME=<YOUR_APPLICATION_NAME>

  6. commands:
  7. install_agent:
  8. command: powershell -NoProfile -ExecutionPolicy Bypass -file C:\\ProgramData\\install.ps1
4. To customize your application name: Open web.config in your application
  1. <configuration>
  2. <app settings>
  3. <add key="apminsight.name" value="Your_application_name" />  
5. Include this .ebextensions folder when creating application zip for publishing.
6. If publishing is done for the first time.
  1. Create an application in the Elastic Beanstalk.
  2. Create an environment with platform type as IIS.
  3. Configure the required settings for the application and select Application source as Upload your own.
  4. Select the zip file with .ebextensions folder.
  5. Launch the environment after giving the required parameters.
7. If publishing to an existing environment.
  1. Select the Elastic Beanstalk application and choose the environment for deployment.
  2. Click on Upload and Deploy.
  3. In the prompt to upload, select the zip file with .ebextensions folder.
  4. Label the deployment and click Upload.
8. Once the deployment is successful, generate some traffic to view the application in Applications Manager UI.

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to install .NET agent on Azure app services?

                      You can track the performance of your .NET and .NET Core web app's key metrics like response time, throughput, and Apdex score via the APM Insight .NET agent hosted in Azure App Services. Installing APM Insight extension via Azure portal 1. Log in to ...
                    • How to Install .NET agent via command line

                      Follow the instructions given below to install APM Insight .Net agent via command line: Download APM Insight .NET agent (apminsight-dotnetagent.msi)  here. Navigate to the path where you have downloaded the msi file and execute the following command: ...
                    • Troubleshoot - RUM Agent silent installation

                      RUM Agent silent installation can fail on various factors based on your environment, troubleshoot with the help of error message shown while running the script. Below are the list of the error messages thrown from the script and its troubleshooting ...
                    • How to add an APM Insight Python agent in Kubernetes via InitContainers?

                      Adding the APM Insight Python agent via init containers in Kubernetes enables the seamless integration of performance monitoring for Python applications, ensuring efficient tracking and analysis of application behavior within the Kubernetes ...
                    • How to add an APM Insight Node.js agent in Kubernetes via InitContainers?

                      To integrate the APM Insight Node.js agent into your Kubernetes applications using InitContainers, follow the steps given below: Step 1: Create an empty volume that will be used to copy the agent files during the initContainers process. Example: ...