Your setup looks good, I believe metric limit was causing problem here. By default, the .net machine agent registers a maximum of 200 metrics. See Metrics Limits for more details. We can increase this by adding <metrics> element under machine agent,
<machine-agent> <metrics max-metrics="300"/> </machine-agent>
Regarding DLL based extension, here are quick steps-
- Create a new class lib project (c#)
- install nuget package for the application-
Install-Package AppDynamics.Agent.ExtensionSdk -Version 1.0.4
- This will add two class files in the project. For custom metric, you can write your code in SampleMetricExtension.CS file.
- You can add more references as needed to write your operation.
- Under <ExtensionManager>/extensions folder, create a new folder with name "CustomCodeExtension" (or anything)
- Create extension.xml file with following content-
<?xml version="1.0" encoding="utf-8"?>
<extension type="Metric" name="CustomCodeExtension" enabled="true">
<execution mode="Periodic" type="DLL" path="SampleMetricExtension" />
<description>Optional description for the custom extension.</description>
<metric name="metric1" />
<instance name="instance1" />
<add key="key1" value="value1" />
In above file-
- name="CustomMetricExtension" >> is the name of extension, it can be same as folder name
- path="SampleMetricExtension" >> is fully classified class name of extension class, basically ayy class extending AExtensionBase in custom extension project.
- You can set any number of metrics or instances and fill their value in execute method of SampleMetricExtension class.
- Compile the project and copy output assembly to the extension folder <ExtensionManager>/extensions/CustomCodeExtension
- Now restart extension service followed by restart of coordinator service
Let me know if you face any issues while creating this extension or have more questions.
... View more
Thanks for trying .NET extension service.
I am assuming you have created a standalone application in C# and calling that standalone appliication using cmd file. Basically you will still call scripit.cmd file, and in .cmd file you can call your exe.
Let me know if this is not correct.
This approach should work normally. You should be able to look into extension log file for any warning like, incorrect format received and it will try to print the line from cmd output.
There could be couple of issues-
- AppDynamics.Agent.Coordinator is not restarted after rerstarting AppDynamics.Agent.Extension service.
- Format of line outtput is not same as expected. It is space sensitive (but case insensitive)
Apart from that, have you looked into using DLL based custom extension. You can create a class library project, using nuget package "AppDynamics.Agent.ExtensionSdk". Let me know if you need more details about this.
... View more
Thanks for trying AppDynamics azurer site extension. The message in your screenshot is normal and harmless. In this message, agent is not initializing for scm worker process, which is expected.
Regarding agent not reporting anything, can you provide some more details-
Do we have load on the applicatioin
Do we have COR or Auth enabled for the webapp?
You can export diagnostic dump from kudu console and attach here so we can take a look.
... View more