Schedule demo

Installing .NET Agent on Linux


The following steps will guide you through installing the APM Insight .NET agent on a Linux system using Applications Manager.

Prerequisites

The Applications Manager Data Exporter is required for .NET Core Linux Agent monitoring. Ensure the Data Exporter is installed and running before proceeding with the agent setup.

Note: The Data Exporter acts as a data receiver and exporter, relaying performance metrics collected by the .NET agent to Applications Manager.

Installation Steps

  1. Install the Applications Manager Data Exporter for Linux to enable communication with the Applications Manager server.
  2. Run the following commands to install the .NET agent for Linux:
    wget -O InstallNetCoreAgent.zip https://www.manageengine.com/products/applications_manager/54974026/InstallNetCoreAgent.zip && unzip InstallNetCoreAgent.zip
    sudo -E ./InstallNetCoreAgent.sh -LicenseKey [LICENSE KEY] -ExporterHost [DataExporter Host] -ExporterStatusPort [DataExporter Status Port] -ExporterDataPort [DataExporter Data Port]
    where,
    • [DataExporter Host] - Specify the domain name of the server where the exporter is hosted. By default, localhost
    • [DataExporter Status Port] - This port is used to expose the exporter's status information. By default, 20021
    • [DataExporter Data Port] - This port is used for transmitting monitoring data. By default, 20022
    • [LICENSE KEY] - Applications Manager license key

    For example,

    wget -O InstallNetCoreAgent.zip https://www.manageengine.com/products/applications_manager/54974026/InstallNetCoreAgent.zip && unzip InstallNetCoreAgent.zip
    chmod +x InstallNetCoreAgent.sh && sudo -E ./InstallNetCoreAgent.sh -LicenseKey [LICENSE KEY] -ExporterHost localhost -ExporterStatusPort 20021 -ExporterDataPort 20022

    Note: "appmanager-user" user/group is automatically created as part of the AppManagerDataExporter installation process along with APM Insight .NET Agent Linux. This is a security best practice to ensure the Data Exporter runs under a restricted service account instead of root. It is required for secure data collection from .NET agents and does not impact any existing users or application permissions.

  3. Once the installation is complete, configure the agent environment by choosing any one of the following methods to load the agent into your .NET application:
    • Run Wrapper Script:
      1. Locate the run-dotnetapm.sh script in the agent installation directory:
        /opt/manageengine/ManageEngineDotNetCoreAgent/scripts/
        You can also access this location using the environment variable APMINSIGHT_SCRIPTS_PATH.
      2. Set the APMINSIGHT_APP_NAME environment variable to define the monitor name for your application:
        export APMINSIGHT_APP_NAME="<your.monitor.name>"
      3. Start your application using the wrapper script. Replace your usual command (dotnet Your_Application.dll) with the following command:
        $APMINSIGHT_SCRIPTS_PATH/run-dotnetapm.sh dotnet Your_Application.dll
        This ensures that the dotnet agent loads automatically when your application starts.
    • Shell Environment Script: You can use the shell environment script to configure the agent for your shell session.
      1. Locate the set-shell-env.sh script in the following directory:
        /opt/manageengine/ManageEngineDotNetCoreAgent/scripts/
        Alternatively, use APMINSIGHT_SCRIPTS_PATH.
      2. Set the APMINSIGHT_APP_NAME environment variable to define your application's monitor name:
        export APMINSIGHT_APP_NAME="<your.monitor.name>"
      3. Load the agent configuration using one of the following options:
        • Run the following command to load the required environment variables, then start your .NET application:
          source $APMINSIGHT_SCRIPTS_PATH/set-shell-env.sh
        • Add the script to your .bashrc profile so that every new shell automatically loads the agent configuration.
          echo 'source $APMINSIGHT_SCRIPTS_PATH/set-shell-env.sh' >> ~/.bashrc
    • Manual Configuration: Manually set the following environment variables to enable .NET agent monitoring:
      CORECLR_ENABLE_PROFILING=1
      CORECLR_PROFILER="{9D363A5F-ED5F-4AAC-B456-75AFFA6AA0C8}"
      DOTNETCOREAGENT_HOME="/opt/manageengine/ManageEngineDotNetCoreAgent"
      CORECLR_PROFILER_PATH_64="/opt/manageengine/ManageEngineDotNetCoreAgent/x64/libClrProfilerAgent.so"
      CORECLR_PROFILER_PATH_32="/opt/manageengine/ManageEngineDotNetCoreAgent/x86/libClrProfilerAgent.so"
      DOTNET_STARTUP_HOOKS="/opt/manageengine/ManageEngineDotNetCoreAgent/netstandard2.0/DotNetAgent.Loader.dll"
      APMINSIGHT_LICENSEKEY="YOUR_LICENSE_KEY"
      APMINSIGHT_APP_NAME="YOUR_APPLICATION_NAME"
      Specify the values for APMINSIGHT_LICENSEKEY as well as the APMINSIGHT_APP_NAME (optional) environment variables to connect and to define your application’s display name in Applications Manager.
  4. After completing the above configuration, start or restart your application for the changes to take effect.
  5. Perform some transactions in your application. The metrics will then be reflected in the Applications Manager GUI.

Loved by customers all over the world

"Standout Tool With Extensive Monitoring Capabilities"

It allows us to track crucial metrics such as response times, resource utilization, error rates, and transaction performance. The real-time monitoring alerts promptly notify us of any issues or anomalies, enabling us to take immediate action.

Reviewer Role: Research and Development

carlos-rivero
"I like Applications Manager because it helps us to detect issues present in our servers and SQL databases."
Carlos Rivero

Tech Support Manager, Lexmark

Trusted by thousands of leading businesses globally