# Setting email notification when Synthetic HTTP Monitor fails

**URL:** <https://community.dynatrace.com/t/setting-email-notification-when-synthetic-http-monitor-fails/48045>\
**Category:** Alerting\
**Tags:** problem-notification, problems-classic\
**Created:** [September 30, 2024, 11:54am UTC](https://community.dynatrace.com/t/setting-email-notification-when-synthetic-http-monitor-fails/48045 "2024-09-30T11:54:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pseg1984](https://avatars.discourse-cdn.com/v4/letter/p/c77e96/32.png) [@pseg1984](https://community.dynatrace.com/u/pseg1984)\
**Post date:** [September 30, 2024, 11:54am UTC](https://community.dynatrace.com/t/setting-email-notification-when-synthetic-http-monitor-fails/48045/1 "2024-09-30T11:54:00Z")

</div>

Hi,

i have more than 10 synthetic tests with HTTP Monitor, all are api calls.

in the synthetic test settings at Outage handling i activated

-Generate a problem and send alert when the monitor is unavailable at all configuration locations. Ok but i don’t really need this one for now.

-Generate a problem and send alert when the monitor is unavailable for one or more consecutive runs at any locations: i don’t need this one too for now.

Then in Settings/Alerting/Problem alerting profiles i added notification with basic rules.

Then in&nbsp;Settings/Integration/Problem notifications i added my email.

i clicked on test send alert.

i sends the alert by email.

In my HTTP Monitor test i have this:

post-execution:

var StatusCode =reponsegetStatusCode();

if(statusCode === 400 ||&nbsp;statusCode === 403 ||&nbsp;statusCode === 500 ||&nbsp;statusCode === 503){

api.fail("Test failed: " + statusCode)}

But when my HTTP Monitor fails i don’t receive email notifications.

Thanks

---

_[View the full topic](https://community.dynatrace.com/t/setting-email-notification-when-synthetic-http-monitor-fails/48045)._
