Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover][Alerting] Allow creating the new advanced Elasticsearch query alert in Management #134183

Closed
kertal opened this issue Jun 13, 2022 · 4 comments · Fixed by #134763
Closed
Assignees
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews)

Comments

@kertal
Copy link
Member

kertal commented Jun 13, 2022

With the merge of #131688 it became possible to create and edit the new advanced Elasticsearch query alert in Discover, so you can make use of data view, query and filters to create an alert rule. In the current implementation this is just possible in Discover. This is because we implemented this new feature iteratively. Now that also editing is possible, there's no reason left why not to create this enhanced Elasticsearch query alert in Stack Management. Currently when creating the alert in stack management it's just possible to use the Elasticsearch query DSL:

Rules_-_Elastic

Rules_-Elastic_und_Discover_8_x_planning-_Google_Docs

So the following should be implemented. In Stack management, once the user selected Elasticsearch query, in the following screen there should be a mandatory selection why type of query the users prefers:

  • KQL or Lucene - Make use of a data view, write the query using KQL or Lucene and add filters.
  • Query DSL - Make use of the powerful Query DSL of Elasticsearch.

Depending on the choice of the user, the interface of * KQL or Lucene or Query DSL would be displayed. We wouldn't support the change of the query after selection.

That's how it could look like:

Bildschirmfoto 2022-06-13 um 11 19 59

And here's where the implementation would start:

return (
<>
{hasExpressionErrors && (
<>
<EuiCallOut color="danger" size="s" title={expressionErrorMessage} />
<EuiSpacer />
</>
)}
{isSearchSource ? (
<SearchSourceExpressionMemoized {...props} ruleParams={ruleParams} />
) : (
<EsQueryExpression {...props} ruleParams={ruleParams} />
)}
</>
);

@botelastic botelastic bot added the needs-team Issues missing a team label label Jun 13, 2022
@kertal kertal added Feature:Discover Discover Application Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) labels Jun 13, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jun 13, 2022
@kertal kertal added the enhancement New value added to drive a business result label Jun 13, 2022
@kertal
Copy link
Member Author

kertal commented Jun 13, 2022

FYI @gchaps for wording, FYI @andreadelrio for design, FYI @timductive for managing, FYI @VijayDoshi for product, FYI @gmmorris for awareness

@jughosta
Copy link
Contributor

Do we want to replace index selection with data view selection also for Query DSL view?

With index selection user does not have to have a created data view. But they would need to remember which indices and time field to pick:
Screenshot 2022-06-21 at 10 45 05

Current data view selection lists all existing data views but does not allow to create new data views:
Screenshot 2022-06-21 at 10 45 13

@kertal
Copy link
Member Author

kertal commented Jun 21, 2022

Do we want to replace index selection with data view selection also for Query DSL view?

@jughosta this would currently break functionality, since users can add any index here. But it it would be nice if users could choose. With the introduction of Ad-hoc data view we will have more options here, so users could do both ... use a data view OR provide an index pattern. So we could do this in a later step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants