# Challenges in building an extension

**URL:** <https://community.dynatrace.com/t/challenges-in-building-an-extension/33882>\
**Category:** Extensions\
**Tags:** activegate, extensions\
**Created:** [January 26, 2022, 11:10am UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882 "2022-01-26T11:10:27Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![motdde](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@motdde](https://community.dynatrace.com/u/motdde)\
**Post date:** [January 26, 2022, 11:10am UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/1 "2022-01-26T11:10:27Z")

</div>

Hello Community,

Where is the appropriate location to store temporary files, I seem to be getting “error 13 permission denied” when trying to read or write a file from my extension logic.

When I started working on this extension, I had a lot of questions and I am glad I saw similar answers in the community. I wish the docs are comprehensive or maybe I haven’t found the right docs.

Please share if you do.

---

<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:** [January 26, 2022, 11:41am UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/2 "2022-01-26T11:41:23Z")

</div>

Hi,

I’ve always used import tempfile and saved it in tempfile.gettempdir(). That works with thousands of endpoints over hundreds of companies.

Mike

---

<div class="post-metadata">

**Author:** ![motdde](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@motdde](https://community.dynatrace.com/u/motdde)\
**Post date:** [January 26, 2022, 12:06pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/3 "2022-01-26T12:06:49Z")

</div>

Thanks, Mike.

I know metrics have to be defined in the JSON file before any of the methods like “absolute or relative” can be used with the key named argument.

Is there a way to do dynamic metrics? I intend to get the metric from the config UI.

---

<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:** [January 26, 2022, 12:08pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/4 "2022-01-26T12:08:32Z")

</div>

What I always do when that’s needed is to send in the metrics via the metrics ingest API/cli. That way you can name it whatever.

---

<div class="post-metadata">

**Author:** ![motdde](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@motdde](https://community.dynatrace.com/u/motdde)\
**Post date:** [January 26, 2022, 12:13pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/5 "2022-01-26T12:13:11Z")

</div>

So using the API or CLI doesn’t need the device group or device, right?

Kindly share with me an open-source Activegate plugin with this pattern.

Thanks in advance.

---

<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:** [January 26, 2022, 12:17pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/6 "2022-01-26T12:17:52Z")

</div>

Correct. For improved visualization you can create a generic entity, and potentially a generic relationship.

---

<div class="post-metadata">

**Author:** ![motdde](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@motdde](https://community.dynatrace.com/u/motdde)\
**Post date:** [January 26, 2022, 12:23pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/7 "2022-01-26T12:23:29Z")

</div>

Kindly share with me an open-source Activegate plugin with this pattern.

Thanks in advance.

---

<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:** [January 26, 2022, 12:24pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/8 "2022-01-26T12:24:15Z")

</div>

Hi, There is none, only paid extensions from our services department.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [January 26, 2022, 6:02pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/9 "2022-01-26T18:02:29Z")

</div>

[@motdde](https://community.dynatrace.com/user/28316)

While it might not ease your specific need, I have compiled a list of public available Activegate extensions:

[https://community.dynatrace.com/t5/Dynatrace-tips/Activegate-Extensions/m-p/113705](https://community.dynatrace.com/post/113705)

It’s interesting sometimes to learn by example 🙂

---

<div class="post-metadata">

**Author:** ![motdde](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@motdde](https://community.dynatrace.com/u/motdde)\
**Post date:** [January 26, 2022, 6:27pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/10 "2022-01-26T18:27:31Z")

</div>

Thanks, Anthonio.

I found the list earlier, and it has been helpful.

---

<div class="post-metadata">

**Author:** ![motdde](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@motdde](https://community.dynatrace.com/u/motdde)\
**Post date:** [January 28, 2022, 12:36pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/11 "2022-01-28T12:36:34Z")

</div>

Hello&nbsp;[@AntonioSousa](https://community.dynatrace.com/user/17213)&nbsp;& [@Mike\_L](https://community.dynatrace.com/user/11520)&nbsp;,

I have got a few questions about metrics ingestion and charting for dashboards.

Give the sample data heading:

“date\_time started” | “date\_time ended” | “metric\_data”

How do I ingest this as a single data point?

The timeframe selector is tied to the date and time the metric was ingested, but how do I create a visualisation based on the other values I have, Essentially changing the axis, if they can be ingested as a single data point?

What has dimension got to do with these?

---

<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:** [January 28, 2022, 4:38pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/12 "2022-01-28T16:38:08Z")

</div>

Maybe pass in a second metric called “response time” or so that’s the difference between started and ended?

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [January 28, 2022, 5:05pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/13 "2022-01-28T17:05:24Z")

</div>

Yes, I also do it this way.

---

<div class="post-metadata">

**Author:** ![motdde](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@motdde](https://community.dynatrace.com/u/motdde)\
**Post date:** [January 28, 2022, 5:33pm UTC](https://community.dynatrace.com/t/challenges-in-building-an-extension/33882/14 "2022-01-28T17:33:33Z")

</div>

Thanks.

I will test all my theories. Hopefully, it works.
