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

[AO] Add alertDetailsUrl to infra rule types #157987

Conversation

maryam-saeidi
Copy link
Member

@maryam-saeidi maryam-saeidi commented May 17, 2023

Closes #156534

Summary

This PR adds the alertDetailsUrl to the infra rules. The value of this variable is a link to the observability > alerts page filtered for this instance of alert.

image

Here is an example of this action variable:

alertDetailsUrl as action variable Result of action
image image

Note

  • I will change this field to kibana.alert.url in another ticket

🧪 How to test

  • Ensure that server.publicBaseUrl is configured in kibana.dev.yml
  • Create a metric threshold/inventory/logs rule and use the context.alertDetailsUrl in action for this rule
  • After an alert is triggered, open the link provided by alertDetailsUrl and make sure that the alert is filtered correctly
  • Check the time range, it should be set for 5 mins before the alert start time

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@maryam-saeidi maryam-saeidi added the release_note:skip Skip the PR/issue when compiling release notes label May 22, 2023
@maryam-saeidi
Copy link
Member Author

/oblt-deploy

@maryam-saeidi maryam-saeidi marked this pull request as ready for review May 24, 2023 11:23
@maryam-saeidi maryam-saeidi requested review from a team as code owners May 24, 2023 11:23
@maryam-saeidi maryam-saeidi self-assigned this May 24, 2023
@maryam-saeidi maryam-saeidi added the Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" label May 24, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@crespocarlos crespocarlos self-requested a review May 24, 2023 12:33
Copy link
Contributor

@crespocarlos crespocarlos left a comment

Choose a reason for hiding this comment

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

Infra Monitoring UI LGTM. Just left a non-blocking nit

Co-authored-by: Carlos Crespo <[email protected]>
Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

ftr_configs.yml

) => {
if (!publicBaseUrl || !alertsLocator || !alertUuid) return '';

const rangeFrom = moment(startedAt).subtract('5', 'minute').toISOString();
Copy link
Member

Choose a reason for hiding this comment

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

We probably want to take the window / look-back into account. Or perhaps rule interval. And consider multiples of those - for example, the range should be 3 x window, or something. If the look-back was an hour, or a day, seeing 5m may not be useful.

We'll probably get additional requirements for this anyway, so deferring till then is probably fine.

Copy link
Member Author

@maryam-saeidi maryam-saeidi May 25, 2023

Choose a reason for hiding this comment

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

Good point, I was also thinking about the same but wanted to have a smaller PR focused on generating the link for infra rules for now.
In another instance, I used 1/5 of the alert duration period before the start of the alert and 1/5 after the alert ended (in case it was recovered.)

There is room for improvement, and I created the following ticket to improve this time range:
#158480

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

Had a brief discussion on Slack that we should add some .github/CODEOWNERS magic for the newly added x-pack/test/api_integration/apis/metrics_ui directory, so that PR flagging for these go to the right team.

Other than that LGTM, since there weren't any other ResponseOps changes ...

Copy link
Contributor

@benakansara benakansara left a comment

Choose a reason for hiding this comment

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

LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
observability 466 478 +12

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 917.7KB 917.7KB -18.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
observability 14 15 +1

Page load bundle

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

id before after diff
observability 45.6KB 46.0KB +380.0B
Unknown metric groups

API count

id before after diff
observability 472 484 +12

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 398 402 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 478 482 +4
total +6

History

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

cc @maryam-saeidi

@maryam-saeidi maryam-saeidi merged commit e7ddab7 into elastic:main May 26, 2023
@kibanamachine kibanamachine added v8.9.0 backport:skip This commit does not require backporting labels May 26, 2023
@maryam-saeidi maryam-saeidi changed the title [AO] Add alertDetailsUrl for infra rule [AO] Add alertDetailsUrl to infra rule types May 30, 2023
@maryam-saeidi maryam-saeidi deleted the 156534-add-alertDetailsUrl-for-infra-rules branch June 21, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.9.0
Projects
None yet
9 participants