Skip to content

[Logs UI] Support runtime fields in the log threshold alert#97603

Merged
weltenwort merged 3 commits intoelastic:masterfrom
weltenwort:logs-ui-log-threshold-alert-kip-runtime-fields
Apr 20, 2021
Merged

[Logs UI] Support runtime fields in the log threshold alert#97603
weltenwort merged 3 commits intoelastic:masterfrom
weltenwort:logs-ui-log-threshold-alert-kip-runtime-fields

Conversation

@weltenwort
Copy link
Copy Markdown
Member

@weltenwort weltenwort commented Apr 20, 2021

📝 Summary

This enhances the log threshold alert executor to include the corresponding runtime mappings in the queries if the source is configured to use a KIP.

relates to #92881

🎨 Previews

runtime field in a condition
image

runtime field in a group
image

alerts with condition and group runtime fields fire
image

@weltenwort weltenwort added release_note:enhancement 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.13.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Apr 20, 2021
@weltenwort weltenwort added this to the Logs UI 7.13 milestone Apr 20, 2021
@weltenwort weltenwort self-assigned this Apr 20, 2021
@weltenwort weltenwort marked this pull request as ready for review April 20, 2021 12:46
@weltenwort weltenwort requested a review from a team as a code owner April 20, 2021 12:46
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@Kerry350 Kerry350 self-requested a review April 20, 2021 13:26
Copy link
Copy Markdown
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.

The changes here work great 🎉

Screenshot 2021-04-20 at 15 01 36

I've requested changes as the updates to the chart previews are missing, and shipping one without the other looks broken with 0s:

Screenshot 2021-04-20 at 15 01 56

It should just be a case of updating the calls here: https://github.com/elastic/kibana/blob/master/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_chart_preview.ts#L54, it shares the same functions from the executor.

};

const body = {
const body: estypes.SearchRequest['body'] = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍👍

@weltenwort
Copy link
Copy Markdown
Member Author

updates to the chart previews are missing

Oh, good catch. That's the cost of allowing undefined as the runtime mapping argument, I guess. 🙈

@weltenwort
Copy link
Copy Markdown
Member Author

I made the runtimeMapping argument required as I should have from the start and fixed the call from the preview chart:

image

Copy link
Copy Markdown
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.

Ace! LGTM 🎉

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @weltenwort

@weltenwort weltenwort merged commit a555338 into elastic:master Apr 20, 2021
@weltenwort weltenwort deleted the logs-ui-log-threshold-alert-kip-runtime-fields branch April 20, 2021 17:39
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 20, 2021
…97603)

This enhances the log threshold alert executor to include the corresponding runtime mappings in the queries if the source is configured to use a KIP.
@kibanamachine
Copy link
Copy Markdown
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 Apr 20, 2021
…97693)

This enhances the log threshold alert executor to include the corresponding runtime mappings in the queries if the source is configured to use a KIP.

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
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 Feature:Logs UI Logs 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.13.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants