# Do not send alert if Synthetic fails certain step

**URL:** https://discuss.elastic.co/t/do-not-send-alert-if-synthetic-fails-certain-step/348418
**Category:** Synthetics
**Created:** [December 1, 2023, 10:09am UTC](https://discuss.elastic.co/t/do-not-send-alert-if-synthetic-fails-certain-step/348418 "2023-12-01T10:09:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![linuschewpet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/linuschewpet/32/128391_2.png) [@linuschewpet](https://discuss.elastic.co/u/linuschewpet)
#### Post date: [December 1, 2023, 10:09am UTC](https://discuss.elastic.co/t/do-not-send-alert-if-synthetic-fails-certain-step/348418/1 "2023-12-01T10:09:00Z")

</div>

Given a scenario, say if synthetic fails on the login step before it could run the other steps fun and sad time.

By normal behaviour it would send an alert as long as any steps failed, however the requirement would be.

If step login fails, the alert should not be triggered and the whole journey should retry again.

In this case would that be possible?

```auto
step('Go to website', async () => {
    await page.goto('https://example.com/');
  });
 step('Login', async () => {
    await page.getByRole('button', { name: 'Login' }).click();
  });
step('Fun Time', async () => {
    await page.getByRole('button', { name: 'Fun' }).click();
  });
step('Sad Time', async () => {
    await page.getByRole('button', { name: 'Sad' }).click();
  });

```

---

<div class="post-metadata">

### Author: ![shahzad31](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahzad31/32/51637_2.png) [@shahzad31](https://discuss.elastic.co/u/shahzad31)
#### Post date: [December 1, 2023, 2:47pm UTC](https://discuss.elastic.co/t/do-not-send-alert-if-synthetic-fails-certain-step/348418/2 "2023-12-01T14:47:25Z")

</div>

Hello, @linuschewpet  
Might not be exactly what you are looking for , but this will help with your use case in 8.11 we added automatic retest on failure feature.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/a/6ae0938e8cdd95e952e6fcc6c4b28997a05e3f2c.png)

---

<div class="post-metadata">

### Author: ![shahzad31](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahzad31/32/51637_2.png) [@shahzad31](https://discuss.elastic.co/u/shahzad31)
#### Post date: [December 1, 2023, 2:48pm UTC](https://discuss.elastic.co/t/do-not-send-alert-if-synthetic-fails-certain-step/348418/3 "2023-12-01T14:48:16Z")

</div>

You can toggle it from ui or from project monitor via key

> **[Create monitors in the Synthetics app | Elastic Observability \[8.11\] | Elastic](https://www.elastic.co/guide/en/observability/current/synthetics-get-started-ui.html)**

---

<div class="post-metadata">

### Author: ![linuschewpet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/linuschewpet/32/128391_2.png) [@linuschewpet](https://discuss.elastic.co/u/linuschewpet)
#### Post date: [December 3, 2023, 10:27am UTC](https://discuss.elastic.co/t/do-not-send-alert-if-synthetic-fails-certain-step/348418/4 "2023-12-03T10:27:47Z")

</div>

> [@linuschewpet](#):
>
> viour it would send an alert as long as any steps failed, however the requirement would be.
> 
> If step login fails, the alert should not be triggered and the whole journey should retry again.

Hey @shahzad31,

Thanks for reply, actually its more related to the alerts.

Say that the "Login" step failed, it should retry and not trigger an alert.  
However say if step "Fun Time" failed, it would trigger the alert.

I guess its a little closer to an if logic

if login fails = No alerts  
else Trigger alert

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 31, 2023, 10:28am UTC](https://discuss.elastic.co/t/do-not-send-alert-if-synthetic-fails-certain-step/348418/5 "2023-12-31T10:28:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
