Hi Ronny,
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>
<metrics>
<metric name="metric1" />
</metrics>
<instances>
<instance name="instance1" />
</instances>
<parameters>
<add key="key1" value="value1" />
</parameters>
</extension>
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.
Thanks,
Anurag
... View more