# Error Alert on 3xx response code

**URL:** <https://community.dynatrace.com/t/error-alert-on-3xx-response-code/48319>\
**Category:** Open Q&A\
**Tags:** dynatrace-saas\
**Created:** [October 14, 2024, 1:15pm UTC](https://community.dynatrace.com/t/error-alert-on-3xx-response-code/48319 "2024-10-14T13:15:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prithvi\_Mandal](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@Prithvi\_Mandal](https://community.dynatrace.com/u/Prithvi_Mandal)\
**Post date:** [October 14, 2024, 1:15pm UTC](https://community.dynatrace.com/t/error-alert-on-3xx-response-code/48319/1 "2024-10-14T13:15:21Z")

</div>

Hii,

Is there any way to trigger email alert on&nbsp; 3xx response code of api.

thanks

Prithvi

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [October 14, 2024, 1:28pm UTC](https://community.dynatrace.com/t/error-alert-on-3xx-response-code/48319/2 "2024-10-14T13:28:17Z")

</div>

Hello&nbsp;[@Prithvi\_Mandal](https://community.dynatrace.com/user/78382)

You can achieve this through:

- Configuring Synthetic monitors and add the fail if criteria

 ![2024-10-14_17h27_00.png](https://global.discourse-cdn.com/dynatrace/original/2X/6/68cc545d3c919affded1b6c3d30fad5fecdc5f01.png)

BR,

Peter

---

<div class="post-metadata">

**Author:** ![Prithvi\_Mandal](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@Prithvi\_Mandal](https://community.dynatrace.com/u/Prithvi_Mandal)\
**Post date:** [October 14, 2024, 1:33pm UTC](https://community.dynatrace.com/t/error-alert-on-3xx-response-code/48319/3 "2024-10-14T13:33:59Z")

</div>

Hii&nbsp;[@Peter\_Youssef](https://community.dynatrace.com/user/51369)&nbsp;,

actually API’s has already monitored in our environment. how can we do without synthetic .

Regards&nbsp;

 ![{4615DD00-2A6F-44D6-80D0-FB462017AF22}.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/e/5ed1962ac1e8232c98373cadc0d18d276f7a26cf.png)

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [October 14, 2024, 1:42pm UTC](https://community.dynatrace.com/t/error-alert-on-3xx-response-code/48319/4 "2024-10-14T13:42:20Z")

</div>

Hi&nbsp;[@Prithvi\_Mandal](https://community.dynatrace.com/user/78382)

you should do it in 2 steps:

1- Create a calculated metric on your API to count the number of http code 3xx.

2- Create an Event metric based on this Calculated metric and trigger and event when you reach a specific threshold.

BRs,

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [October 14, 2024, 3:08pm UTC](https://community.dynatrace.com/t/error-alert-on-3xx-response-code/48319/5 "2024-10-14T15:08:54Z")

</div>

Hi&nbsp;[@Prithvi\_Mandal](https://community.dynatrace.com/user/78382)

There is a way you can create multidimensional analysis view and create a metric based on the error.

BR,

Peter.

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [October 14, 2024, 3:24pm UTC](https://community.dynatrace.com/t/error-alert-on-3xx-response-code/48319/6 "2024-10-14T15:24:26Z")

</div>

Hello&nbsp;[@Prithvi\_Mandal](https://community.dynatrace.com/user/78382)

You have another solution to create request attribute as per the attached example and then configure the required alerting

![2024-10-14_19h13_38.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/57e87b5695c8a1603d735c3d2fb70de51bbb2c34.png)

 ![2024-10-14_19h18_58.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/5/d557c145a0d72ca04ab82c44605ff3041275a19b.png)

Under custom rule select the **request attribute** which will be either based on the response code 302 or the http method “Get”.

**Tip:**

- To proceed with this alternative solution, you have to create a request attribute based on the http method and Response code, then you will be able to create the required metric and receive alerts upon occurrences.
- [Request attribute.](https://docs.dynatrace.com/docs/shortlink/request-attributes-web-requests)

KR,

Peter.
