Hi guys,
I am POC'ing AD 4.2 in my environment and I came to the point I would like to see how it works with our Legacy applications, which are COM+ applications. I read the docs for Instrumenting Standalone Applications and added this under app-agents in config.xml:
<standalone-applications>
<standalone-application executable="dllhost.exe">
<tier name="legacyapp-dllhost" />
</standalone-application>
</standalone-applications>
I am not able to get anything back, and it could as well be that AD is unable to auto-detect the application.
Before I delve into figuring out POCO Entry Points, I was wondering if the above is the correct way to start instrumenting COM+ applications.
Can anyone confirm/suggest anything?
Thank you
Hi ,
The error you are getting, most likely means that Agent is not able to validate the command line argument that you have passed. Agent does a match of type "contains" so can you try using part of the argument ( must be unique) w/o any spaces and special charachters. For example just the GUID.
After changing the configuration recycle both the Agent Coordinator Service and instrumented application.
The other thing to notice here is the appdomain that comes up is default domian which agent does not monitor OOTB. so we will also need to enable default domain instrumentation.
https://docs.appdynamics.com/display/PRO42/Instrument+the+DefaultDomain+for+Standalone+Applications
Once your tier gets registered,next step is to define Custom Match Rules of type .Net Class/Method. The reason being .Net AGent does not know where start a business transaction in case of stanalone application which is different from start MS Frameworks ( Asp.net/WCF/MVC etc).
To create POCO entry points we need to follow
https://docs.appdynamics.com/display/PRO42/POCO+Entry+Points
Thanks,
Raunak
Hi,
.Net Agent can only instrument applications built using .Net Framework 2.0 and above. This is true for Standalone Applications and Window Services as well.
If the snadalone application is not built using managed code then Agent cannot hook into the process and instrument it.
Good way of identifying whethere an application is .Net based is using ILSpy decompiler. If we open the executable we are trying to instrument using ILSpy it will tell us whether the assembly/executable is managed or not.
For instrumentng Native Application please use following document
https://docs.appdynamics.com/pages/viewpage.action?pageId=34275181
Thanks,
Raunak
Thanks for your reply, Raunak. The app is using .NET 2.0 so in theory it should work.
I augmented the configuration to include an argument which will tie to the correct dllhost.exe process:
<standalone-application executable="dllhost.exe" command-line="/Processid:{0AEC3907-4715-4BD1-89F6-D64A18F1DA53}">
And noticed this in the agent log file:
2016-04-13 11:49:05.3282 3684 dllhost 1 6 Info LifetimeManager Running obfuscated agent
2016-04-13 11:49:05.3282 3684 dllhost 1 6 Info LifetimeManager Agent version:4.2.1.61
2016-04-13 11:49:05.3750 3684 dllhost 1 6 Info Configuration appDomainName=DefaultDomain appDomainId=1 iis-app=null site=null port=null appPoolId= commandLine=C:\Windows\SysWOW64\dllhost.exe /Processid:{0AEC3907-4715-4BD1-89F6-D64A18F1DA53}
2016-04-13 11:49:05.5469 3684 dllhost 1 6 Warn Configuration Problem loading the configuration: System.NullReferenceException: Object reference not set to an instance of an object.
at AppDynamics.Agent.hi..cctor()
2016-04-13 11:49:05.5313 5500 AppDynamics.Coordinator 1 10 Info ConfigurationManager Not instrumenting DefaultDomain for process dllhost pid 3684
Anything else I could try to figure out what's wrong to yield that null pointer exception?
Thank you
Hi ,
The error you are getting, most likely means that Agent is not able to validate the command line argument that you have passed. Agent does a match of type "contains" so can you try using part of the argument ( must be unique) w/o any spaces and special charachters. For example just the GUID.
After changing the configuration recycle both the Agent Coordinator Service and instrumented application.
The other thing to notice here is the appdomain that comes up is default domian which agent does not monitor OOTB. so we will also need to enable default domain instrumentation.
https://docs.appdynamics.com/display/PRO42/Instrument+the+DefaultDomain+for+Standalone+Applications
Once your tier gets registered,next step is to define Custom Match Rules of type .Net Class/Method. The reason being .Net AGent does not know where start a business transaction in case of stanalone application which is different from start MS Frameworks ( Asp.net/WCF/MVC etc).
To create POCO entry points we need to follow
https://docs.appdynamics.com/display/PRO42/POCO+Entry+Points
Thanks,
Raunak
Thanks for the reply, I was able to get the app registered and it now appears as a node in the expected tier.
I will proceed to the POCO entry points, but we should be good now.
Many thanks for your prompt assistance.