30 Sep 2024 12:54 PM - last edited on 08 Oct 2024 10:31 AM by GosiaMurawska
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
Solved! Go to Solution.
30 Sep 2024 01:57 PM
Hi @pseg1984
First of all, thanks for sharing your concern:
For Post execution, you can add it under Post execution scripts
As long as your post execution script returns the actual response code, no need to set rules for Response validation.
KR,
30 Sep 2024 02:11 PM
yes i did all this as you mention, i will check now if i receive alerts or not.