Add Synthetic Test Tags to Alerts?

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?

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.

2 Likes

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