APM Insight .NET Core Agent


Monitor your web applications built in .NET Core 2.0 and above using the APM Insight .NET Core agent. You can monitor HTTP requests, SQL queries, errors, exceptions, web API calls, and remote calls within your ASP .NET Core applications, whether they are hosted on IIS or Kestrel web servers.

Note: The .NET Core agent supports NET Core applications built with .NET core 2.0, 2.1, 2.2, 3.0, 3.1 and .NET 5.0, and 6.0.

Installing APM Insight .NET Core Agent

The .NET monitoring tool offered by Applications Manager provides comprehensive monitoring for .NET Core applications. To install the APM Insight .NET Core agent in Applications Manager, follow the steps provided below:

  1. Download the latest APM Insight .NET Core agent (apminsight-dotnetcoreagent.zip) and unzip the file.

    Note: Run a Checksum validation to verify the authenticity of the agent. Click here to learn more.

  2. Run Powershell in administrator mode and navigate to the location of unzipped agent.
    • For Versions from v6.3.0, install the .NET Core Agent by executing the below command:

      ./InstallAgent.ps1 -Destination "[path]" -InstallType "[local|global]" -LicenseKey [licenseKey] -ApmHost [APM-HOST] -ApmPort [APM-PORT]

      Example:

      ./InstallAgent.ps1 -Destination "G:\.NET_Core_Agent" -InstallType "local" -LicenseKey
      APMI_762cf0800fd41749008b5d73115a6841d8dee7e01fc2f451500d39786b593c39
      -ApmHost app-w8-test -ApmPort 9090

      where,

      Destination "[path]" → The location where the agent will be installed. May be an absolute or relative path. Wrapping quotes are also required.
      InstallType [local|global] → Determines whether the installation will be done locally or globally. Local install is the recommended installation type.

      Note: For Windows Service application monitoring, the global install type needs to be enabled.

      LicenseKey [licenseKey] → The license key copied from the Application Manager APM Insight homepage.

      [APM-HOST] → Host of Applications Manager

      [APM-PORT] → SSL Port of Applications Manager

    • For Versions upto v6.0.2, install the .NET Core Agent by executing the below command:

      ./InstallAgent.ps1 -Destination "[path]" -InstallType "[local|global]" -LicenseKey [licenseKey]

      where,

      Destination "[path]" → The location where the agent will be installed. May be an absolute or relative path. Wrapping quotes are also required.
      InstallType [local|global] → Determines whether the installation will be done locally or globally. Local install is the recommended installation type.

      Note: For Windows Service application monitoring, the global install type needs to be enabled.

      LicenseKey [licenseKey] → The license key copied from the Application Manager APM Insight homepage.

      Example:

      ./InstallAgent.ps1 -Destination "G:\.NET_Core_Agent" -InstallType "local" -LicenseKey APMI_762cf0800fd41749008b5d73115a6841d8dee7e01fc2f451500d39786b593c39

  3. Open the apminsight.conf file from the destination path in any text editor and include the following keys:

    apm.host=[APM-HOST]
    apm.port=[APM-PORT]

    Example:

    apm.host=app-w8-test
    apm.port=9007

  4. Note: The 4th step is not required for the version 6.3.0 and above.

  5. If the Applications Manager sends data through HTTP protocol, include the below line in apminsight.conf file:

    apm.protocol.https=false

  6. Configure the application filters if the .NET Core application is hosted on an IIS server.

  7. Start or restart the .NET Core application.

    Note: If you’re using an IIS server for reverse proxy via AspNetCoreModule, you’ll need to reset the IIS server.

  8. Perform some transactions to start monitoring.

    Note: Proxy the server for agent communication and configure the .NET Core agent via the appsettings.json file.

Note:To Change the .NET Core application name,
  1. Navigate to the application publish directory.
  2. Create or open the apmapplication.conffile, then add or modify the application name.

    application.name="[YourApplicationName]"

    Changing the application name only creates a new host whereas the previous host does not get deleted.

  3. Restart the .NET Core application.

Uninstalling APM Insight .NET Core Agent

To uninstall APM Insight .NET Core agent from application server, follow the below given instructions in that server:

  1. Stop the .NET Core applications that are being instrumented.
  2. Run Powershell in administrator mode and navigate to the unzipped agent path.
  3. Execute the script UninstallAgent.ps1 (Installed Agent directory will not be removed but the agent settings will be removed.)
  4. Restart the .NET Core application for the changes to take effect.
  5. Reset IIS if the applications are hosted in IIS.

With Applications Manager's Dot Net Core monitoring, you can optimize the performance of your .Net Core applications with unmatched visibility.