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

Refactor action messaging to report on No Data state #64365

Merged
merged 16 commits into from
Apr 30, 2020

Conversation

Zacqary
Copy link
Contributor

@Zacqary Zacqary commented Apr 23, 2020

Breaking Change Note

This causes a breakage in the beta feature of Metrics Alerting, and is therefore okay to release in 7.8.

Metrics alerts will no longer expose context.valueOf, context.metricOf, or context.thresholdOf to action messages. These are replaced by the variable context.reason, which explains the reason for the alert firing and automatically includes the metric, threshold, and current value of all configured conditions.

Any alerts configured in 7.7 will still function as normally, but their action messages may no longer provide useful information and have to be reconfigured. The new default action message will show an example of how to use context.reason.

Summary

Closes #64080

  • Adds the context.alertState and context.reason values to action messages
    • alertState can be ALERT, NO DATA, or ERROR (Adding messaging for OK states will come in a later PR)
    • reason is a description of why the alertState was triggered: for ALERT it describes the current metric value(s) that have crossed a configured threshold, for NO DATA it lists metrics that haven't reported data, and for ERROR it lists metrics that could not be queried
  • Adds a checkbox to enable or disable sending action messages on NO DATA/ERROR states. It is unchecked by default.
  • Updates the default action message to reflect these changes

Screen Shot 2020-04-23 at 5 26 18 PM

Screen Shot 2020-04-23 at 5 26 22 PM

Note: Tooltip changed to "or if the alert fails to query Elasticsearch" in a commit after this screenshot was taken to better comply with EUI writing style

Screen Shot 2020-04-23 at 5 28 23 PM

Screen Shot 2020-04-23 at 5 29 17 PM

Checklist

@Zacqary Zacqary added Feature:Alerting Feature:Metrics UI Metrics UI feature release_note:enhancement Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.8.0 v8.0.0 labels Apr 23, 2020
@elasticmachine
Copy link
Contributor

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

@Zacqary Zacqary marked this pull request as ready for review April 24, 2020 17:22
@Zacqary Zacqary requested a review from a team as a code owner April 24, 2020 17:22
@Zacqary
Copy link
Contributor Author

Zacqary commented Apr 27, 2020

@elasticmachine merge upstream

@Zacqary
Copy link
Contributor Author

Zacqary commented Apr 27, 2020

Per discussion with @hbharding I pushed a change to the default action message from

Because {{context.reason}}

to

Reason:
{{context.reason}}

Each alert reason will now be separated by line breaks instead of semicolons (log messages convert line breaks to semicolons anyway)

@phillipb phillipb self-requested a review April 28, 2020 16:02
# Conflicts:
#	x-pack/plugins/infra/public/components/alerting/metrics/expression.tsx
@Zacqary
Copy link
Contributor Author

Zacqary commented Apr 28, 2020

@elasticmachine merge upstream

@Zacqary
Copy link
Contributor Author

Zacqary commented Apr 29, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

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

Successfully merging this pull request may close these issues.

[Metrics Alerts] Add No Data alert
4 participants