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

View in app action does not work for ES query rule in Observability alert table #166982

Open
maryam-saeidi opened this issue Sep 21, 2023 · 7 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Alerting response-ops-mx-backlog ResponseOps MX backlog Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.11.0

Comments

@maryam-saeidi
Copy link
Member

πŸ“ Summary

View in app action does not work for ES query rule in Observability alert table:

image

βœ… Acceptance Criteria

  • Fix View in app action in the Observability alert table
@maryam-saeidi maryam-saeidi added bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.11.0 labels Sep 21, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@doakalexi
Copy link
Contributor

cc @XavierM is this related to the recent changes for the view in app that you did?

@ymao1
Copy link
Contributor

ymao1 commented Dec 6, 2023

I don't see it the icon for any of the rule types πŸ€” on main

Image

cc @XavierM

ETA: fixed in #172740

XavierM added a commit that referenced this issue Dec 7, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 7, 2023
## Summary

Fix -> elastic#166982

(cherry picked from commit ba27a25)
kibanamachine referenced this issue Dec 7, 2023
# Backport

This will backport the following commits from `main` to `8.12`:
- [[RAM] Fix o11y view in app
(#172740)](#172740)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Xavier
Mouligneau","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-07T14:00:49Z","message":"[RAM]
Fix o11y view in app (#172740)\n\n## Summary\r\n\r\nFix ->
https://github.com/elastic/kibana/issues/166982","sha":"ba27a25ec78a8e9b2afa63add5b48d07e33ac9bb","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","high","release_note:skip","Team:ResponseOps","v8.12.0","Team:obs-ux-management","v8.11.2","v8.13.0"],"number":172740,"url":"https://github.com/elastic/kibana/pull/172740","mergeCommit":{"message":"[RAM]
Fix o11y view in app (#172740)\n\n## Summary\r\n\r\nFix ->
https://github.com/elastic/kibana/issues/166982","sha":"ba27a25ec78a8e9b2afa63add5b48d07e33ac9bb"}},"sourceBranch":"main","suggestedTargetBranches":["8.12","8.11"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.11","label":"v8.11.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172740","number":172740,"mergeCommit":{"message":"[RAM]
Fix o11y view in app (#172740)\n\n## Summary\r\n\r\nFix ->
https://github.com/elastic/kibana/issues/166982","sha":"ba27a25ec78a8e9b2afa63add5b48d07e33ac9bb"}}]}]
BACKPORT-->

Co-authored-by: Xavier Mouligneau <[email protected]>
@ersin-erdal ersin-erdal self-assigned this Dec 19, 2023
@ersin-erdal
Copy link
Contributor

View in app link on the rule details page is not the same link as the the one on alerts table under o11y.

The one on the rules details page is generated by using the getViewInAppRelativeUrl method on the registered rule type.
e.g.: https://github.com/elastic/kibana/blob/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts#L96

But the one on the observability/alerts page uses the format method on the observabilityRuleTypeRegistry which takes AAD as params.
e.g: https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/public/alerting/inventory/index.ts#L68

As the non-observability rules are registered through alerting ruleTypeRegistry there isn't format method that we can use for ES Query rule type (or any stack rule type).

a- we can move that format method to alerting ruleTypeRegistry (UI),
b- observabilityRuleTypeRegistry can use a new method on ruleTypeRegistry as a fallback.
c- observabilityRuleTypeRegistry can use the viewInAppRelativeUrl filed returned by the _find endpoint on the alerts page.

All the options requires some work from o11y.

cc: @XavierM , @mikecote

Note: Format method on the metric threshold rule type returns a hardcoded value.
There is a TODO note and reference to 2 different Github issues but both of them are closed.
https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/public/alerting/metric_threshold/rule_data_formatters.ts

@XavierM
Copy link
Contributor

XavierM commented Mar 6, 2024

@maryam-saeidi is it still a valid issue?

@maryam-saeidi
Copy link
Member Author

@XavierM It seems you fixed it in #172740, but I don't see in the PR description how you fixed it, did you remove the icon or did you send users to discover for example?

Do you want me to verify the fix?

@maryam-saeidi
Copy link
Member Author

maryam-saeidi commented Mar 7, 2024

@XavierM I checked locally and I didn't see the link, is this expected? I checked it with and without server.publicBaseUrl config, please let me know if I am missing something. :)

image

@ersin-erdal ersin-erdal removed their assignment Sep 16, 2024
@cnasikas cnasikas added response-ops-mx-backlog ResponseOps MX backlog and removed Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Oct 29, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 29, 2024
@wayneseymour wayneseymour added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Nov 4, 2024
@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Alerting response-ops-mx-backlog ResponseOps MX backlog Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.11.0
Projects
No open projects
Development

No branches or pull requests

8 participants