Help Docs

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 Studio

Prerequisites:

  • AWS tool kit for Visual Studio.
  • 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 your device key in the parameter license.key=<YOUR_LICENSE_KEY>. You can obtain the license key from the Site24x7 console after creating your account.
    files:
      "C:\\ProgramData\\install.ps1":
          content: |
            Invoke-WebRequest -Uri https://staticdownloads.site24x7.com/apminsight/agents/apminsight-dotnetagent.msi -OutFile C:\\ProgramData\\Site24x7APMInsightAgent.msi
           "use.app.filters=false" | Set-Content C:\\ProgramData\\appfilter.conf
            msiexec.exe /i "C:\\ProgramData\\Site24x7APMInsightAgent.msi" /qb license.key=<YOUR_LICENSE_KEY> editconfig=false     APPFILTERCONFIGFILE=C:\\ProgramData\\appfilter.conf

    commands:
      install_agent:
        command: powershell -NoProfile -ExecutionPolicy Bypass -file C:\\ProgramData\\install.ps1
  4. To customize your application name:
    • Open web.config in your application 
      <configuration>
      <app settings>
      <add key="apminsight.name" value="Your_application_name" />  
  5. Publish the web app using "Publish to AWS" option, and follow the wizard
  6. Once the deployment is successful, generate some traffic to view data in Site24x7 Console.    

Deployment via uploading packages to AWS S3

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 and Update your device key in the parameter license.key=<YOUR_LICENSE_KEY>. You can obtain the license key from the Site24x7 console after creating your account.
    files:
      "C:\\ProgramData\\install.ps1":
          content: |
            Invoke-WebRequest -Uri https://staticdownloads.site24x7.com/apminsight/agents/apminsight-dotnetagent.msi -OutFile C:\\ProgramData\\Site24x7APMInsightAgent.msi
           "use.app.filters=false" | Set-Content C:\\ProgramData\\appfilter.conf
            msiexec.exe /i "C:\\ProgramData\\Site24x7APMInsightAgent.msi" /qb license.key=<YOUR_LICENSE_KEY> editconfig=false     APPFILTERCONFIGFILE=C:\\ProgramData\\appfilter.conf

    commands:
      install_agent:
        command: powershell -NoProfile -ExecutionPolicy Bypass -file C:\\ProgramData\\install.ps1
  4. To customize your application name:
    • Open web.config in your application 
      <configuration>
      <app settings>
      <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.
    • Create an application in the Elastic Beanstalk.
    • Create an environment with platform type as IIS.
    • Configure the required settings for the application and select Application source as 'Upload your own'.
    • Select the zip file with .ebextensions folder.
    • Launch the environment after giving the required parameters.
  7. If publishing to an existing environment.
    • Select the Elastic Beanstalk application and choose the environment for deployment.
    • Click on 'Upload and Deploy'.
    • In the prompt to upload, select the zip file with .ebextensions folder.
    • Label the deployment and click 'Upload'.
  8. Once the deployment is successful, generate some traffic to view the application in Site24x7 Console.

 

Was this document helpful?

Shortlink has been copied!