Open legrego opened 3 months ago
There are three sub-types to an Elasticsearch Query Alerting Rule:
Of these three, only the Search Source implementation provides a context.link variable that links to relevant docs in the Discover application: https://github.com/elastic/kibana/blob/3ae4111a77bc558c478e42da0e6803a901ec27c9/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts#L224
Search Source
context.link
ES Query and ES|QL both generate links to the rule itself: https://github.com/elastic/kibana/blob/3ae4111a77bc558c478e42da0e6803a901ec27c9/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts#L65
https://github.com/elastic/kibana/blob/3ae4111a77bc558c478e42da0e6803a901ec27c9/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts#L137
Now that Discover has first-class support for ES|QL queries, it may be possible to generate a link to Discover with relevant documents, similar to what's done today for Search Source rules.
Pinging @elastic/response-ops (Team:ResponseOps)
There are three sub-types to an Elasticsearch Query Alerting Rule:
Of these three, only the
Search Source
implementation provides acontext.link
variable that links to relevant docs in the Discover application: https://github.com/elastic/kibana/blob/3ae4111a77bc558c478e42da0e6803a901ec27c9/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts#L224ES Query and ES|QL both generate links to the rule itself: https://github.com/elastic/kibana/blob/3ae4111a77bc558c478e42da0e6803a901ec27c9/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts#L65
https://github.com/elastic/kibana/blob/3ae4111a77bc558c478e42da0e6803a901ec27c9/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts#L137
Now that Discover has first-class support for ES|QL queries, it may be possible to generate a link to Discover with relevant documents, similar to what's done today for Search Source rules.