# CI/CD - Detect if Syntetic Monitor succeeded or failed.

**URL:** <https://community.dynatrace.com/t/ci-cd-detect-if-syntetic-monitor-succeeded-or-failed/34861>\
**Category:** Synthetic Monitoring\
**Tags:** http-monitor, browser-monitors, synthetic-monitoring\
**Created:** [April 18, 2022, 11:05am UTC](https://community.dynatrace.com/t/ci-cd-detect-if-syntetic-monitor-succeeded-or-failed/34861 "2022-04-18T11:05:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonard\_lunardi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/leonard_lunardi/32/13242_2.png) [@leonard\_lunardi](https://community.dynatrace.com/u/leonard_lunardi)\
**Post date:** [April 18, 2022, 11:05am UTC](https://community.dynatrace.com/t/ci-cd-detect-if-syntetic-monitor-succeeded-or-failed/34861/1 "2022-04-18T11:05:16Z")

</div>

Hi Folks.

I’m looking for a way to include in my validation mat a step with the following steps:

1) Enable Synthetic Monitor.  
2) Run Synthetic Monitor.  
3) Validate if the Synthetic Monitor succeeded or failed  
4) Follow or fail the process according to the above result.

5)&nbsp;Disable Synthetic Monitor.

I haven’t found a simple way through the API to determine if Synthetic Monitor ran successfully or failed.

Does anyone have a tip on how I could get this information?

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [April 18, 2022, 12:38pm UTC](https://community.dynatrace.com/t/ci-cd-detect-if-syntetic-monitor-succeeded-or-failed/34861/2 "2022-04-18T12:38:23Z")

</div>

Hi&nbsp;[@leonard\_lunardi](https://community.dynatrace.com/user/5372)&nbsp;, please do check the suggestion from [this other post](https://community.dynatrace.com/post/184194). It may help you on how to properly say if a Synthetic monitor is healthy or not.

Remember that you can use the :lastreal [transformation](https://www.dynatrace.com/support/help/shortlink/api-metrics-v2-selector#last-transformation) to get the latest result available, and let your CICD accurate.

Hint: these are the metrics that you will probably use:&nbsp;builtin:synthetic.browser.availability.location.total or builtin:synthetic.http.availability.location.total

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [April 19, 2022, 2:29pm UTC](https://community.dynatrace.com/t/ci-cd-detect-if-syntetic-monitor-succeeded-or-failed/34861/3 "2022-04-19T14:29:23Z")

</div>

Hi Leonard,

we actually have a preview running currently for running Synthetic monitors using the API and retrieving their results the same way. This has been designed for use in CI/CD pipelines. Is this something you might be interested in taking part in?

Thanks, Hannah
