# Send notification if a specific Synthetic Type is matched

**URL:** <https://community.dynatrace.com/t/send-notification-if-a-specific-synthetic-type-is-matched/38717>\
**Category:** Alerting\
**Tags:** problem-notification, problems-classic\
**Created:** [March 6, 2023, 8:24pm UTC](https://community.dynatrace.com/t/send-notification-if-a-specific-synthetic-type-is-matched/38717 "2023-03-06T20:24:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![avdveen](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@avdveen](https://community.dynatrace.com/u/avdveen)\
**Post date:** [March 6, 2023, 8:24pm UTC](https://community.dynatrace.com/t/send-notification-if-a-specific-synthetic-type-is-matched/38717/1 "2023-03-06T20:24:00Z")

</div>

I want to send out a notification only if the Synthetic monitor Type contains specific text or wording e.g.,&nbsp;_Type: 401 Unauthorized_ but not for e.g.,&nbsp;_Type: Wait timeout was too short for the page to load_.

Example of additional context I get in the Slack message, in this case:

_Synthetic monitor global outage  
1 failure  
Actions: click on “Log in”  
Type: 401 Unauthorized_

I’ve tried using the custom event filter but it doesn’t seem to follow my logic&nbsp;😂

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [March 7, 2023, 7:58am UTC](https://community.dynatrace.com/t/send-notification-if-a-specific-synthetic-type-is-matched/38717/2 "2023-03-07T07:58:21Z")

</div>

Hi,

Maybe a content validation to fail when some plain text is found:&nbsp;[Validate content](https://www.dynatrace.com/support/help/shortlink/id-brower-clickpath-events#validate)

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [March 7, 2023, 8:39am UTC](https://community.dynatrace.com/t/send-notification-if-a-specific-synthetic-type-is-matched/38717/3 "2023-03-07T08:39:22Z")

</div>

Anton’s solution would be my first suggestion, to use the content validation available in the product. You can also add extra validation in a [JavaScript event.](https://www.dynatrace.com/support/help/platform-modules/digital-experience/synthetic-monitoring/browser-monitors/browser-clickpath-events#javascript)

If neither of those options work for your scenario, you can [push an event](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/events-v2/post-event) from the Browser monitor by sending a fetch request in a JavaScript event.

---

<div class="post-metadata">

**Author:** ![avdveen](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@avdveen](https://community.dynatrace.com/u/avdveen)\
**Post date:** [March 7, 2023, 8:48am UTC](https://community.dynatrace.com/t/send-notification-if-a-specific-synthetic-type-is-matched/38717/4 "2023-03-07T08:48:49Z")

</div>

Thanks for the suggestions,&nbsp;[@HannahM](https://community.dynatrace.com/user/1433)&nbsp;and&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)&nbsp;- I’m already using content validation for plain text, to confirm if the user logged in successfully, but I don’t want to be alerted on the&nbsp;_Wait timeout_ types.  
If the wait timeout occurs, it should not do anything in the form of alerting, other than run the check again on the next interval. I hope I’m making sense.

I’ll look into the other suggestions later, hopefully, one of those will do the trick.

---

<div class="post-metadata">

**Author:** ![agata.wlodarczyk](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/agata.wlodarczyk/32/22_2.png) [@agata.wlodarczyk](https://community.dynatrace.com/u/agata.wlodarczyk)\
**Post date:** [May 12, 2023, 11:55am UTC](https://community.dynatrace.com/t/send-notification-if-a-specific-synthetic-type-is-matched/38717/5 "2023-05-12T11:55:35Z")

</div>

[@andre\_vdveen](https://community.dynatrace.com/user/11931)&nbsp;let us know when you’ll find a solution 🙂

---

<div class="post-metadata">

**Author:** ![avdveen](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@avdveen](https://community.dynatrace.com/u/avdveen)\
**Post date:** [May 18, 2023, 1:03pm UTC](https://community.dynatrace.com/t/send-notification-if-a-specific-synthetic-type-is-matched/38717/6 "2023-05-18T13:03:03Z")

</div>

I think I figured it out…based on my tests, the problem is raised but the Slack notification doesn’t come through for the two error types (codes) that I’ve excluded. If I stop the web server, the problem is raised and the Slack message comes through, confirming that the Slack integration is working but only when the two errors are not seen.

I’ve done it via the Alerting profile, by adding the following:

 ![andre_vdveen_0-1684414824622.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/b/0bc64c36414fb994d8a7c9e94088e989818dd6db.png)

The issue I faced before, was that I didn’t use the full error code…I only used the text without the actual error code e.g., 1401 for the&nbsp;_Wait timeout was too short for the page to load_&nbsp;errors; once I figured out where to get the full error code text, on the details of the failed execution, I copied the full code (‘circled’ in blue) and pasted that into the value field for the Property filter.

 ![andre_vdveen_1-1684415228856.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/51670445c26891316186e4564cc0c0062a3a682b.png)

---

<div class="post-metadata">

**Author:** ![agata.wlodarczyk](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/agata.wlodarczyk/32/22_2.png) [@agata.wlodarczyk](https://community.dynatrace.com/u/agata.wlodarczyk)\
**Post date:** [May 18, 2023, 5:08pm UTC](https://community.dynatrace.com/t/send-notification-if-a-specific-synthetic-type-is-matched/38717/7 "2023-05-18T17:08:48Z")

</div>

[@andre\_vdveen](https://community.dynatrace.com/user/11931)&nbsp;thanks for sharing! 🙂
