APM Insight Troubleshooting - DotNet Agent

APM Insight Troubleshooting - DotNet Agent

1.) Which version of Agent should I use? The 32 bit or the 64 bit?

Agent should be chosen based on the application that you need to monitor. If 32 bit applications are to be monitored in IIS then install 32 bit agent. If 64 bit applications are to be monitored in IIS then install 64 bit agent. Both 32 bit and 64 bit agent CANNOT be installed in the same server.

2.) What should I do after installing the agent?
After installing the correct agent do some transactions on the application(s) you wish to monitor. This should be done because the .NET profiler hooks itself into the application process only during initialization of the CLR. To put it simply, agent will work only when some transaction are made on the application.

3.) How do I verify that the agent is actually hooked into the application process?
During initialization the agent creates logs in a .NetAgentNative... log file, the fact that logs are generated in the log folder is the indication that agent is successfully hooked itself into the application process. The agent will create a log file with the name beginning with .NetAgentNative. This is the agent profiler log file. When this log file is created we can be sure that agent is successfully hooked itself into the application process. This log file is created only after some transaction are done.

4.) How long will it take for the agent to send metrics to Applications Manager? 
The agent will send metrics available to Applications Manager every 1 minute.

5.) When should I restart the agent service?
The agent service should be restarted whenever a change is made in the Applications Manager settings in the config dialog. When the agent first contacts Applications Manager, an apminsight.net.info file will be creates in the  programData/dotnetagent/(x86 or x64) folder. This info file has to be deleted after restart. Also after restart some transactions have to be done for the agent to hook itself again.

6.) How can I make sure if the agent is properly installed and running?
After installation check the windows services for "ManageEngine .NET Agent x64 or x86" service. The status of this service should be "Started". To check if the connection between the host and Applications Manager is established, look for "Connection Successful" info message which will be logged in the windows service log.Once a successful connection is made you will be able to see your application in the APM Insight Tab in Applications Manager and see data in a few minutes.

7.) Where can I see the .NET agent logs?
The .NET agent logs can be found only in the common application folder (Usually C:ProgramData from Vista onwards. This is a hidden folder):
For 64 bit OS: DotNetAgentdAgentLogs 
For the 32 bit OS: DotNetAgent†AgentLogs

From 1.8.2 Version of APMInsight .NetAgent you can use APMInsight .NetAgent Health Monitor utility which is bundled with the agent installation to collect diagnostic information. You may run the Health Monitor utility for the following: (Start-->Programs-->ManageEngineDotnet Agent)

1.)To check whether the pre-requisite services and processes are running.

2.)Create a Diagnostics Zip file with all required logs from the agent side.

3.)You can also capture event log entries in this zip file.

8.) 0x80070002 HRESULT in Event viewer logs
This means that the profiler is not registered properly.
To register manually:
- Open command prompt using "Run as Administrator" option
- Type regsvr32 "path of the profiler"  (Profiler dll path is... Agent Installation PathDotNetAgentClrProfilerAgent.dll)
- Reset IIS by typing "iisreset"

Now try to perform a web transaction. Once the request is complete check the .Net agent logs if the application logs are available. If they are available, data will soon be visible in Applications Manager.

9.) The agent is not installed properly or agent is not starting up correctly or shows error during start. What should I do?
     - Stop the ManageEngine .NET Agent service
     - Open command prompt using "Run as Administrator" option
     - Type regsvr32 "path of the profiler"   (Profiler dll path is... Agent Installation PathDotNetAgentClrProfilerAgent.dll) 
     - Reset IIS by typing "iisreset"
     - Start the ManageEngine .NET Agent service

Now try to perform a web transaction. Once the request is complete check the .Net agent logs if the application logs are available. If they are available, data will soon be visible in Applications Manager.

10.) How can I make sure that the data is being collected properly?
After successful installation of the agent, look for the agent logs. Web application logs will appear only when one or more  transactions are performed. If the logs are available, check the APM Insight tab in Applications Manager. The application name which was configured will appear in the Overview tab. You will also see apdex scores for the transactions in the overview tab.

11.) "500 Internal error" in windows service logs
The "500 Internal Error" happens because the agent's instance id has been changed or deleted. To rectify this, delete the info file from C:Programdatadotnetagentdorx86apminsight.net.info. Wait for a minute for the service to reconnect to Applications Manager. Once it reconnects, the data should be available.

12.) What should I do for the "Pipeline being closed" Exception in logs?
If this exception occurs, it means the host is down or in a fault state. Agent must be restarted.

13.) The installer does not uninstall the agent properly. What should I do?
If the installer does not uninstall the agent properly, open the command prompt in administrator mode and paste the following command :
msiexec -i {D6871C70-0C3B-4C39-BABC-946D399550D1} REINSTALL=ALL REINSTALLMODE=vomus for x64
msiexec -i {6C198BBF-CACA-4631-A5D3-5F44C92ACB3E} REINSTALL=ALL REINSTALLMODE=vomus for x86
This will uninstall the agent.

14.) How can I change the log level for the .NET agent ?
Start -> All Programs-> ManageEngine .Net Agent(x64)->Edit configuration->In the 'Log Level' combo box change the log level to 'debug'.

15.) Steps to be followed to install agent in Windows Server 2003 or HRESULT is 0x8007007e in event logs.
1. Copy the ClrProfilerAgent.dll from the installation directory of the agent. (Typically it is found in C:Program FilesManageEngineAPM Insight .NET Agent (x86)DotNetAgentClrProfilerAgent.dll).

2. Paste the dll in %SystemRoot%System32

3. Unregister the ClrProfilerAgent.dll. In command prompt go to the installation pathDotNetAgent , type the command.You will get a message that the dll is unregistered.

regsvr32 -u ClrProfilerAgent.dll

4. Go to %SystemRoot%system32 (where we copied our agent dll) and register our agent dll by typing below command.You will get a message that the dll is registered.

regsvr32 ClrProfilerAgent.dll

Once you have done this,perform some web transactions. Then check the log folder (C:Document and settingsAllUsersApplication DatadotNetAgent†AgentLogs.

Check for log file with similar like this .NetAgentNative.w3wp.exe.796.log.

16.)Why does the "Edit configuration" dialog show an error message during launch/save?
The settings dialog requires read/write permissions for the following directories,
  • APM Insight .NET agent installation path and all sub directories
  • %WINDIR%ProgramDataDotnetAgent and all sub directories
  • IIS application directories and their respective "web.config" file.
Check if the current user has access to all these directories. If the issue still persists, launch the dialog as Administrator (by right clicking -> Run as Administrator) and verify.
Note: When ever an error occurs it will be captured in the errors Window the link to which will be at the bottom of the settings dialog.

17.)Why does the "App Filters" tab not show any IIS Application?
The settings dialog requires read permissions for IIS applications and read/write access for their respective "web.config" file. Please check the permission settings of current user for web.config, applicationHost.config and redirection.config files.
When there are errors in load/save, a link "Click here to view errors" will show up at the bottom of the settings window. Clicking this launches a dialog that lists all the errors encountered in the "Edit configuration" dialog. The same information is logged in the AgentLogs folder (in %WINDIR%ProgramDataDotNetAgentd or †).

18.)Why is the "Apm Insight keys" text box disabled?
The "APM Insight keys" text box, in AppFilter tab, will be disabled in the following scenarios:
  • The application is not selected for monitoring
  • The APM Insight .NET Agent windows service is running. In this case, stop the agent service and re-open the "Edit configuration" dialog.
19.)Why are the changes in App Filters tab sometimes not saved to IIS ?
This could happen if there are conflicts in the application settings of two applications. For instance, if 2 applications are given the same name, and one of them is selected for monitoring and the other is not. In such case, application selected for monitoring is given preference. Also, ensure the access settings mentioned in FAQ#1 is configured correctly.

20.)Why are changes in selection not retained on re-open ?
Refer FAQ#19 above. If "Use ApmInsight keys" is unselected, all root applications (viz a viz, sites/) will have domain name as "ROOT". So even if one root application is selected for monitoring and other root applications are skipped, all root application will be shown as selected.

21.)Why is App Filters tab not displaying any applications in Windows Server 2003/IIS 6.0 ?
Filtering web applications to be monitored through App Filters in Settings UI is supported for applications running in IIS 7.0 and above. To filter your applications in IIS 6.0 see "Filter Web Applications manually" section above.

          • Related Articles

          • Uninstrumented Block of Code - APM Insight

            In the traces tab --> Slowest Method Calls and Count we show if you find Un-instrumented block of code the reason is as follows: Basically, What is un-instrumented block of code in APM Insight? By default, APM Insight agent monitors known frameworks ...
          • APM Insight Troubleshooting tips - Java Agent

            Check out our APM Insight User Guide for Java Agent More FAQs 1. How to add an APM Insight Monitor?           After you deploy APM Insight agent in your Application Server with suitable Applications Manager credentials in apminsight.conf, APM Insight ...
          • APM Insight Troubleshooting Tips - Ruby on Rails Agent

            Check out our APM Insight User Guide for Ruby on Rails Agent More FAQs 1. How can I install APM Insight Agent for Ruby on Rails Applications?       Install the APM Insight Agent for Ruby on Rails Applications by using the command: gem install ...
          • Troubleshooting communication between APM Insight Agent and Applications Manager

            APM Insight agent communicates to the Applications Manager through the HTTP/HTTPS protocol. Make sure the communication between Applications Manager server and agent server via HTTP/HTTPS is allowed in firewall.To check , open a browser in the APM ...
          • Real User Monitor (RUM) - Troubleshooting

            If the monitor has not polled data for long time. Follow below steps for troubleshooting Check prerequisites to done : Real User Monitor requires RUM Agent to be installed and mapped to Applications Manager. Refer the help page to know how to setup ...