cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting email notification when Synthetic HTTP Monitor fails

pseg1984
Participant

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 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 || statusCode === 403 || statusCode === 500 || statusCode === 503){

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

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

Thanks

 

 

2 REPLIES 2

Peter_Youssef
Champion

Hi @pseg1984 

First of all, thanks for sharing your concern:

  1. Create a management zone to include all created HTTP monitors.
  2. Create alerting profile based on the created management zone.
  3. In the alerting profile, you will keep only the availability, you don't need all other options as long as you're executing HTTP tests against URLs or APIs.
  4. Ensure enabling the attached option for outage handling, otherwise you won't receive alerts.
  5. Under Integrations>  Problem notifications > Email > specify your email, and alerting profile > send test notification to check the successful configurations.

6.png

For Post execution, you can add it under Post execution scripts

7.png

As long as your post execution script returns the actual response code, no need to set rules for Response validation.

8.png

KR,

pseg1984
Participant

yes i did all this as you mention, i will check now if i receive alerts or not.

Featured Posts