# Extension 2.0 - where does the logic go?

**URL:** <https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496>\
**Category:** Extensions\
**Tags:** extensions\
**Created:** [May 18, 2021, 5:04am UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496 "2021-05-18T05:04:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ct\_27](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ct_27/32/10499_2.png) [@ct\_27](https://community.dynatrace.com/u/ct_27)\
**Post date:** [May 18, 2021, 5:04am UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/1 "2021-05-18T05:04:52Z")

</div>

Could someone please help explain where the code goes for Extension 2.0?

I’ve played with OneAgent and ActiveGate extensions by writing my own Python code that runs every 1 minute.&nbsp; I understand a fair amount about Extensions 2.0 YAML, JSON, and ZIP thanks to this great blog post ([Extensions — Dynatrace Docs](https://www.dynatrace.com/news/blog/extend-dynatrace-automation-and-ai-capabilities-more-easily-than-ever/))&nbsp; and help site ([Extensions — Dynatrace Docs](https://www.dynatrace.com/support/help/extend-dynatrace/extensions20/)&nbsp;).

But, I can’t seem to figure out where I place the logic that knows what to do with the YAML and JSON configuration data to obtain metrics or perform some logic on data to produce a metric. Is maybe Extensions 2.0 not a replacement for what we can currently do with ActiveGate and OneAgent extensions?

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [May 18, 2021, 7:35am UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/2 "2021-05-18T07:35:57Z")

</div>

Hi,

Coded extensions and local extensions in the 2.0 framework is planned for the future. For now it’s only possible to gather data using the declarative YAML format, for example for SNMP polling.

Mike

---

<div class="post-metadata">

**Author:** ![ct\_27](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ct_27/32/10499_2.png) [@ct\_27](https://community.dynatrace.com/u/ct_27)\
**Post date:** [May 18, 2021, 2:39pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/3 "2021-05-18T14:39:06Z")

</div>

Mike,

Thank you for the reply.&nbsp; &nbsp;Looking forward to the coded extensions.&nbsp; We’re playing with the SNMP extension right now and it’s really cool.&nbsp; The best part is whoever developed it I feel was really thinking about all the different scenarios a client might have and thus made the SNMP extension quite flexible.&nbsp; I can’t image the complexity of code behind it.

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [May 18, 2021, 2:53pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/4 "2021-05-18T14:53:13Z")

</div>

[@Jan\_W](https://community.dynatrace.com/user/38171)&nbsp;is responsible for the framework and&nbsp;[@dglugla](https://community.dynatrace.com/user/27556)&nbsp;for the SNMP implementation. I’m sure that they’re happy to hear about your experience.

---

<div class="post-metadata">

**Author:** ![khoros\_anonymous](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@khoros\_anonymous](https://community.dynatrace.com/u/khoros_anonymous)\
**Post date:** [May 18, 2021, 4:01pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/5 "2021-05-18T16:01:29Z")

</div>

~~Hey, quick question.~~

~~How did you get the new SNMP Extension?~~

NVM i just found the docs.

Cheers

---

<div class="post-metadata">

**Author:** ![sean\_mcconville](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/sean_mcconville/32/5788_2.png) [@sean\_mcconville](https://community.dynatrace.com/u/sean_mcconville)\
**Post date:** [July 28, 2021, 12:11pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/6 "2021-07-28T12:11:25Z")

</div>

Hi&nbsp;[@Mike\_L](https://community.dynatrace.com/user/11520)&nbsp; hope you are good.

Do you know if there is a rough eta for coded plugins?

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [July 28, 2021, 12:13pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/7 "2021-07-28T12:13:00Z")

</div>

Hi,

The current plan is next year.

Mike

---

<div class="post-metadata">

**Author:** ![jcurbina](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jcurbina/32/12031_2.png) [@jcurbina](https://community.dynatrace.com/u/jcurbina)\
**Post date:** [August 20, 2021, 4:25am UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/8 "2021-08-20T04:25:35Z")

</div>

Hi&nbsp;[@Jan\_W](https://community.dynatrace.com/user/38171)&nbsp;and&nbsp;&nbsp;[@dglugla](https://community.dynatrace.com/user/27556),

My experience has been to enable SNMP extension 2.0 and also create an extension for Linux host based on the structure I had of the SNMP yaml, with host related metrics.

Both extensions are up and running, after a rather complicated signing process for custom extension. This is an issue to improve or simplify as it is very cumbersome.

My question is about the promise that extension 2.0 provides “metrics with topology”. When I read topology I immediately relate it to entities displayed in the smartscape. But so far I do not see any results in that sense or a Host monitored with SNMP in the smartscape.

In the structure of the extension at the end comes the Topology and Relationships section where I have that the network interfaces are children of the SNMP device (Host). Could you explain to me what would be the scope of these metrics with topology. I imagine a scenario where I monitor a Switch, and establish a relationship between a switch interface and a Host. If that interface throws errors, it could generate a Problem that would impact that Host.

---

<div class="post-metadata">

**Author:** ![ct\_27](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ct_27/32/10499_2.png) [@ct\_27](https://community.dynatrace.com/u/ct_27)\
**Post date:** [August 28, 2021, 4:11am UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/9 "2021-08-28T04:11:14Z")

</div>

I had the same thought as you when i saw Topology.

I too am ultimately interested in the same.&nbsp; First just so I can relate switches to routers and such so that the network topology is clear. But yes, the best state would be to link the switch interface to a host.

Hopefully DT will come back with a response.

---

<div class="post-metadata">

**Author:** ![tarjei](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tarjei/32/39196_2.png) [@tarjei](https://community.dynatrace.com/u/tarjei)\
**Post date:** [September 29, 2021, 3:26pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/10 "2021-09-29T15:26:02Z")

</div>

From what I have seen in some of the example from Dynatrace, there is both a topology, relationship and other keys in the xmls.

The thing is that the documentation is extremely lacking at the moment.

It seems it should also be possible to query other wmiNamespaces, but so far I have not been able to do this, and there is no logging which provides any clues.

---

<div class="post-metadata">

**Author:** ![Vanguard](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/vanguard/32/29977_2.png) [@Vanguard](https://community.dynatrace.com/u/Vanguard)\
**Post date:** [October 28, 2022, 2:49pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/11 "2022-10-28T14:49:36Z")

</div>

I am also waiting for Extensions 2.0 offering Python support so that our Custom ActiveGate Extenion can be migrated to 2.0 and therefore conveniently managed via the Hub.

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [October 28, 2022, 3:22pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/12 "2022-10-28T15:22:22Z")

</div>

Python extensions in EF2.0 is available for Dynatrace employees in 1.254. There is no timeline yet for partners and customers but it is being looked at from all angles, such as security and distribution.

---

<div class="post-metadata">

**Author:** ![ct\_27](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ct_27/32/10499_2.png) [@ct\_27](https://community.dynatrace.com/u/ct_27)\
**Post date:** [February 1, 2023, 9:07pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/13 "2023-02-01T21:07:30Z")

</div>

[@Mike\_L](https://community.dynatrace.com/user/11520)&nbsp;Any update on this?&nbsp; It’s been over a year now.

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [February 1, 2023, 10:15pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/14 "2023-02-01T22:15:10Z")

</div>

Have a look at my last post in this thread from October. That is still the latest state.

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [December 7, 2023, 2:16pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/15 "2023-12-07T14:16:20Z")

</div>

Hi Everone, great post thanks for everybody contributions. I am a newbies in Extension 2.0. I have a problem to solve by just putting together a simple SQL Extension that basically run an SQL against a database and return a count from a table then raise an alert based on the returned results. Please note there is one good plugin but is gonna be depcrated in Jab 2024 so I will not spend the time on this and decided to dig about to find a solution. The Dynatrace documentation is very vague about this area and I decided to seek your help. I made a good progress in installing Visual Studio Code (great tool) and connected it to my DT instance, I see this PayLoad File (as described by DT) which I believe should go in the config directory of the extension (see below) and I have a basic Yaml and I seek your advice what to write in the Yaml to use SQL Extension. I appreciate your support in this matter. Marwan…

---

<div class="post-metadata">

**Author:** ![tarjeitie](https://avatars.discourse-cdn.com/v4/letter/t/8e8cbc/32.png) [@tarjeitie](https://community.dynatrace.com/u/tarjeitie)\
**Post date:** [December 7, 2023, 2:22pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/16 "2023-12-07T14:22:24Z")

</div>

Hi&nbsp;[@MarwanC](https://community.dynatrace.com/user/64346)&nbsp;I would recommend looking at the&nbsp;[SQL data source - Dynatrace Docs](https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/data-sources/sql)  
Possibly also downloading the&nbsp;[SQL Server Monitoring | Dynatrace Hub](https://www.dynatrace.com/hub/detail/microsoft-sql-server-2/?query=sql&filter=all#release-notes)&nbsp;plugin and having a look at how they have doe this.  
I have had sucess doing this approach for DB2

---

<div class="post-metadata">

**Author:** ![tarjeitie](https://avatars.discourse-cdn.com/v4/letter/t/8e8cbc/32.png) [@tarjeitie](https://community.dynatrace.com/u/tarjeitie)\
**Post date:** [December 7, 2023, 2:22pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/17 "2023-12-07T14:22:51Z")

</div>

Hi Michael! Any status update on the progress for Python EF2?

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [December 7, 2023, 2:24pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/18 "2023-12-07T14:24:40Z")

</div>

It is scheduled for OA/AG 1.283, cluster 1.284.

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [December 7, 2023, 2:37pm UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/19 "2023-12-07T14:37:13Z")

</div>

Thank you for your swift reply. Do you mean I download the SQL Plugin and modify the PayLoad from the documentation you gave about&nbsp; DB2 and tweak it? Do you mind sending me your Yaml file that you used for DB2? much appreciated.

---

<div class="post-metadata">

**Author:** ![tarjeitie](https://avatars.discourse-cdn.com/v4/letter/t/8e8cbc/32.png) [@tarjeitie](https://community.dynatrace.com/u/tarjeitie)\
**Post date:** [December 8, 2023, 9:09am UTC](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496/20 "2023-12-08T09:09:04Z")

</div>

I mean, you download the SQL extension, extract it and look at how this is configured.

Then you clone that, modify the queries, extension name, metric names etc, and create your own SQL Custom query.

[Next page](https://community.dynatrace.com/t/extension-2-0-where-does-the-logic-go/31496.md?page=2)
