# Add Synthetic Test Tags to Alerts?

**URL:** <https://discuss.elastic.co/t/add-synthetic-test-tags-to-alerts/361053>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [June 7, 2024, 5:13pm UTC](https://discuss.elastic.co/t/add-synthetic-test-tags-to-alerts/361053 "2024-06-07T17:13:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)\
**Post date:** [June 7, 2024, 5:13pm UTC](https://discuss.elastic.co/t/add-synthetic-test-tags-to-alerts/361053/1 "2024-06-07T17:13:49Z")

</div>

Can I add synthetic test tags to my Synthetics alerts?

E.g., in the following test, can I add the contents of the `tags` field to my alert in the event of a failure?

```yaml
heartbeat.monitors:
  - id: '7cdb4578-aa8a-4d46-86fe-a8a31b60fba7'
    name: 'google.com'
    type: 'http'
    enabled: true
    alert.status.enabled: true
    check.request.method: 'GET'
    response:
      include_body: 'on_error'
      include_headers: true
    schedule: '@every 5m'
    ssl.verification_mode: 'none'
    tags: ['google', 'tag1', 'tag2']
    timeout: '30s'
    urls: 'https://google.com/'

```

A quick PS - Looking at the `.alerts-*` data view, it appears that the monitor fields exposed in the alert include: `monitor.id`, `monitor.name`, `monitor.state.id`, and `monitor.type`. It appears that there would need to be a `monitor.tags` field exposed as well.

---

<div class="post-metadata">

**Author:** ![juanswan13](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juanswan13/32/140580_2.png) [@juanswan13](https://discuss.elastic.co/u/juanswan13)\
**Post date:** [January 9, 2025, 6:14pm UTC](https://discuss.elastic.co/t/add-synthetic-test-tags-to-alerts/361053/2 "2025-01-09T18:14:47Z")

</div>

I'm experiencing the same issue. It would be incredibly helpful to have the ability to reference monitor tags directly and use them for Opsgenie alerts, rather than relying on {{rule.tags}}.

Currently, my workaround involves setting up conditions within Opsgenie to add tags based on the endpoint that is down. However, this approach is quite cumbersome, especially since the tags are already defined on each monitor.

Thanks,

Juan Swan
