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

[Logs UI] Remove UUID from Alert Instances #71340

Merged
merged 3 commits into from
Jul 14, 2020

Conversation

Zacqary
Copy link
Contributor

@Zacqary Zacqary commented Jul 9, 2020

Summary

Fixes the Logs alert equivalent of #69623

Logs alerts will now generate alert instance IDs using only group instead of uuid and group. This was creating problems with throttling and stability for users with multiple Kibana instances.

It turns out we didn't need a unique uuid to differentiate alert instances. Multiple alerts can create an instance named * without stepping on each other; what matters is that the ID is unique within an alert itself.

While I was at it I decided to add UNGROUPED_FACTORY_KEY to metrics alerts as well.

Checklist

@Zacqary Zacqary added release_note:fix Feature:Alerting v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.9.0 v7.8.2 labels Jul 9, 2020
@Zacqary Zacqary requested a review from a team as a code owner July 9, 2020 22:18
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

async function ({ services, params }: AlertExecutorOptions) {
const { alertInstanceFactory, savedObjectsClient, callCluster } = services;
const { sources } = libs;
const { groupBy } = params;

const sourceConfiguration = await sources.getSourceConfiguration(savedObjectsClient, 'default');
const indexPattern = sourceConfiguration.configuration.logAlias;
const alertInstance = alertInstanceFactory(alertId);
const alertInstance = alertInstanceFactory(UNGROUPED_FACTORY_KEY);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how we do it in Metrics, where error alert states just use the * alert instance, but if y'all want to handle it differently in Logs please suggest a change.

@Kerry350 Kerry350 self-requested a review July 13, 2020 08:16
Copy link
Contributor

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks for bringing this fix over to logs alongside metrics.

@Kerry350
Copy link
Contributor

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@Kerry350 Kerry350 merged commit 6c4fc9c into elastic:master Jul 14, 2020
Kerry350 pushed a commit to Kerry350/kibana that referenced this pull request Jul 14, 2020
* [Logs UI] Remove UUID from Alert Instances

* Fix bad template string

Co-authored-by: Elastic Machine <[email protected]>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 14, 2020
* master: (72 commits)
  [test] Skips test preventing promotion of ES snapshot elastic#71612
  [Logs UI] Remove UUID from Alert Instances (elastic#71340)
  [Metrics UI] Remove UUID from Alert Instance IDs (elastic#71335)
  [ML] Functional tests - disable DFA creation and cloning tests
  [APM] Use status_code field to calculate error rate (elastic#71109)
  [Observability] Change appLink passing the date range (elastic#71259)
  [Security] Add Timeline improvements (elastic#71506)
  adjust vislib bar opacity (elastic#71421)
  Fix ScopedHistory mock and adapt usages (elastic#71404)
  [Security Solution] Add hook for reading/writing resolver query params (elastic#70809)
  [APM] Bug fixes from ML integration testing (elastic#71564)
  [Discover] Add caused_by.type and caused_by.reason to error toast modal (elastic#70404)
  [Security Solution] Add 3rd level breadcrumb to admin page (elastic#71275)
  [Security Solution][Exceptions] Exception modal bulk close alerts that match exception attributes (elastic#71321)
  Change signal.rule.risk score mapping from keyword to float (elastic#71126)
  Added help text where needed on connectors and alert actions UI (elastic#69601)
  [SIEM][Detections] Value Lists Management Modal (elastic#67068)
  [test] Skips test preventing promotion of ES snapshot elastic#71582
  [test] Skips test preventing promotion of ES snapshot elastic#71555
  [ILM] Fix alignment of the timing field (elastic#71273)
  ...
Kerry350 added a commit that referenced this pull request Jul 14, 2020
* [Logs UI] Remove UUID from Alert Instances

* Fix bad template string

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Zacqary Adam Xeper <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
@EamonnTP
Copy link

EamonnTP commented Aug 5, 2020

Hi @Zacqary Should this be included in the 7.9.0 release notes? I don't see it listed here: https://github.com/elastic/kibana/blob/0afaba21b39709739086e2aaa3a88a8a1bea855b/docs/CHANGELOG.asciidoc

@Zacqary
Copy link
Contributor Author

Zacqary commented Aug 5, 2020

@EamonnTP Same problem as #71335 and #70672, I think the 7.8.2 tag prevented these from getting into the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Feature:Logs UI Logs UI feature release_note:fix Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.8.2 v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants