elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.82k stars 8.2k forks source link

[Synthetics Alerts] Add Synthetic test tags to monitor alert #185044

Open renzedj opened 4 months ago

renzedj commented 4 months ago

Use Case

As the Elastic Admin, I would like to be able to add the tags from the test triggering an alert to the alert. This will make it easier to route alerts in my alerting solution and ticketing system without the need to create multiple integrations in Kibana.

Detailed Description

I would like to be able to add the tags from a test to any alert that the test triggers, similar to the way that I can add {{context.monitorName}}, {{context.monitorUrl}}, and other fields to the alert. This will make it easier to route alerts in ticketing systems and notifiers without needing to create multiple integrations in Kibana.

E.g., the tags in the following test could be exposed in the .alerts-* data view as monitor.tags: ["google", "test"], the same way that the test name is currently exposed as monitor.name: "google.com", and could be accessed in the alert as {{context.monitorTags}}:

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', 'test']
    timeout: '30s'
    urls: 'https://google.com/'
elasticmachine commented 4 months ago

Pinging @elastic/unified-observability (Team:Observability)

renzedj commented 1 month ago

bump