Installing the .NET and .NET Core agents in a Kubernetes environment is similar to installing the standard .NET agent in Windows, except that you must configure the DockerFile to perform the installation.
[YOUR_LICENSE_KEY] with your actual APM Insight license key from Applications Manager.[YOUR_APP_NAME] with your application name.Below is an example of configuring the .NET agent on a Windows Kubernetes container:
FROM mcr.microsoft.com/dotnet/framework/aspnet
EXPOSE 80
# Publish your application
COPY [YOUR_APP_TO_BE_PUBLISHED] /inetpub/wwwroot
# Download the APM Insight .NET agent installer
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;\
Invoke-WebRequest "https://www.manageengine.com/products/applications_manager/54974026/apminsight-
dotnetagent.msi" -UseBasicParsing -OutFile "apminsight-dotnetagent.msi"
# Install the APM Insight .NET agent
RUN Start-Process -Wait -FilePath msiexec -ArgumentList /i, "apminsight-
dotnetagent.msi", /qn, editconfig=false, useappfilters=false, license.key=[YOUR_LICENSE_KEY], apm.host=
[APM_HOST], apm.port=[APM_PORT]
# Remove the APM Insight .NET agent installer
RUN Remove-Item "apminsight-dotnetagent.msi"
# Set your application name
ENV APMINSIGHT_APP_NAME=[YOUR_APP_NAME]Below is an example of configuring the .NET agent on a Linux Kubernetes container:
# Use Linux-based ASP.NET runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0
# Set working directory
WORKDIR /app
# Copy your published app
COPY [YOUR_APP_TO_BE_PUBLISHED_FOLDER]/ . # replace with your actual published app folder path
# Use wget to download and install APM Insight Data Exporter & agent
RUN apt-get update && \
apt-get install -y wget ca-certificates unzip && \
RUN wget -O InstallDataExporter.zip https://www.manageengine.com/products/applications_manager/54974026/InstallDataExporter.zip && unzip InstallDataExporter.zip && \
RUN sh InstallDataExporter.sh -root -nsvc -lk "[YOUR_LICENSE_KEY]" -apm.host "https://[APM_HOST]:[APM_PORT]" && \
wget -O InstallNetCoreAgent.zip https://www.manageengine.com/products/applications_manager/54974026/InstallNetCoreAgent.zip && unzip InstallNetCoreAgent.zip && \
sudo -E ./InstallNetCoreAgent.sh -Destination "/opt/apminsight/dotnet" -LicenseKey "[YOUR_LICENSE_KEY]"
# set the env variables for the APM Insight Agent
ENV APMINSIGHT_LICENSEKEY="[YOUR_LICENSE_KEY]"
ENV APMINSIGHT_APP_NAME="[YOUR_APP_NAME]"
ENV CORECLR_ENABLE_PROFILING=1
ENV CORECLR_PROFILER="{9D363A5F-ED5F-4AAC-B456-75AFFA6AA0C8}"
ENV DOTNETCOREAGENT_HOME="/opt/manageengine/ManageEngineDotNetCoreAgent"
ENV CORECLR_PROFILER_PATH_64="/opt/manageengine/ManageEngineDotNetCoreAgent/x64/libClrProfilerAgent.so"
ENV CORECLR_PROFILER_PATH_32="/opt/manageengine/ManageEngineDotNetCoreAgent/x86/libClrProfilerAgent.so"
ENV DOTNET_STARTUP_HOOKS="/opt/manageengine/ManageEngineDotNetCoreAgent/netstandard2.0/DotNetAgent.Loader.dll"
ENV MANAGEENGINE_COMMUNICATION_MODE="ExporterService"
# Expose the required for your app port (adjust if needed)
EXPOSE 80
# Set entrypoint
ENTRYPOINT ["dotnet", "YOUR_APPLICATION.dll"] # replace with your actual app DLLIt 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