# Dynatrace API to publish custom metrics

**URL:** <https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482>\
**Category:** Dynatrace API\
**Tags:** dynatrace-managed, dynatrace-api\
**Created:** [March 15, 2018, 12:58pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482 "2018-03-15T12:58:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![yash\_bagarka](https://avatars.discourse-cdn.com/v4/letter/y/e495f1/32.png) [@yash\_bagarka](https://community.dynatrace.com/u/yash_bagarka)\
**Post date:** [March 15, 2018, 12:58pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482/1 "2018-03-15T12:58:01Z")

</div>

Hi,

Can I publish any other metrics other than the time series via API?

Cheers,

Yash

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [March 15, 2018, 1:38pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482/2 "2018-03-15T13:38:51Z")

</div>

Can you give me some examples or use-cases?

---

<div class="post-metadata">

**Author:** ![hayden\_miedema](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hayden_miedema/32/29357_2.png) [@hayden\_miedema](https://community.dynatrace.com/u/hayden_miedema)\
**Post date:** [March 16, 2018, 3:17am UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482/3 "2018-03-16T03:17:45Z")

</div>

Hi Yash,

What else are you looking to export from Dynatrace?

---

<div class="post-metadata">

**Author:** ![yash\_bagarka](https://avatars.discourse-cdn.com/v4/letter/y/e495f1/32.png) [@yash\_bagarka](https://community.dynatrace.com/u/yash_bagarka)\
**Post date:** [March 17, 2018, 8:12am UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482/4 "2018-03-17T08:12:24Z")

</div>

Thanks for the response guys.

I want to publish a metrics that is not based on time series for example.

My custom product agent vs the no of machines on which they are running.

like 4 machines are running on 1.x

and 5 machines are running on 2.x

@Hayden,

I am looking to export into dynatrace 🙂

Cheers,

Yash

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [March 19, 2018, 6:02am UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482/5 "2018-03-19T06:02:16Z")

</div>

Understand, but where in your monitored topology you would like to put that metric on?

---

<div class="post-metadata">

**Author:** ![yash\_bagarka](https://avatars.discourse-cdn.com/v4/letter/y/e495f1/32.png) [@yash\_bagarka](https://community.dynatrace.com/u/yash_bagarka)\
**Post date:** [March 19, 2018, 4:43pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482/6 "2018-03-19T16:43:41Z")

</div>

Thanks for the interest and response!

I am planning to add these under my microservices host. Our microservices is based on Go Lang.

Cheers,

Yash

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [March 20, 2018, 7:34am UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482/7 "2018-03-20T07:34:07Z")

</div>

In the long run we will also introduce key value properties on all types of components, such as host, services through API. But maybe writing a local Dynatrace monitoring plugin would allow you to collect all the meta info of the local running versions.

See here:

[https://www.dynatrace.com/support/help/extend-dynatrace/plugin-sdk/how-do-i-create-a-python-custom-plugin/](https://www.dynatrace.com/support/help/extend-dynatrace/plugin-sdk/how-do-i-create-a-python-custom-plugin/)

---

<div class="post-metadata">

**Author:** ![grogers](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/grogers/32/25969_2.png) [@grogers](https://community.dynatrace.com/u/grogers)\
**Post date:** [July 22, 2019, 1:15pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482/8 "2019-07-22T13:15:40Z")

</div>

Don’t know how else to get this to you [@Wolfgang B.](https://answers.dynatrace.com/users/12838/view.html) but thank you and your team for making ‘from’ time an ISOTime in the V2 API. I’ve wanted this since I started using the APIs.

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [July 30, 2019, 1:43pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-publish-custom-metrics/11482/9 "2019-07-30T13:43:54Z")

</div>

Thanks a lot for your positive feedback! I will let the team know.

Best greetings,

Wolfgang
