# Synthetic monitoring metrics that show last API failure time and URL

**URL:** <https://community.dynatrace.com/t/synthetic-monitoring-metrics-that-show-last-api-failure-time-and-url/36380>\
**Category:** Dashboarding\
**Tags:** dynatrace-managed, request-attributes, dashboards-classic, synthetic-monitoring\
**Created:** [August 30, 2022, 11:46am UTC](https://community.dynatrace.com/t/synthetic-monitoring-metrics-that-show-last-api-failure-time-and-url/36380 "2022-08-30T11:46:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dariniv](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@dariniv](https://community.dynatrace.com/u/dariniv)\
**Post date:** [August 30, 2022, 11:46am UTC](https://community.dynatrace.com/t/synthetic-monitoring-metrics-that-show-last-api-failure-time-and-url/36380/1 "2022-08-30T11:46:24Z")

</div>

I am trying to set up a dashboard for HTTP requests, but I am not able to get metrics on which time it got failed and the URL to which it is being fired.

The requirement is to run a builtin metrics query and create a dashboard with the below details:

- Application Name
- URL
- LastSuccess@
- LastError

---

<div class="post-metadata">

**Author:** ![dbusquets](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dbusquets/32/31000_2.png) [@dbusquets](https://community.dynatrace.com/u/dbusquets)\
**Post date:** [August 31, 2022, 9:43am UTC](https://community.dynatrace.com/t/synthetic-monitoring-metrics-that-show-last-api-failure-time-and-url/36380/2 "2022-08-31T09:43:11Z")

</div>

Hi!

I think it is not possible to do exactly what you want, at least in a direct way.

I suppose you’ve checked all “synthetic.http.” metrics available related to HTTP Monitors (i.e: Result Status Count [by request, location] splitting by HTTP Monitor Step).

Have you considered the option of getting that info from API v2 for HTTP Monitors?

> **[Synthetic monitor executions API v2 - GET full info on an execution](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/synthetic-v2/synthetic-monitor-execution/get-execution-full)**
>
> View full information about an on-demand execution of a synthetic monitor via the Dynatrace API.

Regards,

Dani

---

<div class="post-metadata">

**Author:** ![dariniv](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@dariniv](https://community.dynatrace.com/u/dariniv)\
**Post date:** [August 31, 2022, 12:24pm UTC](https://community.dynatrace.com/t/synthetic-monitoring-metrics-that-show-last-api-failure-time-and-url/36380/3 "2022-08-31T12:24:59Z")

</div>

I am trying to store the values in variable using post-script and then push that value to metrics. Currently I am not able to get the variable values in metrics.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![dbusquets](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dbusquets/32/31000_2.png) [@dbusquets](https://community.dynatrace.com/u/dbusquets)\
**Post date:** [August 31, 2022, 1:33pm UTC](https://community.dynatrace.com/t/synthetic-monitoring-metrics-that-show-last-api-failure-time-and-url/36380/4 "2022-08-31T13:33:26Z")

</div>

Could you please describe how are you trying to push de variables to metrics?

I would use the Ingest Metrics API to push the variables to metrics in a HTTP monitor’s post-processing step:

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

---

<div class="post-metadata">

**Author:** ![dariniv](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@dariniv](https://community.dynatrace.com/u/dariniv)\
**Post date:** [August 31, 2022, 2:09pm UTC](https://community.dynatrace.com/t/synthetic-monitoring-metrics-that-show-last-api-failure-time-and-url/36380/5 "2022-08-31T14:09:56Z")

</div>

okay i will check it out
