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

[RAC] [Metrics UI] Register Inventory rule types with new RAC rules registry #105706

Merged
merged 18 commits into from
Jul 22, 2021

Conversation

mgiota
Copy link
Contributor

@mgiota mgiota commented Jul 15, 2021

This PR Fixes #105746. It
registers Inventory rule type with new RAC rules registry. Alerts created from these registered rules show up in the observability alerting table.

Screenshot 2021-07-19 at 23 36 01

Relates to:
#98360
#105785

Review notes

  • The value of the reason column is temporary Current value is X (threshold of Y) and should be fixed as part of another ticket. Similarly to the log threshold implementation the params need to be serialized into an inventory-threshold-rule-namespaced field in the doc.
  • Type checking is currently missing and will be introduced as part of another PR
  • Make sure the preview executor doesn't index alerts
  • Temporarily the reason will display a simple message for the current node Inventory alert for {groupName}. Once the reason filed is indexed we will display a more descriptive message. Relates to [Logs UI] Index reason in log threshold executor #106291
  • The link icon at the moment opens the default inventory page. Relates to [RAC][Metrics UI] Link to an inventory item with the flyout open at a certain point in time #106497 106497

@mgiota mgiota changed the title WIP [RAC] [Metrics UI] Register Metrics UI rule types with new RAC rules registry Jul 15, 2021
@mgiota mgiota force-pushed the 98360_metrics_rac_rule_registry branch from 3094ccb to 7d81ac8 Compare July 15, 2021 12:18
@mgiota mgiota force-pushed the 98360_metrics_rac_rule_registry branch from 7d81ac8 to 9969d88 Compare July 15, 2021 21:58
@mgiota mgiota force-pushed the 98360_metrics_rac_rule_registry branch from 5c30733 to b740326 Compare July 19, 2021 20:32
@mgiota mgiota force-pushed the 98360_metrics_rac_rule_registry branch from b740326 to 43ac40e Compare July 19, 2021 20:46
@mgiota mgiota changed the title [RAC] [Metrics UI] Register Metrics UI rule types with new RAC rules registry [RAC] [Metrics UI] Register Inventory rule types with new RAC rules registry Jul 19, 2021
@mgiota mgiota force-pushed the 98360_metrics_rac_rule_registry branch from 1b47eea to 352736d Compare July 19, 2021 21:30
@mgiota mgiota force-pushed the 98360_metrics_rac_rule_registry branch from 352736d to c9778db Compare July 19, 2021 22:00
@mgiota mgiota marked this pull request as ready for review July 19, 2021 22:03
@mgiota mgiota requested a review from a team as a code owner July 19, 2021 22:03
@mgiota
Copy link
Contributor Author

mgiota commented Jul 20, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

expected head sha didn’t match current head ref.

@mgiota mgiota self-assigned this Jul 20, 2021
@weltenwort weltenwort self-requested a review July 20, 2021 09:32
@mgiota mgiota added the Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services label Jul 20, 2021
@elasticmachine
Copy link
Contributor

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

@mgiota mgiota added Theme: rac label obsolete release_note:skip Skip the PR/issue when compiling release notes v7.15.0 v8.0.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jul 20, 2021
@mgiota
Copy link
Contributor Author

mgiota commented Jul 20, 2021

@weltenwort I checked preview_inventory_metric_threshold_alert and it doesn't call the executor internally. So it doesn't accidentally index the produced alerts I guess. Could you double check?

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

This is definitely going into the right direction, but I left a few questions below.

@mgiota
Copy link
Contributor Author

mgiota commented Jul 21, 2021

@weltenwort There was a new PR merged e2aacdc#diff-f206eabccdf944b536c967e22ec43adb376f0e7322c92f5c7ee5217bda757f9fR65. I had removed the AlertType in this PR. I am now wondering if I should actually bring it back. And maybe add it to the register log threshold alert type as well?

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

I think we're almost there. Just stumbled across one typing issue which was hidden by an any.

@mgiota mgiota force-pushed the 98360_metrics_rac_rule_registry branch 2 times, most recently from b136f30 to 193d243 Compare July 21, 2021 15:50
@mgiota mgiota force-pushed the 98360_metrics_rac_rule_registry branch from 193d243 to 94955dd Compare July 21, 2021 15:53
@mgiota mgiota requested a review from weltenwort July 21, 2021 16:12
@weltenwort
Copy link
Member

I think the latest CI failure was caused by the force-push. The current HEAD of the branch is still being tested, so we can just wait. ⏳

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

Well done, thanks for enduring the back-and-forth. 👏

Let's hope CI agrees 🤞 😉

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
infra 887 888 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
infra 147.3KB 147.6KB +377.0B

History

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

cc @mgiota

@mgiota mgiota merged commit eaa6dcb into elastic:master Jul 22, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jul 22, 2021
…egistry (elastic#105706)

* WIP: register inventory metric threshold as lifecycle rule

* fix inventory executor error

* save alerts into ES

* temp

* basic format reason for inventory threshold

* clean up, fix i18n error and temporarily remove types

* delete serialized params

* include group name in the reason

* cleanup

* link to default metrics page

* grab the value and threshold for the inventory item

* fix typo

* fix check types

* remove threshold and currentValue, the reason field will contain this info for combined conditions

* remove thereshold and value from the reason, soon will be replaced by indexed reason field

* remove unnecessary export

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jul 22, 2021
…egistry (#105706) (#106512)

* WIP: register inventory metric threshold as lifecycle rule

* fix inventory executor error

* save alerts into ES

* temp

* basic format reason for inventory threshold

* clean up, fix i18n error and temporarily remove types

* delete serialized params

* include group name in the reason

* cleanup

* link to default metrics page

* grab the value and threshold for the inventory item

* fix typo

* fix check types

* remove threshold and currentValue, the reason field will contain this info for combined conditions

* remove thereshold and value from the reason, soon will be replaced by indexed reason field

* remove unnecessary export

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

Co-authored-by: mgiota <[email protected]>
@mgiota mgiota deleted the 98360_metrics_rac_rule_registry branch January 4, 2022 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Theme: rac label obsolete v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Register Inventory metric threshold as lifecycle rule
4 participants