Splunk AppDynamics

Monitoring a stand-alone C# .NET application

CommunityUser
Splunk Employee
Splunk Employee

Hi,

Ive a controller and a single .Net Agent - to moniter a standalone .Net exe - Ive followed the .Net Agent config wizard (given the Name and Account Key - in the config file at C:\Program

Files\AppDynamics\AppDynamics .NET Agent\Config\config.xml).

The agent shows up in the controller GUI - under the "Tiers & Node" section - but I also see a lot of warnings in the top right corner of the controller GUI:

Agent license request denied. Agent type: ; Host: machinename; Reason: Not licensed for controller

Also , in the controller GUI - is there any place I can see the agent profile logs - ie where can I see the output of the profiling being done of the standalone app - can you please let me know,

Labels (1)
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi @Anonymous

Thank you for posting your queries on the AppDynamics Community.

If you find the response from @Raunak.Mohanty is useful and if it answers your question, please go ahead mark it as the Accepted Solution using the button in the message body. Marking a response as an accepted solution helps others find their answers quickly and efficiently.

Keep us posted if you need further assistance.

Thank you

Radhika

0 Karma

Raunak_Mohanty
Builder
Hi,

What is the value of Agent type you see in those alerts ? Do you have enough .Net Agent licenses ?

Now regarding instrumenting standalone applications you will need to follow
https://docs.appdynamics.com/display/PRO45/Configure+the+.NET+Agent+for+Windows+Services+and+Standal...

Also you may not not see any BTS getting identified. For which you will need to create Custom Match Rules of type .Net Class/Method
https://docs.appdynamics.com/display/PRO45/POCO+Entry+Points

You can use Live Preview to identify appropriate Class/Method to create POCO on
https://docs.appdynamics.com/display/PRO45/Custom+Match+Rule+Live+Preview

Thanks,
Raunak

CommunityUser
Splunk Employee
Splunk Employee

Ive a trail version of the controller and the .Net agent.

The .Net Agent was configured using the AppDynamicAgentConfiguration - where after giving controller configuration (accountname and account access key)  showed "Controller connection succeeded"

The agent type in the alert is blank - I see the below message:

Agent license request denied. Agent type: ; Host: XXXXXX; License Rule: Default; Reason: Not licensed for controller (please chgeck Licence error.png)

Also - on my Controller - under Licence->Rules-> I see 0 of 0 .Net agents. Also it's not allowing me to allocate 1 to the .Net agent. How can I set this? - I just want to use a single .Net Agent.

Also in the WarnLog.txt file (under AgentLogs) - I see the below errors - how can I resolve these errors:

2018-09-27 18:34:43.6634 22380 MyStandAlone.exe 1 12 Warn ConfigurationChannel Problem with appagent registration. Status:Agent license request denied. Agent type: .NET; Host: XYXMachineName; License Rule: Default; Reason: No license available
2018-09-27 18:34:43.6634 22380 Lehman.Euclid.Apps.GTRFeed2 1 12 Warn ConfigurationChannel Auto agent registration FAILED! Check the controller log for details.

0 Karma

Ayush_Ghosh
Path Finder

Have you added the license file to the controller?

If so, and it's still not showing the entitlements, you may need to login into the <controller-host>/controller/admin.jsp Admin page, and allocate the licenses.

After Login -> Account.

Then you can allocate the same licenses in the License Page.

Let us know if you have queries.

Thanks

Ayush

CommunityUser
Splunk Employee
Splunk Employee

Hi,

Ive been using a LIC file which I placed under C:\AppDynamics\Platform\controller. This LIC file was the one which I'd got when I'd downloaded the trail version of the controller ie platform-setup-x64-windows-4.5.1.13594. But through this file - Im getting the problems (agent problems which Ive described earlier)

Can you please give me a different file LIC which would enable me to use the controller and the .net agents. Ive been trying to make a POC for using appdyanmic for our application.

Raunak_Mohanty
Builder
Hi Mohak,

Can you send me the content of license file as a private message so that I can review it ?

Thanks,
Raunak
0 Karma

Raunak_Mohanty
Builder

Hi Mohak,

As you can see in your license file, you have only licenses available to use PHP and Python language agents, .net Agent are not able to connect and throwing errors

property_no-of-python-app-agent-license-units=5
property_no-of-php-agent-license-units=5
startDate=1537182654624
property_mobile-license-allows-overages=false
property_edition=ENTERPRISE_TRIAL
property_transaction-analytics-volume-no-of-license-units=0
property_transaction-analytics-retention-period-no-of-license-units=90
property_no-of-machine-sim-license-units=0
property_eum-license-allows-overages=false
property_eum-license-type=EUM_LITE

What you need to do is connect with your Sales Rep/Account Manager so that .Net Agent trial licenses can be included as well.

Or you can create a new query at the following area and someone from Licensing team will get in touch with you.

https://community.appdynamics.com/t5/Licensing/bd-p/Licensing

Thanks,

Raunak

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
hi Raunak,

Also can you please confirm that this LIC file needs to be copied at C:\AppDynamics\Platform\controller

Raunak_Mohanty
Builder

That is correct.

Thanks,

Raunak

CommunityUser
Splunk Employee
Splunk Employee

Hi ,

I'd reached out to sales and received a new LIC file - which I'd placed as per instructions it worked now.

Ive now one .Net agent - monitering a standalone .Net exe. I see the .Net agent profiling the exe - thrugh the logs at C:\Program Files\AppDynamics\AppDynamics .NET Agent\Logs\Profiler - but I dont see any such info on the controller GUI - as business transactions or profileing information about the exe Im trying to profile.

Can you please suggest how can I see those logs/events/business transactions in my GUI (about by .Net Agent monitering standalone .Net exe)

0 Karma

Raunak_Mohanty
Builder

The following guide explains how AppDynamics detects Business Transactions and what you can do if AppDynamics doesn't recognize your application's Business Transactions out of the box.

How does AppDynamics detect new Business Transactions?

AppDynamics detects new Business Transactions by recognizing a particular set of "entry" methods in the callstack of the executing application. When one of these methods is hit, a new Business Transaction starts and all methods executing downstream of this method are instrumented.

No Business Transactions were detected in my application, now what?

In cases where no recognized Business Transaction entry methods are hit, we can enable the agent node property named find-entry-points to find some. With find-entry-points enabled, AppDynamics will log a call stack to BusinessTransaction.logeach time a recognized outgoing call is made. For example, any HTTP/ASMX/WCF/Remoting service, DB, or MQ call. You can find the BusinessTransactions.log in the agent logs folder.

We can then review these callstacks to determine which method will make a suitable "entry" point to begin a Business Transaction.

Callstack example shows what code is running in the application

The following callstack is an example of what we might find in the BusinessTransactions.log after enabling find-entry-points. It should be read from the bottom up. That is, methods furthest down executed first. Look for callstacks following Thread Empty_Name >> which means they are not part of any existing BT.

... BusinessTransactions Logging request stack for Thread Empty_Name >>AppDynamics.Agent.ManagedAPI.ps.kk
AppDynamics.Agent.Interceptors.ww.jv
AppDynamics.Agent.MethodExecutionEnv.MethodBegin
System.Data.SqlClient.ExecuteReader() <---AppDynamics recognized this as an exit and logged the callstack.
MyCompany.MyClass.DataAccess.FindCustomerData()
MyCompany.MyClass.BusinessLogic.TransformCustomerData()
MyCompany.MyClass.UI.btnFindCustomerData_OnClick()
System.Windows.Forms.Button.OnClick()
System.Windows.Form.ButtonBase.WindProc(...)
System.Windows.Forms.NativeWindow.Callback(...)

We can see that this is a Windows Forms application where a particular button was clicked to find customer data. Once that button was clicked, an outgoing database call was made which AppDynamics recognized. From this point, AppDynaimcs code was executed to log the callstack to the BusinessTransaction.log file.

Which application method would make a good Business Transaction entry point?

Remember, methods executed first are at the bottom of the callstack. Looking at methods that executed before the database call, we can see that MyCompany.MyClass.UI.btnFindCustomerData_OnClick() is a custom developed code that would make a suitable starting point for this unique Business Transaction to begin. All methods which execute after this method are also tracked as part of this Business Transaction. If we use a method that executed before this one, for instance System.Windows.Forms.Button.OnClick(), every application button click would be tracked as part of the same business transaction, which is not ideal for troubleshooting. We want to make sure separate code paths are tracked as separate Business Transactions.

OK I've found a suitable Business Transaction entry point method, now what?

Once we've found a suitable BT entry point, we can configure a .NET Class/Method Custom Match Rule to let AppDynamics know that this method marks the start of a new Business Transaction. Once you've created the Custom Match Rule, you'll need to wait a minute or two for the rule to be brought down to the agent, then restart the application for the change to go into effect. Once in effect, you should see your Business Transaction show up in the controller.

Just let us know if you have any further questions regarding this.

Thanks,
Raunak

Get Updates on the Splunk Community!

Get Schooled with Splunk Education: Explore Our Latest Courses

At Splunk Education, we’re dedicated to providing incredible learning experiences that cater to every skill ...

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...