Install .NET Core Agent
Monitor your web applications built in .NET Core 2.0 and above with the help of the APM Insight .NET Core agent. You can track HTTP requests, SQL queries, errors, exceptions, web API calls, and remote calls in your ASP .NET Core applications hosted in IIS or Kestrel web servers.
Installation instructions:
- Log in to your Site24x7 account > APM > Add Application
- Download the .NET Core agent.
- Unzip the agent package to a suitable location.
Run a checksum validation to verify the integrity of the downloaded agent. Learn more.
- Run PowerShell in administrator mode.
- Navigate to the location of the unzipped agent and execute the command below.
- For local install
./InstallAgent.ps1 -Destination "YOUR_AGENT_INSTALL_PATH_HERE" -InstallType "local" -LicenseKey "YOUR_LICENSE_KEY_HERE"
- For global install
./InstallAgent.ps1 -Destination "YOUR_AGENT_INSTALL_PATH_HERE" -InstallType "global" -LicenseKey "YOUR_LICENSE_KEY_HERE"
- For local install
- Since global install will instrument all .NET Core applications unintentionally, Site24x7 recommends local install.
- If you want to monitor a standalone application or a Windows services, a global install is recommended.
- The destination path can be any folder at any drive in the machine. We recommend to not to use application's directory, since we may have to replace the application files periodically on every releases.
You have few options during installation as outlined in the table below.
Install option | Description |
Destination | Required. The absolute or relative path where agent will be installed. |
Install type | Required. Determines whether the agent has to be installed locally or globally. |
License key | Required. License key copied from Site24x7 Portal. |
Force | Optional. Overwrites exisiting installation. We recommend backing up the existing configuration files first. |
Help | Optional. Shows the guide to installing the agent. |
6. Configure the application filters, if the .NET Core application is hosted on 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.
Next step
If your application is a self-contained application, please follow the additional steps provided in this help page.
Note:
- If the application is not hosted on IIS server, follow the steps below to change the .NET Core application’s name:
- Navigate to the application's publish directory.
- Create or edit the apmapplication.conf file, then add or modify the application name using the key value below:
application.name=<Your customizable application name>
-
- Restart the application
- To use a proxy server for agent communication:
- Navigate to the agent home directory > Dot Net Agent.
- Edit the apminsight.conf file and add the key values below:
behind.proxy = true
proxy.server.host = <proxyserver>
proxy.server.port = <proxyport>
proxy.auth.username = <proxyuser>
proxy.auth.password = <proxypassword>
-
- Restart the .NET Core applications.
- Configure .NET Core agent via appsettings.json file
In general, when you download the Site24x7 APM Insight agent, the license key needs to be set separately in apminsight.conf. However, you can also set the license key in the app settings file instead of the conf file. Follow the instructions given below to do so.
- Open the appsettings.json file found under the current working directory of the application.
- Input the license key and application name as given below.
{
"site24x7": {
"license.key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"application.name": "Your_Application_Name"
}
} - The agent will look for the license key in the appsettings.json file. If it is not available, it will look for the license key in the environment variable.