# Is it possible to push custom metrics via some endpoint of Dynatrace API?

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-push-custom-metrics-via-some-endpoint-of-dynatrace-api/20564>\
**Category:** Dynatrace API\
**Tags:** dynatrace-managed, dynatrace-api\
**Created:** [October 15, 2020, 12:26am UTC](https://community.dynatrace.com/t/is-it-possible-to-push-custom-metrics-via-some-endpoint-of-dynatrace-api/20564 "2020-10-15T00:26:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fernando\_albuqu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fernando_albuqu/32/29767_2.png) [@fernando\_albuqu](https://community.dynatrace.com/u/fernando_albuqu)\
**Post date:** [October 15, 2020, 12:26am UTC](https://community.dynatrace.com/t/is-it-possible-to-push-custom-metrics-via-some-endpoint-of-dynatrace-api/20564/1 "2020-10-15T00:26:57Z")

</div>

Hi,

We have a series of “circuit breakers” that determine the logical behavior of the application (something like WITH PROBLEM / NO PROBLEM).

The idea is to take the status of these circuit breakers to Dynatrace, with customized metrics, creating dashboards, thresholds and notifications.

The big question is: Can we push custom metrics via some endpoint of Dynatrace API? What would be the endpoint?

Or is the only way via Dynatrace Plugin?

Thank you,

Fernando

---

<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:** [October 15, 2020, 6:12am UTC](https://community.dynatrace.com/t/is-it-possible-to-push-custom-metrics-via-some-endpoint-of-dynatrace-api/20564/2 "2020-10-15T06:12:02Z")

</div>

Hi Fernando,

Yes you can use our new, extremely flexible metric ingest endpoint.

See here:

> **[Metrics API - POST ingest data points](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/post-ingest-metrics)**
>
> Ingest custom metrics to Dynatrace via Metrics v2 API.

Best greetings,

Wolfgang

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [October 15, 2020, 6:12am UTC](https://community.dynatrace.com/t/is-it-possible-to-push-custom-metrics-via-some-endpoint-of-dynatrace-api/20564/3 "2020-10-15T06:12:22Z")

</div>

Sure you can!

There are several methods you can choose from for pushing the metrics:

- **Push the metrics locally** on the OneAgent. This is a newly released feature and has to be enabled in the environment in Settings → Monitored technologies. Then you can use either statsd protocol or metric line protocol to push metrics locally to a port OneAgent will listen to.  
See more in this blog post:  
[Intelligent, context-aware AI analytics for all your custom metrics](https://www.dynatrace.com/news/blog/intelligent-context-aware-ai-analytics-for-all-your-custom-metrics/)
- You can **push metrics using environment API**. It’s the same line procol as above. See specification with examples here:  
[Metrics API - POST ingest data points — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/)  
Albeit not widely mentioned, metrics can be pushed also using ActiveGate as the API endpoint. You can push the metrics via API also from platforms where you can’t install OneAgent
- You can write an **oneagent extension** and push the metrics using the extension. See more here:  
[Develop your own Extensions — Dynatrace Docs](https://www.dynatrace.com/support/help/extend-dynatrace/extensions/oneagent-extensions/oneagent-extensions-hands-on/)  
Just for the record, OneAgent Python extensions are limited to Linux and Windows OneAgents. They are not yet available for AIX and won’t be available for Solaris

---

<div class="post-metadata">

**Author:** ![fernando\_albuqu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fernando_albuqu/32/29767_2.png) [@fernando\_albuqu](https://community.dynatrace.com/u/fernando_albuqu)\
**Post date:** [October 15, 2020, 12:09pm UTC](https://community.dynatrace.com/t/is-it-possible-to-push-custom-metrics-via-some-endpoint-of-dynatrace-api/20564/4 "2020-10-15T12:09:53Z")

</div>

Thank you all.

The metrics ingestion protocol is exactly what I need.

I just found it strange that the Chart (Explorer) was separate from the Custom Chart.

Fernando.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [October 16, 2020, 6:50am UTC](https://community.dynatrace.com/t/is-it-possible-to-push-custom-metrics-via-some-endpoint-of-dynatrace-api/20564/5 "2020-10-16T06:50:10Z")

</div>

AFAIK the new metric explorer will replace the Custom chart eventually. That’s why is is considered as a preview at the moment.
